Endpoints Command Line Tool

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.

You can use the Endpoints command line tool to generate client library bundles for Android apps and Google discovery documents.

The Endpoints command line tool can generate a discovery document in either REST format (the default) or RPC format (required for generating an iOS client).

The Endpoints command line tool can be used to generate a Maven client bundle, a Gradle client bundle, or a bundle that contains only the dependency libraries and source jar. If you are using the client library with an Android app, we recommend that you use a Gradle client bundle.

The Endpoints command line tool is provided in the SDK: appengine-java-sdk-x.x.x/bin/endpoints.sh.

  1. Command line syntax for the Endpoints tool
  2. Options
  3. Platforms supported by the client bundle

Command line syntax for the Endpoints tool

Before you use the Endpoints command line tool, you need to build your backend project because the tool requires compiled binaries. You can optionally supply the --war= option pointing to the build target output directory containing the WEB-INF/appengine-web.xml file and compiled java classes if you don't want to use the default (--war="./war").

The basic syntax is as follows:

appengine-java-sdk-x.x.x/bin/endpoints.sh <command> <options> [class-name]


  • <command> is either get-client-lib or get-discovery-doc.
  • <options>, if supplied, is one or more items shown in the Options table.
  • [class name] is the full class name of your API.


You can use the following options:

Option Name Description Example
build-system Lets you specify which type of client bundle should be produced. Specify gradle for a Gradle client bundle for Android, maven for a Maven client bundle, or default (or simply omit this option) for a bundle that contains only the dependency libraries and source jar. --build-system=gradle
-bs gradle
classpath Lets you specify the service class or classes from a path other than the default <war-directory>/WEB-INF/libs and war-directory>/WEB-INF/classes in your build target directory, where war-directory is the directory specified in the war option, or simply war if that option is not supplied. --classpath=/usr/lib com.google.devrel.samples.ttt.spi.BoardV1
-cp /usr/lib com.google.devrel.samples.ttt.spi.BoardV1
format For get-discovery-doc only. Sets the format of the generated discovery document.
Possible values: rest or rpc.
Default is rest.
-f rpc
war Sets the path to the build target directory WEB-INF that contains appengine-web.xml and other metadata.
Default: ./war.
-w target/helloendpoints-1.0-SNAPSHOT
output Sets the directory where the output will be written to.
Default: the directory the tool is invoked from.
-o /mydir

Platforms Supported by the Client Bundle

The following are supported in the Java client bundle produced by the Endpoints command line tool:

  • Java 5 and higher: standard (SE) and enterprise (EE).
  • Android 1.5 and higher.
  • Google App Engine.
  • The bundle also contains a readme.html file that provides details on using the client library, which dependent jars are needed for each application type (web, installed, or Android application), and so forth.
Was this page helpful? Let us know how we did:

Send feedback about...

Cloud Endpoints Frameworks for App Engine