POST– Create a session
Create a session resource for further access authentications.
Request URL
POST https://<BMC_IPADDR>/redfish/v1/SessionService/Sessions
Request body
Field | Type | Description |
---|---|---|
UserName | String | The username who creates this session. |
Password | String | This property is used in a POST to specify a password when creating a new session. This property is null on a GET. |
Response body
Field | Type | Description |
---|---|---|
UserName | String | The username who creates this session. |
Password | String | This property is used in a POST to specify a password when creating a new session. This property is null on a POST response. |
SessionType | String | "Redfish" |
Name | String | A session id value |
Id | String | A session id value |
Response header
Field | Description |
---|---|
Location | Link to the session resource created. |
X-Auth-Token | An authentication code is generated when a new session is created. |
Status code
HTTP Status Code | Error Message ID |
---|---|
201 | Created |
401 | NoValidSession |
403 | SessionLimitExceeded |
500 | InternalError |
Example
The following example is POST body.
{
"UserName" : "USERID",
"Password" : "PASSW0RD"
}
The following example JSON response is returned:
{
"@odata.id": "/redfish/v1/SessionService/Sessions/6",
"Password": null,
"@odata.type": "#Session.v1_2_1.Session",
"Id": "6",
"SessionType": "Redfish",
"@odata.etag": "\"1470b92b471825a097d \"",
"Name": "6",
"UserName": "USERID"
}
Give documentation feedback