POST Sessions
Signs into Operations for Logs with the given credentials, creates and returns a new session.
Request
URI
POST
https://{api_host}/api/v2/sessions
COPY
Request Body
sessions.post.request
of type(s)
application/json
Optional
{
"username": "johndoe",
"password": "password",
"provider": "Local"
}
Responses
200
Successfully signed into Operations for Logs.
Returns
sessions.post.response
of type(s)
application/json
{
"userId": "cc251b9f-b4d0-437d-86de-8ac560d45e55",
"sessionId": "80Lmue52xwIgDiQMu7as9jLdLFFs+Hn3HI2WP0fx6kH0ApL",
"ttl": 1800
}
401
Could not sign in with the given credentials.
{
"errorMessage": "Invalid credentials or account is locked.",
"errorCode": "FIELD_ERROR"
}
503
Operation doesn't return any data structure
Code Samples
COPY
curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '[{}]' https://{api_host}/api/v2/sessions