Login and Logout calls
This topic includes the login and logout calls.
For an overview of logging into the API server, getting an authentication token, and logging out, see Logging-into-the-API-server.
Login
Request
POST /rest/login
Host: atrium-orchestrator-url
Request Headers
Content-type: application/json
{
"username" : "<yourUsername>",
"password" : "<yourPassword>"
}
Host: atrium-orchestrator-url
Request Headers
Content-type: application/json
{
"username" : "<yourUsername>",
"password" : "<yourPassword>"
}
Response
Response Headers:
Status Code: 200 OK
Authentication-Token: <authentication_token>
Content-Type: application/json;charset=UTF-8
Date: Wed, 27 May 2015 13:38:04 GMT
Server: Apache-Coyote/1.1
Transfer-Encoding: chunked
Response Body:
{
"login":"true"
}
Status Code: 200 OK
Authentication-Token: <authentication_token>
Content-Type: application/json;charset=UTF-8
Date: Wed, 27 May 2015 13:38:04 GMT
Server: Apache-Coyote/1.1
Transfer-Encoding: chunked
Response Body:
{
"login":"true"
}
From the response, save the text string returned in the Authentication-Token: header. That text string is your authentication token.
For example, in the previous response, <authentication_token> might look like the following:
AQIC5wM2LY4SfcyLDAZyTRIKrqijnrmwYBF5LyyWnRWj0Kw.*AAJTSQACMDIAAlNLAAoxODI3MTY0MzQ0AAJTMQACMDE.*
Logout
Request
POST /rest/logout
Host: atrium-orchestrator-url
Authentication-Token: <Authentication_Token>
Host: atrium-orchestrator-url
Authentication-Token: <Authentication_Token>
Response
Response Headers:
Status Code: 200 OK
Content-Type: application/json;charset=UTF-8
Date: Fri, 29 May 2015 14:05:32 GMT
Server: Apache-Coyote/1.1
Transfer-Encoding: chunked
Response Body:
{
"logout": "true"
}
Status Code: 200 OK
Content-Type: application/json;charset=UTF-8
Date: Fri, 29 May 2015 14:05:32 GMT
Server: Apache-Coyote/1.1
Transfer-Encoding: chunked
Response Body:
{
"logout": "true"
}
Related topics
Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*