Class ApiTokenApi

java.lang.Object
com.okta.sdk.resource.api.ApiTokenApi

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", date="2024-03-29T16:47:02.065887-05:00[America/Chicago]", comments="Generator version: 7.4.0") public class ApiTokenApi extends Object
  • Constructor Details

    • ApiTokenApi

      public ApiTokenApi()
    • ApiTokenApi

      public ApiTokenApi(ApiClient apiClient)
  • Method Details

    • getApiClient

      public ApiClient getApiClient()
    • setApiClient

      public void setApiClient(ApiClient apiClient)
    • getApiToken

      public ApiToken getApiToken(String apiTokenId) throws ApiException
      Retrieve an API Token's Metadata Retrieves the metadata for an active API token by id
      Parameters:
      apiTokenId - id of the API Token (required)
      Returns:
      ApiToken
      Throws:
      ApiException - if fails to make API call
    • getApiToken

      public ApiToken getApiToken(String apiTokenId, Map<String,String> additionalHeaders) throws ApiException
      Retrieve an API Token's Metadata Retrieves the metadata for an active API token by id
      Parameters:
      apiTokenId - id of the API Token (required)
      additionalHeaders - additionalHeaders for this call
      Returns:
      ApiToken
      Throws:
      ApiException - if fails to make API call
    • listApiTokens

      public List<ApiToken> listApiTokens(String after, Integer limit, String q) throws ApiException
      List all API Token Metadata Lists all the metadata of the active API tokens
      Parameters:
      after - The cursor to use for pagination. It is an opaque string that specifies your current location in the list and is obtained from the `Link` response header. See [Pagination](/#pagination) for more information. (optional)
      limit - A limit on the number of objects to return (optional, default to 20)
      q - Finds a token that matches the name or clientName. (optional)
      Returns:
      List<ApiToken>
      Throws:
      ApiException - if fails to make API call
    • listApiTokens

      public List<ApiToken> listApiTokens(String after, Integer limit, String q, Map<String,String> additionalHeaders) throws ApiException
      List all API Token Metadata Lists all the metadata of the active API tokens
      Parameters:
      after - The cursor to use for pagination. It is an opaque string that specifies your current location in the list and is obtained from the `Link` response header. See [Pagination](/#pagination) for more information. (optional)
      limit - A limit on the number of objects to return (optional, default to 20)
      q - Finds a token that matches the name or clientName. (optional)
      additionalHeaders - additionalHeaders for this call
      Returns:
      List<ApiToken>
      Throws:
      ApiException - if fails to make API call
    • revokeApiToken

      public void revokeApiToken(String apiTokenId) throws ApiException
      Revoke an API Token Revokes an API token by `apiTokenId`
      Parameters:
      apiTokenId - id of the API Token (required)
      Throws:
      ApiException - if fails to make API call
    • revokeApiToken

      public void revokeApiToken(String apiTokenId, Map<String,String> additionalHeaders) throws ApiException
      Revoke an API Token Revokes an API token by `apiTokenId`
      Parameters:
      apiTokenId - id of the API Token (required)
      additionalHeaders - additionalHeaders for this call
      Throws:
      ApiException - if fails to make API call
    • revokeCurrentApiToken

      public void revokeCurrentApiToken() throws ApiException
      Revoke the Current API Token Revokes the API token provided in the Authorization header
      Throws:
      ApiException - if fails to make API call
    • revokeCurrentApiToken

      public void revokeCurrentApiToken(Map<String,String> additionalHeaders) throws ApiException
      Revoke the Current API Token Revokes the API token provided in the Authorization header
      Parameters:
      additionalHeaders - additionalHeaders for this call
      Throws:
      ApiException - if fails to make API call
    • getObjectMapper

      protected static com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()