Package com.atlan.api
Class ApiTokensEndpoint
java.lang.Object
com.atlan.api.AbstractEndpoint
com.atlan.api.HeraclesEndpoint
com.atlan.api.ApiTokensEndpoint
API endpoints for managing Atlan's API tokens.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.atlan.api.AbstractEndpoint
AbstractEndpoint.RawResponse
-
Field Summary
Fields inherited from class com.atlan.api.AbstractEndpoint
client
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionCreate a new API token with the provided settings.create
(String displayName, String description, Set<String> personas, Long validitySeconds, RequestOptions options) Create a new API token with the provided settings.Retrieves the API token with a name that exactly matches the provided string.Retrieves the API token with a unique ID (GUID) that exactly matches the provided string.Retrieves the API token with a client ID that exactly matches the provided string.list()
Retrieves a list of the 20 most recently created tokens defined in Atlan.list
(RequestOptions options) Retrieves a list of the 20 most recently created tokens defined in Atlan.Retrieves a list of the API tokens defined in Atlan.list
(String filter, String sort, int offset, int limit, RequestOptions options) Retrieves a list of the API tokens defined in Atlan.void
Delete (purge) the specified API token.void
purge
(String guid, RequestOptions options) Delete (purge) the specified API token.Update an existing API token with the provided settings.update
(String guid, String displayName, String description, Set<String> personas, RequestOptions options) Update an existing API token with the provided settings.Methods inherited from class com.atlan.api.HeraclesEndpoint
getBaseUrl
Methods inherited from class com.atlan.api.AbstractEndpoint
getBaseUrl
-
Constructor Details
-
ApiTokensEndpoint
-
-
Method Details
-
list
Retrieves a list of the 20 most recently created tokens defined in Atlan.- Returns:
- a list of the 20 most recently created tokens in Atlan
- Throws:
AtlanException
- on any API communication issue
-
list
Retrieves a list of the 20 most recently created tokens defined in Atlan.- Parameters:
options
- to override default client settings- Returns:
- a list of the 20 most recently created tokens in Atlan
- Throws:
AtlanException
- on any API communication issue
-
list
public ApiTokenResponse list(String filter, String sort, int offset, int limit) throws AtlanException Retrieves a list of the API tokens defined in Atlan.- Parameters:
filter
- which tokens to retrievesort
- property by which to sort the resultsoffset
- starting point for results to return, for paginglimit
- maximum number of results to be returned- Returns:
- a list of tokens that match the provided criteria
- Throws:
AtlanException
- on any API communication issue
-
list
public ApiTokenResponse list(String filter, String sort, int offset, int limit, RequestOptions options) throws AtlanException Retrieves a list of the API tokens defined in Atlan.- Parameters:
filter
- which tokens to retrievesort
- property by which to sort the resultsoffset
- starting point for results to return, for paginglimit
- maximum number of results to be returnedoptions
- to override default client settings- Returns:
- a list of tokens that match the provided criteria
- Throws:
AtlanException
- on any API communication issue
-
get
Retrieves the API token with a name that exactly matches the provided string.- Parameters:
displayName
- name (as it appears in the UI) by which to retrieve the API token- Returns:
- the API token whose name (in the UI) matches the provided string, or null if there is none
- Throws:
AtlanException
- on any error during API invocation
-
getById
Retrieves the API token with a client ID that exactly matches the provided string.- Parameters:
clientId
- unique client identifier by which to retrieve the API token- Returns:
- the API token whose cliendId matches the provided string, or null if there is none
- Throws:
AtlanException
- on any error during API invocation
-
getByGuid
Retrieves the API token with a unique ID (GUID) that exactly matches the provided string.- Parameters:
guid
- unique identifier by which to retrieve the API token- Returns:
- the API token whose GUID matches the provided string, or null if there is none
- Throws:
AtlanException
- on any error during API invocation
-
create
public ApiToken create(String displayName, String description, Set<String> personas, Long validitySeconds) throws AtlanException Create a new API token with the provided settings.- Parameters:
displayName
- human-readable name for the API tokendescription
- optional explanation of the API tokenpersonas
- unique names (qualifiedNames) of personas that should be linked to the tokenvaliditySeconds
- time in seconds after which the token should expire- Returns:
- the created API token
- Throws:
AtlanException
- on any API communication issue
-
create
public ApiToken create(String displayName, String description, Set<String> personas, Long validitySeconds, RequestOptions options) throws AtlanException Create a new API token with the provided settings.- Parameters:
displayName
- human-readable name for the API tokendescription
- optional explanation of the API tokenpersonas
- unique names (qualifiedNames) of personas that should be linked to the tokenvaliditySeconds
- time in seconds after which the token should expireoptions
- to override default client settings- Returns:
- the created API token
- Throws:
AtlanException
- on any API communication issue
-
update
public ApiToken update(String guid, String displayName, String description, Set<String> personas) throws AtlanException Update an existing API token with the provided settings.- Parameters:
displayName
- human-readable name for the API tokendescription
- optional explanation of the API tokenpersonas
- unique names (qualifiedNames) of personas that should be linked to the token- Returns:
- the updated API token
- Throws:
AtlanException
- on any API communication issue
-
update
public ApiToken update(String guid, String displayName, String description, Set<String> personas, RequestOptions options) throws AtlanException Update an existing API token with the provided settings.- Parameters:
guid
- unique identifier (GUID) of the API tokendisplayName
- human-readable name for the API tokendescription
- optional explanation of the API tokenpersonas
- unique names (qualifiedNames) of personas that should be linked to the tokenoptions
- to override default client settings- Returns:
- the updated API token
- Throws:
AtlanException
- on any API communication issue
-
purge
Delete (purge) the specified API token.- Parameters:
guid
- unique identifier (GUID) of the API token to delete- Throws:
AtlanException
- on any API communication issue
-
purge
Delete (purge) the specified API token.- Parameters:
guid
- unique identifier (GUID) of the API token to deleteoptions
- to override default client settings- Throws:
AtlanException
- on any API communication issue
-