Acquire Token

Acquire Token

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

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

The username

string
authSource
Optional

The auth source name

string
password
Required

The password

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
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)

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


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 Users
PUT
Modify User
POST
Create User
DELETE
Delete Users
PUT
Assign Traversal Spec To User
Deprecated
GET
Get Assigned Role Permissions For User
PUT
Assign Role Permission To User
PUT
Change Password
GET
Get User Groups
PUT
Modify User Group
POST
Create User Group
DELETE
Delete User Groups
PUT
Assign Traversal Spec To User Group
Deprecated
GET
Get Assigned Role Permissions For User Group
PUT
Assign Role Permission To User Group
GET
Get Auth Sources
PUT
Update Auth Source
POST
Add Auth Source
PATCH
Patch Auth Source With Certificate Details
PUT
Synchronize User Groups
GET
Get All Object Scopes
PUT
Modify Scope
POST
Create Scope
DELETE
Delete Scopes
GET
Get Roles
PUT
Update User Role
POST
Create User Role
GET
Get Role Privileges
PUT
Set Role Privileges
POST
Add Role Privileges
DELETE
Remove Role Privileges
POST
Release Token
POST
Acquire Token
POST
Import Users
POST
Search Users For Auth Source
POST
Search User Groups For Auth Source
POST
Test Auth Source
PATCH
Patch Test Auth Source
GET
Get User
DELETE
Delete User
GET
Get User Group
DELETE
Delete User Group
GET
Get Traversal Specs
GET
Get Auth Source Types
GET
Get Auth Source Type
GET
Get Auth Source
DELETE
Delete Auth Source
GET
Get Scope
GET
Get Role By Name
DELETE
Delete User Role
GET
Get Available Privileges
GET
Get Available Privilege Groups
GET
Get Current User
GET
Get Current User Role Privileges
GET
Get Assigned Role Permissions For Current User
DELETE
Unassigned Role Permission From User
DELETE
Unassigned Role Permission From User Group