com.google.api.server.spi.config
Annotation Type Api
-
@Retention(value=RUNTIME) @Target(value=TYPE) public @interface Api
Annotation for API-wide configuration.
-
-
Field Summary
Fields Modifier and Type Fields and Description static int
UNSPECIFIED_INT
static java.lang.String
UNSPECIFIED_STRING_FOR_LIST
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element and Description AnnotationBoolean
apiKeyRequired
Whether or not an API key is required.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.ApiIssuerAudience[]
issuerAudiences
Audiences for individual issuers, applicable to all methods of the API unless overridden byApiClass.issuerAudiences()
orApiMethod.issuerAudiences()
.ApiIssuer[]
issuers
Custom JWT issuer configurations.ApiLimitMetric[]
limitDefinitions
Rate limiting metric definitions that are used in this API.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.
-
-
-
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 better client library names. For example, the API name might be "myapi" and the canonical name might be "My API", which indicates that the camel case name should be myApi while the underscore name should be my_api.- Default:
- ""
-
-
-
version
public abstract java.lang.String version
Version of the API, e.g. "v0.2". If not set a default of "v1" will be used.- Default:
- ""
-
-
-
title
public abstract java.lang.String title
The title of an API. This is the title displayed by API Explorer.- Default:
- ""
-
-
-
description
public abstract java.lang.String description
Description of this API. This will be exposed in the discovery service to describe your API, and may also be used to generate documentation.- Default:
- ""
-
-
-
documentationLink
public abstract java.lang.String documentationLink
A link to human readable documentation for the API. By default no link is is exposed in discovery.- Default:
- ""
-
-
-
backendRoot
public abstract java.lang.String backendRoot
Backend root URL, e.g. "https://example.appspot.com/_ah/spi". This is the root of all backend method calls. This will default to "https://yourapp.appspot.com/_ah/spi". Non-secure http URLs will be automatically converted to use https.- Default:
- ""
-
-
-
frontendLimits
public abstract ApiFrontendLimits frontendLimits
Configures quota enforcement. SeeApiFrontendLimits
for details.- Default:
- @com.google.api.server.spi.config.ApiFrontendLimits
-
-
-
cacheControl
public abstract ApiCacheControl cacheControl
Configures the Cache-Control header in the response. SeeApiCacheControl
for details.- Default:
- <error>
-
-
-
authLevel
public abstract AuthLevel authLevel
Set frontend auth level, applicable to all methods of the API unless overridden by@ApiClass#authLevel
or@ApiMethod#authLevel
.- Default:
- com.google.api.server.spi.config.AuthLevel.UNSPECIFIED
-
-
-
scopes
public abstract 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
.- Default:
- "_UNSPECIFIED_LIST_STRING_VALUE"
-
-
-
audiences
public abstract java.lang.String[] audiences
Audience for IdTokens, applicable to all methods of the API unless overridden by@ApiClass#audiences
or@ApiMethod#audiences
.- Default:
- "_UNSPECIFIED_LIST_STRING_VALUE"
-
-
-
issuers
public abstract ApiIssuer[] issuers
Custom JWT issuer configurations. This is only meant to be used with EspAuthenticator in endpoints-framework-auth.- Default:
- @com.google.api.server.spi.config.ApiIssuer(name="_UNSPECIFIED_LIST_STRING_VALUE")
-
-
-
issuerAudiences
public abstract ApiIssuerAudience[] issuerAudiences
Audiences for individual issuers, applicable to all methods of the API unless overridden byApiClass.issuerAudiences()
orApiMethod.issuerAudiences()
. This is only meant to be used with EspAuthenticator in endpoints-framework-auth.- Default:
- @com.google.api.server.spi.config.ApiIssuerAudience(name="_UNSPECIFIED_LIST_STRING_VALUE", audiences="_UNSPECIFIED_LIST_STRING_VALUE")
-
-
-
clientIds
public abstract 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
.- Default:
- "_UNSPECIFIED_LIST_STRING_VALUE"
-
-
-
authenticators
public abstract java.lang.Class<? extends Authenticator>[] authenticators
Custom authenticators. Applies to all methods of the API unless overridden by@ApiClass#authenticators
or@ApiMethod#authenticators
. SeeAuthenticator
.- Default:
- com.google.api.server.spi.config.Authenticator.class
-
-
-
peerAuthenticators
public abstract java.lang.Class<? extends PeerAuthenticator>[] peerAuthenticators
Custom peer authenticators. Applies to all methods of the API unless overridden by@ApiClass#peerAuthenticators
or@ApiMethod#peerAuthenticators
. SeePeerAuthenticator
.- Default:
- <error>
-
-
-
isAbstract
public abstract AnnotationBoolean isAbstract
true
if this API configuration is used as the base for another. Should befalse
for most situations.- Default:
- com.google.api.server.spi.config.AnnotationBoolean.UNSPECIFIED
-
-
-
defaultVersion
public abstract AnnotationBoolean defaultVersion
Marks this version of an API as the default version to use when a JSON-RPC call is executed against the API.- Default:
- com.google.api.server.spi.config.AnnotationBoolean.UNSPECIFIED
-
-
-
resource
public abstract java.lang.String resource
The name (in plural) of the resource collection. It is used as a part of the RESTful path and RPC method name. If it is left empty, a value is deduced from inspecting each endpoint method.- Default:
- ""
-
-
-
transformers
public abstract java.lang.Class<? extends Transformer<?,?>>[] transformers
Custom transformers to be used for this API.- Default:
- {}
-
-
-
useDatastoreForAdditionalConfig
public abstract 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
.- Default:
- com.google.api.server.spi.config.AnnotationBoolean.UNSPECIFIED
-
-
-
namespace
public abstract ApiNamespace namespace
Configures namespacing for generated clients. SeeApiNamespace
for details.- Default:
- @com.google.api.server.spi.config.ApiNamespace(ownerDomain="", ownerName="")
-
-
-
discoverable
public abstract AnnotationBoolean discoverable
Whether or not the API is discoverable. This prevents the JavaScript client from working, and by extension, the API Explorer.- Default:
- com.google.api.server.spi.config.AnnotationBoolean.UNSPECIFIED
-
-
-
apiKeyRequired
public abstract AnnotationBoolean apiKeyRequired
Whether or not an API key is required. This is used to output a Swagger specification and has no effect unless used with endpoints-management-control-appengine.- Default:
- com.google.api.server.spi.config.AnnotationBoolean.UNSPECIFIED
-
-
-
limitDefinitions
public abstract ApiLimitMetric[] limitDefinitions
Rate limiting metric definitions that are used in this API.- Default:
- {}
-
-