Writing and Annotating the Code

Cloud Endpoints Frameworks v1 has been deprecated and will be
shut down on August 2, 2018. We recommend that you use the latest version of
this feature, which is renamed to
Cloud Endpoints Frameworks for
App Engine. This new version supports App Engine standard environment, provides lower
latency, and has better integration with App Engine. For more details, see
Migrating to 2.0.

This page describes the basics of how to structure and annotate your
Cloud Endpoints code. For a complete list of all supported annotations, see
Endpoint Annotations.

The recommended way to add a backend API to a new or existing Android app is to
use
Android Studio
and
Cloud Tools for Android Studio;
Android Studio automatically generates starter
code for you, complete with annotations. If you are building an
iOS or Javascript app you can use Maven and manually write and annotate the
code.

Annotation basics

@ApiMethod
marks a class method that is part of the backend API. Methods that
are not marked with @ApiMethod are not included when you generate client
libraries and discovery docs. The @ApiMethod annotation can also be used
to override the API configuration for a specific method.

@Named must be added
to all parameters passed to server-side methods, unless
the parameter is an entity type.