Package com.dtsx.astra.sdk.org
Class TokensClient
java.lang.Object
com.dtsx.astra.sdk.AbstractApiClient
com.dtsx.astra.sdk.org.TokensClient
Group token operations.
-
Field Summary
Fields inherited from class com.dtsx.astra.sdk.AbstractApiClient
environment, token
-
Constructor Summary
ConstructorDescriptionTokensClient
(String token) As immutable object use builder to initiate the object.TokensClient
(String token, ApiLocator.AstraEnvironment env) As immutable object use builder to initiate the object. -
Method Summary
Modifier and TypeMethodDescriptioncreate
(DefaultRoles role) Create tokenCreate tokenvoid
Revoke a token.boolean
Check in existence of a token.findAll()
List tokensRetrieve role information from its id.getEndpointToken
(String tokenId) Endpoint to access dbs (static)Endpoint to access schema for namespace.Methods inherited from class com.dtsx.astra.sdk.AbstractApiClient
assertHttpCodeAccepted, DELETE, GET, getHttpClient, getToken, HEAD, PATCH, POST, POST, PUT
-
Constructor Details
-
TokensClient
As immutable object use builder to initiate the object.- Parameters:
token
- authenticated token
-
TokensClient
As immutable object use builder to initiate the object.- Parameters:
env
- define target environment to be usedtoken
- authenticated token
-
-
Method Details
-
findAll
List tokens- Returns:
- list of tokens for this organization
-
findById
Retrieve role information from its id.- Parameters:
tokenId
- token identifier- Returns:
- role information
-
exist
Check in existence of a token.- Parameters:
tokenId
- token identifier- Returns:
- if the provided token exist
-
delete
Revoke a token.- Parameters:
tokenId
- token identifier
-
create
Create token- Parameters:
role
- create a token with dedicated role- Returns:
- created token
-
create
Create token- Parameters:
role
- create a token with dedicated role- Returns:
- created token
-
getEndpointTokens
Endpoint to access schema for namespace.- Returns:
- endpoint
-
getEndpointToken
Endpoint to access dbs (static)- Parameters:
tokenId
- token identifier- Returns:
- token endpoint
-