Api

com.google.api.server.spi.config

Annotation Type Api



  • @Retention(value=RUNTIME)
     @Target(value=TYPE)
    public @interface Api
    Annotation for API-wide configuration.
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element and Description
      java.lang.String[] audiences
      Audience for IdTokens, applicable to all methods of the API unless overridden by @ApiClass#audiences or @ApiMethod#audiences.
      ApiAuth auth
      Configures authentication information.
      java.lang.Class<? extends Authenticator>[] authenticators
      Custom authenticators.
      AuthLevel authLevel
      Set frontend auth level, applicable to all methods of the API unless overridden by @ApiClass#authLevel or @ApiMethod#authLevel.
      java.lang.String backendRoot
      Backend root URL, e.g.
      ApiCacheControl cacheControl
      Configures the Cache-Control header in the response.
      java.lang.String canonicalName
      Optional name, which indicates how an API name should be split into parts.
      java.lang.String[] clientIds
      Client IDs allowed to call this method, applicable to all methods of the API unless overridden by @ApiClass#clientIds or @ApiMethod#clientIds.
      AnnotationBoolean defaultVersion
      Marks this version of an API as the default version to use when a JSON-RPC call is executed against the API.
      java.lang.String description
      Description of this API.
      AnnotationBoolean discoverable
      Whether or not the API is discoverable.
      java.lang.String documentationLink
      A link to human readable documentation for the API.
      ApiFrontendLimits frontendLimits
      Configures quota enforcement.
      AnnotationBoolean isAbstract
      true if this API configuration is used as the base for another.
      java.lang.String name
      Name of the API, e.g.
      ApiNamespace namespace
      Configures namespacing for generated clients.
      java.lang.Class<? extends PeerAuthenticator>[] peerAuthenticators
      Custom peer authenticators.
      java.lang.String resource
      The name (in plural) of the resource collection.
      java.lang.String root
      Frontend root URL, e.g.
      java.lang.String[] scopes
      OAuth 2 scopes, one of which is required for calling this method, applicable to all methods of the API unless overridden by @ApiClass#scopes or @ApiMethod#scopes.
      java.lang.String title
      The title of an API.
      java.lang.Class<? extends Transformer<?,?>>[] transformers
      Custom transformers to be used for this API.
      AnnotationBoolean useDatastoreForAdditionalConfig
      AnnotationBoolean.TRUE to request that overriding configuration be loaded from the appengine datastore for all API classes except for those classes that override using @ApiClass#useDatastoreForAdditionalConfig.
      java.lang.String version
      Version of the API, e.g.
    • Field Detail

      • UNSPECIFIED_INT

        public static final int UNSPECIFIED_INT
      • UNSPECIFIED_STRING_FOR_LIST

        public static final java.lang.String UNSPECIFIED_STRING_FOR_LIST
    • Element Detail

      • root

        public abstract java.lang.String root
        Frontend root URL, e.g. "https://example.appspot.com/_ah/api". All api methods will be exposed below this path. This will default to "https://yourapp.appspot.com/_ah/api".
        Default:
        ""
      • name

        public abstract java.lang.String name
        Name of the API, e.g. "guestbook". This is used as the prefix for all api methods and paths. If not set a default of "myapi" will be used.
        Default:
        ""
      • canonicalName

        public abstract java.lang.String canonicalName
        Optional name, which indicates how an API name should be split into parts. This is useful in generating bett