API Guide

3. AUTHENTICATION
Get access to the APIs
3.1 POST /auth/token
Retrieve new token
This API should be invoked rst to get the API token. The returned token to be used for all the other APIs. The token return
has validity of 30 min. This api will also return refresh token which is used to get the new token before the token is expired.
To extend the token use /auth/token/extend api.
REQUEST
REQUEST BODY - application/json
{
username* string min:1 chars
password* string min:1 chars
authDomain enum DEFAULT:LOCAL_AUTH
ALLOWED:LOCAL_AUTH, LDAP_AUTH
}
RESPONSE
STATUS CODE - 200: Response to the login or extend request
RESPONSE MODEL - application/json
{
token string
refreshToken string
}
STATUS CODE - 400: Invalid login request
RESPONSE MODEL - application/json
{
new_object_id string
This represents the id of the new object created for the POST API call.
id string
This represents the key for the localized property le to be used by UI to show the localized string.
message string
Success or error message
messageParams [string]
Params array to substitute in the message. This will be used by UI to substitue the params in the
Message in the localized le.
messages [{
Array of object:
id string
This represents the key for the localized property le to be used by UI to show the localized string.
message string
Success or error message
field_name string
Field name where the error was seen
messageParams [string]
Params array to substitute in the message. This will be used by UI to substitue the params in the
Message in the localized le.
}]
}
STATUS CODE - 401: Bad crendentials
RESPONSE MODEL - application/json
{
new_object_id string
This represents the id of the new object created for the POST API call.
id string
This represents the key for the localized property le to be used by UI to show the localized string.
message string
Success or error message
Params array to substitute in the message. This will be used by UI to substitue the params in the
21 of 340