Backend API Tutorial
This tutorial focuses only on building an API with Endpoints, also called the API backend, or simply the backend. It does not show how to generate client libraries or write client apps that use the API backend. Those aspects of Endpoints are documented elsewhere in the Endpoints documentation.
In this tutorial, you will learn how to:
- Create and configure a Maven project for an API backend.
- Write an extremely simple API backend.
- Run the API backend on the local development server using Maven.
- Test your API backend using the API Explorer.
- Use OAuth 2.0 to restrict access to a method in the API and deploy to production to test.
Complete sample code location
The tutorial leads you through the addition of all the code required to run the sample. However, if you want to download the entire project, visit the code repository containing the appengine-endpoints-helloendpoints-java-maven project.
Topics covered
The following topics lead you through the tutorial:
- Setup: download and set up Maven.
- Creating an Endpoints Project in Maven: Create a new project.
- Configuring the Project for Endpoints: Configure
pom.xml. - Writing the API: A Simple GET: Write a Backend with a Simple GET, run the backend and try it out.
- Writing the API: A Simple POST: Add a simple POST to the backend.
- Adding a Method Protected by OAuth: Add a simple GET that is protected by OAuth 2.0.
Next...
Continue to Setup.