Class ApiTokenApi

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

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", date="2026-03-13T17:36:05.533634+05:30[Asia/Kolkata]", comments="Generator version: 7.15.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 `apiTokenId`
      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 `apiTokenId`
      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() throws ApiException
      List all API token metadata Lists all the metadata of the active API tokens
      Returns:
      List<ApiToken>
      Throws:
      ApiException - if fails to make API call
    • listApiTokens

      public List<ApiToken> listApiTokens(Map<String,String> additionalHeaders) throws ApiException
      List all API token metadata Lists all the metadata of the active API tokens
      Parameters:
      additionalHeaders - additionalHeaders for this call
      Returns:
      List<ApiToken>
      Throws:
      ApiException - if fails to make API call
    • listApiTokensPaged

      public Iterable<ApiToken> listApiTokensPaged()
      List all API token metadata (Paginated) Lists all the metadata of the active API tokens This method returns a lazy, paginated iterable that automatically handles pagination. It is thread-safe and does not cause memory leaks. Use this method in a for-each loop to automatically fetch all pages without manual cursor management.
      Returns:
      Iterable<ApiToken> lazy iterable over all pages
    • listApiTokensPaged

      public Iterable<ApiToken> listApiTokensPaged(Map<String,String> additionalHeaders)
      List all API token metadata (Paginated with additional headers) Lists all the metadata of the active API tokens This method returns a lazy, paginated iterable that automatically handles pagination. It is thread-safe and does not cause memory leaks.
      Parameters:
      additionalHeaders - additional headers for this call
      Returns:
      Iterable<ApiToken> lazy iterable over all pages
    • 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
    • upsertApiToken

      public ApiToken upsertApiToken(String apiTokenId, ApiTokenUpdate apiTokenUpdate) throws ApiException
      Upsert an API token network condition Upserts an API Token Network Condition by `apiTokenId`
      Parameters:
      apiTokenId - id of the API Token (required)
      apiTokenUpdate - (required)
      Returns:
      ApiToken
      Throws:
      ApiException - if fails to make API call
    • upsertApiToken

      public ApiToken upsertApiToken(String apiTokenId, ApiTokenUpdate apiTokenUpdate, Map<String,String> additionalHeaders) throws ApiException
      Upsert an API token network condition Upserts an API Token Network Condition by `apiTokenId`
      Parameters:
      apiTokenId - id of the API Token (required)
      apiTokenUpdate - (required)
      additionalHeaders - additionalHeaders for this call
      Returns:
      ApiToken
      Throws:
      ApiException - if fails to make API call
    • getObjectMapper

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