com.google.api.server.spi.config
Annotation Type Api
-
@Retention(value=RUNTIME) @Target(value=TYPE) public @interface ApiAnnotation for API-wide configuration.
-
-
Field Summary
Fields Modifier and Type Fields and Description static intUNSPECIFIED_INTstatic java.lang.StringUNSPECIFIED_STRING_FOR_LIST
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element and Description AnnotationBooleanapiKeyRequiredWhether or not an API key is required.java.lang.String[]audiencesAudience for IdTokens, applicable to all methods of the API unless overridden by@ApiClass#audiencesor@ApiMethod#audiences.ApiAuthauthConfigures authentication information.java.lang.Class<? extends Authenticator>[]authenticatorsCustom authenticators.AuthLevelauthLevelSet frontend auth level, applicable to all methods of the API unless overridden by@ApiClass#authLevelor@ApiMethod#authLevel.java.lang.StringbackendRootBackend root URL, e.g.ApiCacheControlcacheControlConfigures the Cache-Control header in the response.java.lang.StringcanonicalNameOptional name, which indicates how an API name should be split into parts.java.lang.String[]clientIdsClient IDs allowed to call this method, applicable to all methods of the API unless overridden by@ApiClass#clientIdsor@ApiMethod#clientIds.AnnotationBooleandefaultVersionMarks this version of an API as the default version to use when a JSON-RPC call is executed against the API.java.lang.StringdescriptionDescription of this API.AnnotationBooleandiscoverableWhether or not the API is discoverable.java.lang.StringdocumentationLinkA link to human readable documentation for the API.ApiFrontendLimitsfrontendLimitsConfigures quota enforcement.AnnotationBooleanisAbstracttrueif this API configuration is used as the base for another.ApiIssuerAudience[]issuerAudiencesAudiences for individual issuers, applicable to all methods of the API unless overridden byApiClass.issuerAudiences()orApiMethod.issuerAudiences().ApiIssuer[]issuersCustom JWT issuer configurations.ApiLimitMetric[]limitDefinitionsRate limiting metric definitions that are used in this API.java.lang.StringnameName of the API, e.g.ApiNamespacenamespaceConfigures namespacing for generated clients.java.lang.Class<? extends PeerAuthenticator>[]peerAuthenticatorsCustom peer authenticators.java.lang.StringresourceThe name (in plural) of the resource collection.java.lang.StringrootFrontend root URL, e.g.java.lang.String[]scopesOAuth 2 scopes, one of which is required for calling this method, applicable to all methods of the API unless overridden by@ApiClass#scopesor@ApiMethod#scopes.java.lang.StringtitleThe title of an API.java.lang.Class<? extends Transformer<?,?>>[]transformersCustom transformers to be used for this API.AnnotationBooleanuseDatastoreForAdditionalConfigAnnotationBoolean.TRUEto 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.StringversionVersion 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. SeeApiFrontendLimitsfor details.- Default:
- @com.google.api.server.spi.config.ApiFrontendLimits
-
-
-
cacheControl
public abstract ApiCacheControl cacheControl
Configures the Cache-Control header in the response. SeeApiCacheControlfor details.- Default:
- <error>
-
-
-
authLevel
public abstract AuthLevel authLevel
Set frontend auth level, applicable to all methods of the API unless overridden by@ApiClass#authLevelor@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#scopesor@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#audiencesor@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#clientIdsor@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#authenticatorsor@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#peerAuthenticatorsor@ApiMethod#peerAuthenticators. SeePeerAuthenticator.- Default:
- <error>
-
-
-
isAbstract
public abstract AnnotationBoolean isAbstract
trueif this API configuration is used as the base for another. Should befalsefor 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.TRUEto 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. SeeApiNamespacefor 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:
- {}
-
-