Get an authentication token (for release 19A and lower)

post

/AgentWeb/api/securityservice/authentication/authToken

Returns an authentication token

Request

Body ()
Specify the request authentication credentials
Root Schema : AuthenticationRequest
Type: object
Show Source
Example:
{
    "username":"username",
    "password":"password",
    "interfaceUrl":"http://<site-name>/cgi-bin/<interface>.cfg"
}
Back to Top

Response

Supported Media Types

200 Response

Authentication token
Body ()
Root Schema : AuthToken
Type: object
Show Source
Back to Top

Examples

The following example shows how to get an authentication token for release 19A and lower.

cURL Command Example

https://mysite.example.com/AgentWeb/api/securityservice/authentication/authToken -H "Authorization: Bearer null" -H "Content-Type: application/json" -d "{ \"username\": \"admin\", \"password\": \"\", \"interfaceUrl\": \"http://mysite.example.com/cgi-bin/myinterface.cfg\" }"

Request Body Example

The following shows an example of the request body in JSON format.

{
  "username": "MyUser123",
  "password": "MyPwd123",
  "interfaceUrl": "http://mysite.example.com/cgi-bin/myinterface.cfg"
}

Response Body Example

The following shows an example of the response body in JSON format. The token in this example has been abbreviated for readability.

{
    "description": "Authorization token",
    "token": "feihg98GnT7i"
}
Back to Top