POST /sessions
Use this method to create a new session with (log in to) Lenovo XClarity Administrator.
Important
When running automated scripts, if you want the session to respect the inactivity timeout, add the X-NOT-USER-INPUT field with a value of checkSession to the request header of each request. Adding this header implies that the session times out based on the inactivity timeout value. If the session times out, the session is not renewed, although active requests for uploading and downloading data are not canceled.
Authentication
Authentication is not required.
Request URL
POST https://{management_server_IP}/sessions
Query parameters
None
Request body
Parameters | Required / Optional | Type | Description |
---|---|---|---|
password | Required | String | Password for the user account. |
UserId | Required | String | User name for the account to be used to log in to Lenovo XClarity Administrator. |
The following example creates a new session.
{
"password": "passw0rd",
"UserId": "test"
}
Response codes
Code | Description | Comments |
---|---|---|
200 | OK | The request completed successfully. |
400 | Bad Request | A query parameter or request attribute is missing or not valid, or the operation is not supported. A descriptive error message is returned in the response body. |
500 | Internal Server Error | An internal error occurred. A descriptive error message is returned in the response body. |
Response body
Attributes | Type | Description | ||
---|---|---|---|---|
response | Object | Information about each session. | ||
pwChangeRequired | Boolean | Indicates whether the password must be changed the next time this user ID is used to log in to Lenovo XClarity Administrator. This can be one of the following values.
| ||
session | Object | Information about the user session | ||
Address | String | IP address of the server from which the user is connected | ||
authenticationServer | String | IP address of the authentication server | ||
created | String | Date and time when the user logged in and the session was started | ||
csrf | String | Cross-Site Request Forgery token for the session | ||
id | String | Session ID | ||
idleFor | String | Amount of time, in seconds, that the session has not had activity | ||
inactivityTimeout | String | Amount time of inactivity, in seconds, after which the session is closed and the user is logged out | ||
lastAccessed | String | Date and time when the user performed the last action | ||
UserId | String | User ID | ||
result | String | Results of the request. This can be one of the following values
| ||
messages | Array | Information about one or more messages | ||
explanation | String | Additional information to clarify the reason for the message | ||
id | String | The message identifier of a returned message | ||
recovery | Array | Recovery information | ||
text | String | User actions that can be taken to recover from the event | ||
URL | String | Link to the help system for more information, if available | ||
text | String | Message text associated with the message identifier |
The following example is returned if the request is successful.
{
"response": {
"pwChangeRequired": false,
"session": {
"Address": "10.41.44.187",
"authenticationServer": "127.0.0.1",
"created": "2019-01-25T15:56:44Z",
"csrf": "jbrnbSKznHM4ppOUMTDm-A5JcNNf46AXVNvX98lsRIvGc3Ryav3uTJUmTSP7-gPYacBtIrsEwjEs1IhSxU7_djeE3r_6--PKoa6_5Ois-m7LeMyzAepQaWz6U9W339wM5crBfEdfbecZkJid1cNi6zggAW5O5A0dKKmdlN1FThrbEh0BjfJvcloz0-YrLQxpN0yNbtNef7t-rxSqRpzIFz63Q40it1SjDg0Ldncy2Wxo6bhfC6xBRZBDzgjBgvD7z7sEjgOpvGWgXRYt6gGSlaqpYnHveb90yGfMW3y4Yp8WUp1OmSH8o3DA3qDfJBsYfQ17cJFHVPEgyQrONYFdZA",
"id": "19lee2n050duf10sew3a6l49gs",
"idleFor": "0",
"inactivityTimeout": "1440",
"lastAccessed": "2019-01-25T15:56:44Z",
"UserId": "USERID"
}
},
"result": "success",
"messages": [{
"explanation": "",
"id": "FQXHMSE0001I",
"recovery": {
"text": "Information only; no action is required.",
"URL": ""
},
"text": "The request completed successfully."
}]
}
Give documentation feedback