Interface ApiTokens

All Known Implementing Classes:
ApiTokensImpl

public interface ApiTokens
  • Method Details

    • getAllApiTokens

      List<ApiToken> getAllApiTokens(long accountId)
      List all API tokens visible to the current API token.
      Parameters:
      accountId - unique account ID
      Returns:
      list of API tokens
    • createApiToken

      ApiTokenWithToken createApiToken(long accountId, CreateApiTokenRequest request)
      Create a new API token for the account with the given name and resource permissions. The full token value is returned only on creation.
      Parameters:
      accountId - unique account ID
      request - token name and resource permissions
      Returns:
      created token, including the full token value
    • getApiToken

      ApiToken getApiToken(long accountId, long id)
      Get a single API token by id.
      Parameters:
      accountId - unique account ID
      id - API token ID
      Returns:
      API token
    • deleteApiToken

      void deleteApiToken(long accountId, long id)
      Permanently delete an API token.
      Parameters:
      accountId - unique account ID
      id - API token ID
    • resetApiToken

      ApiTokenWithToken resetApiToken(long accountId, long id)
      Reset an API token. Expires the requested token and creates a new one with the same permissions; the new token value is returned only once.
      Parameters:
      accountId - unique account ID
      id - API token ID
      Returns:
      new token, including the full token value