# ApiClass

com.google.api.server.spi.config

## Annotation Type ApiClass

-

  *** ** * ** ***

  <br />

  ```
  @Retention(value=RUNTIME)
   @Target(value=TYPE)
  public @interface ApiClass
  ```
  Annotation for configuration specific to an API class.
-
  -

    ### Optional Element Summary

    | Modifier and Type | Optional Element and Description |
    |---|---|
    | `https://docs.cloud.google.com/endpoints/docs/frameworks/java/javadoc/com/google/api/server/spi/config/AnnotationBoolean.html` | `https://docs.cloud.google.com/endpoints/docs/frameworks/java/javadoc/com/google/api/server/spi/config/ApiClass.html#apiKeyRequired--` Whether or not an API key is required. |
    | `java.lang.String[]` | `https://docs.cloud.google.com/endpoints/docs/frameworks/java/javadoc/com/google/api/server/spi/config/ApiClass.html#audiences--` Audience for IdTokens, applicable to all methods of the API class unless overridden by `@ApiMethod#audiences`. |
    | `java.lang.Class<? extends https://docs.cloud.google.com/endpoints/docs/frameworks/java/javadoc/com/google/api/server/spi/config/Authenticator.html>[]` | `https://docs.cloud.google.com/endpoints/docs/frameworks/java/javadoc/com/google/api/server/spi/config/ApiClass.html#authenticators--` Custom authenticators, applicable to all methods of the API class unless overridden by `@ApiMethod#authenticators`. |
    | `https://docs.cloud.google.com/endpoints/docs/frameworks/java/javadoc/com/google/api/server/spi/config/AuthLevel.html` | `https://docs.cloud.google.com/endpoints/docs/frameworks/java/javadoc/com/google/api/server/spi/config/ApiClass.html#authLevel--` Set frontend auth level, applicable to all methods of the API unless overridden by `@ApiMethod#authLevel`. |
    | `java.lang.String[]` | `https://docs.cloud.google.com/endpoints/docs/frameworks/java/javadoc/com/google/api/server/spi/config/ApiClass.html#clientIds--` Client IDs allowed to call this method, applicable to all methods of the API class unless overridden by `@ApiMethod#clientIds`. |
    | `https://docs.cloud.google.com/endpoints/docs/frameworks/java/javadoc/com/google/api/server/spi/config/ApiIssuerAudience.html[]` | `https://docs.cloud.google.com/endpoints/docs/frameworks/java/javadoc/com/google/api/server/spi/config/ApiClass.html#issuerAudiences--` Audiences for individual issuers, applicable to all methods of the API unless overridden by [`ApiMethod.issuerAudiences()`](https://docs.cloud.google.com/endpoints/docs/frameworks/java/javadoc/com/google/api/server/spi/config/ApiMethod.html#issuerAudiences--). |
    | `java.lang.Class<? extends PeerAuthenticator>[]` | `https://docs.cloud.google.com/endpoints/docs/frameworks/java/javadoc/com/google/api/server/spi/config/ApiClass.html#peerAuthenticators--` Custom peer authenticators, applicable to all methods of the API class unless overridden by `@ApiMethod#peerAuthenticators`. |
    | `java.lang.String` | `https://docs.cloud.google.com/endpoints/docs/frameworks/java/javadoc/com/google/api/server/spi/config/ApiClass.html#resource--` The name (in plural) of the resource collection. |
    | `java.lang.String[]` | `https://docs.cloud.google.com/endpoints/docs/frameworks/java/javadoc/com/google/api/server/spi/config/ApiClass.html#scopes--` OAuth 2 scopes, one of which is required for calling this method, applicable to all methods of the API class unless overridden by `@ApiMethod#scopes`. |
    | `https://docs.cloud.google.com/endpoints/docs/frameworks/java/javadoc/com/google/api/server/spi/config/AnnotationBoolean.html` | `https://docs.cloud.google.com/endpoints/docs/frameworks/java/javadoc/com/google/api/server/spi/config/ApiClass.html#useDatastoreForAdditionalConfig--` `AnnotationBoolean.TRUE` to request that overriding configuration be loaded from the appengine datastore. |
    [Optional Elements]

-
  -

    ### Element Detail


    -

      #### 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:
      :   ""

  <!-- -->

  -

    -

      #### authLevel

      ```
      public abstract AuthLevel authLevel
      ```
      Set frontend auth level, applicable to all methods of the API unless overridden by `@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 class unless overridden by `@ApiMethod#scopes`.

      Default:
      :   "_UNSPECIFIED_LIST_STRING_VALUE"

  <!-- -->

  -

    -

      #### audiences

      ```
      public abstract java.lang.String[] audiences
      ```
      Audience for IdTokens, applicable to all methods of the API class unless overridden by `@ApiMethod#audiences`.

      Default:
      :   "_UNSPECIFIED_LIST_STRING_VALUE"

  <!-- -->

  -

    -

      #### issuerAudiences

      ```
      public abstract ApiIssuerAudience[] issuerAudiences
      ```
      Audiences for individual issuers, applicable to all methods of the API unless overridden by [`ApiMethod.issuerAudiences()`](https://docs.cloud.google.com/endpoints/docs/frameworks/java/javadoc/com/google/api/server/spi/config/ApiMethod.html#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 class unless overridden by `@ApiMethod#clientIds`.

      Default:
      :   "_UNSPECIFIED_LIST_STRING_VALUE"

  <!-- -->

  -

    -

      #### authenticators

      ```
      public abstract java.lang.Class<? extends Authenticator>[] authenticators
      ```
      Custom authenticators, applicable to all methods of the API class unless overridden by `@ApiMethod#authenticators`.

      Default:
      :   com.google.api.server.spi.config.Authenticator.class

  <!-- -->

  -

    -

      #### peerAuthenticators

      ```
      public abstract java.lang.Class<? extends PeerAuthenticator>[] peerAuthenticators
      ```
      Custom peer authenticators, applicable to all methods of the API class unless overridden by `@ApiMethod#peerAuthenticators`.

      Default:
      :   \<error\>

  <!-- -->

  -

    -

      #### useDatastoreForAdditionalConfig

      ```
      public abstract AnnotationBoolean useDatastoreForAdditionalConfig
      ```
      `AnnotationBoolean.TRUE` to request that overriding configuration be loaded from the appengine datastore.

      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