Authenticate

This call returns a token based on user credentials. The returned token has to be used in the following calls.

URL

/authenticate

Method

POST

Headers

None

Request type

JSON

Response type

JSON

URL Parameters

Required: None

Optional: None

Payload

{
  username: [string],
  password: [string],
  clientContext: [integer] @optional @ignored
}

Example:

{
  username: sysadmin,
  password: sysadmin,
  clientContext: 1
}

Success response

Code: 200

Content: <token>

Example:

Code: 200

Content:

{
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE0NzQzNTc3MDYsImN1c3RvbWVyIjoxLCJ1c2VybmFtZSI6InN5c2FkbWluIn0.cVYsuum1CqaqfZV1K5KJ8nidOOif8Wv9tZsLFFZPbSs"
}

Error response

Code: 401

Content:

{
  error: [string]
} 

Example:

Code: 401

Content:

{
  error: The following error has occurred: Invalid username received. Please consult logs for more details
}

Notes

The user needs access to SDK permission.