Acquire Token

Acquire Token
Acquire a token to perform REST API calls

Performing a POST /api/auth/token/acquire would yield a response object that includes token and its validity.
HTTP Status 401 will be sent back if the authentication operation has failed.
NOTE: The validity of the acquired token is extended after each call and is set to 6 hours from the last call.

Request
URI
POST
https://{api_host}/suite-api/api/auth/token/acquire
COPY
Request Body

The UsernamePassword object that encapsulates username, password and optionally the name of an Auth Source as specified by the user

username-password of type(s) application/json
Required

Show optional properties

{
    "password": "string",
    "username": "string"
}
"{\n  \"username\" : \"Some-LDAP-User\",\n  \"authSource\" : \"Imported LDAP Server\",\n  \"password\" : \"Some-LDAP-User-Password\"\n}"
string
authSource
Optional

The auth source name

string
password
Required

The password

string
username
Required

The username

Authentication
This operation uses the following authentication methods.
Responses
200

The token and expiry time of the token

Returns auth-token of type(s) application/json
"No Custom Example is Available"
string
expiresAt
Optional

Token expiration time, in easy to read string representation (since Jan 1, 1970)

array of string
roles
Optional

List of roles the current user has

string
token
Required

Auth token for accessing future rest API(s)

integer As int64 As int64
validity
Required

Token expiration time in milliseconds (since Jan 1, 1970)


401

Authentication failed

Operation doesn't return any data structure

Code Samples
COPY
                    curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '{"password":"string","username":"string"}' https://{api_host}/suite-api/api/auth/token/acquire
                
Auth Operations
GET
Get Current User
GET
Get Assigned Role Permissions For Current User
GET
Get Current User Role Privileges
GET
Get Available Privilege Groups
GET
Get Available Privileges
GET
Get Roles
POST
Create User Role
PUT
Update User Role
DELETE
Delete User Role
GET
Get Role By Name
DELETE
Remove Role Privileges
GET
Get Role Privileges
POST
Add Role Privileges
PUT
Set Role Privileges
DELETE
Delete Scopes
GET
Get All Object Scopes
POST
Create Scope
PUT
Modify Scope
GET
Get Scope
GET
Get Auth Sources
PATCH
Patch Auth Source With Certificate Details
POST
Add Auth Source
PUT
Update Auth Source
PATCH
Patch Test Auth Source
POST
Test Auth Source
GET
Get VIDB Well Known URL
POST
Search User Groups For Auth Source
PUT
Synchronize User Groups
POST
Import Users
POST
Search Users For Auth Source
DELETE
Delete Auth Source
GET
Get Auth Source
GET
Get Auth Source Types
GET
Get Auth Source Type
POST
Acquire Token
POST
Exchange Ops Token With Jwt Token
POST
Release Token
GET
Get Traversal Specs
DELETE
Delete User Groups
GET
Get User Groups
POST
Create User Group
PUT
Modify User Group
GET
Get Assigned Role Permissions For User Group
PUT
Assign Role Permission To User Group
DELETE
Unassigned Role Permission From User Group
PUT
Assign Traversal Spec To User Group
Deprecated
DELETE
Delete User Group
GET
Get User Group
DELETE
Delete Users
GET
Get Users
POST
Create User
PUT
Modify User
PUT
Change Password
DELETE
Delete User
GET
Get User
GET
Get Assigned Role Permissions For User
PUT
Assign Role Permission To User
DELETE
Unassigned Role Permission From User
PUT
Assign Traversal Spec To User
Deprecated