REST API Reference Version 3.1.0.0Search

Create

POST v1/tokens

Description

Create a user session token.

Normal Response Codes

201

HTTP Error Codes

400 401 404 409 500 503

Detail Error Codes

Request

Parameter Type JSON Type Description Default Mandatory Deprecated
username NsUserName string User name for the session. String of up to 80 alphanumeric characters, beginning with a letter. For Active Directory users, it can include backslash (\), dash (-), period (.), underscore (_) and space. Example: 'user1', 'companydomain\user1'.   Yes  
password NsPassword string Password for the user. A password is required for creating a token. String of 8 to 255 printable characters excluding ampersand, backslash and ~;[]`. Example: 'password-91'.   No  
app_name NsAppName string Application name. String of 0-255 printable ASCII characters. Example: 'GUI'. '' No  
source_ip NsIPAddress string IP address from which the session originates. Four numbers in the range [0,255] separated by periods. Example: '128.0.0.1'. The source IP address obtained from the socket information. No  

JSON Request

Response

Parameter Type JSON Type Description Deprecated
id NsObjectID string Object identifier for the session token. A 42 digit hexadecimal number. Example: '2a0df0fe6f7dc7bb16000000000000000000004817'.  
session_token NsToken string Token used for authentication. String of 31 or 32 alphanumeric characters. Example: '9f53a789f1e9eae7b9385f4d8873fb1'.  
username NsUserName string User name for the session. String of up to 80 alphanumeric characters, beginning with a letter. For Active Directory users, it can include backslash (\), dash (-), period (.), underscore (_) and space. Example: 'user1', 'companydomain\user1'.  
app_name NsAppName string Application name. String of 0-255 printable ASCII characters. Example: 'GUI'.  
source_ip NsIPAddress string IP address from which the session originates. Four numbers in the range [0,255] separated by periods. Example: '128.0.0.1'.  
creation_time NsTime number Time when this token was created. Seconds since last epoch i.e. 00:00 January 1, 1970. Example: '3400'.  
last_modified NsTime number Time when this token was last modified. Seconds since last epoch i.e. 00:00 January 1, 1970. Example: '3400'.  

JSON Response