POST Sessions

POST Sessions

Signs into Operations for Logs with the given credentials, creates and returns a new session.

Request
URI
POST
https://{api_host}/api/v1/sessions
COPY
Request Body

Show optional properties

{
    "username": "string",
    "password": "string",
    "provider": "string"
}
{
    "username": "johndoe",
    "password": "password",
    "provider": "Local"
}
string
username
Required

username

string
password
Required

password

string As ^(Local|ActiveDirectory|vIDM)$
provider
Required

provider

Authentication
This operation uses the following authentication methods.
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.

Returns error of type(s) application/json
{
    "errorMessage": "Invalid credentials or account is locked.",
    "errorCode": "FIELD_ERROR"
}
string
errorMessage
Required

A message describing the error.

string
errorCode
Optional

A code representing the type of error.

Possible values are : LIMIT_ERROR, FIELD_ERROR, TEST_ERROR, JSON_FORMAT_ERROR, LICENSE_ERROR, VSPHERE_INTEGRATION_ERROR, VROPS_INTEGRATION_ERROR, UPGRADE_ERROR, SEARCH_ERROR, AGENT_ERROR, RBAC_COMMON_ERROR, RBAC_USERS_ERROR, RBAC_GROUPS_ERROR, RBAC_ADGROUPS_ERROR, RBAC_DATASETS_ERROR, RBAC_VIDM_GROUPS_ERROR, RBAC_VIDB_GROUPS_ERROR, SECURITY_ERROR, DEPLOYMENT_ERROR, SUPPORT_BUNDLE_ERROR, LOAD_BALANCER_ERROR, VIDM_ERROR, VIDB_ERROR, QUERY_ERROR, SSL_CERTIFICATE_ERROR, PROXY_ERROR,
object
errorDetails
Optional

Dynamic error details, where the field name can vary depending on the request field and error code.


503

Operations for Logs did not have its initial configuration set up yet. See /deployment/new.

Returns error of type(s) application/json
{
    "errorMessage": "LI server should be bootstrapped to process this API call"
}
string
errorMessage
Required

A message describing the error.

string
errorCode
Optional

A code representing the type of error.

Possible values are : LIMIT_ERROR, FIELD_ERROR, TEST_ERROR, JSON_FORMAT_ERROR, LICENSE_ERROR, VSPHERE_INTEGRATION_ERROR, VROPS_INTEGRATION_ERROR, UPGRADE_ERROR, SEARCH_ERROR, AGENT_ERROR, RBAC_COMMON_ERROR, RBAC_USERS_ERROR, RBAC_GROUPS_ERROR, RBAC_ADGROUPS_ERROR, RBAC_DATASETS_ERROR, RBAC_VIDM_GROUPS_ERROR, RBAC_VIDB_GROUPS_ERROR, SECURITY_ERROR, DEPLOYMENT_ERROR, SUPPORT_BUNDLE_ERROR, LOAD_BALANCER_ERROR, VIDM_ERROR, VIDB_ERROR, QUERY_ERROR, SSL_CERTIFICATE_ERROR, PROXY_ERROR,
object
errorDetails
Optional

Dynamic error details, where the field name can vary depending on the request field and error code.


Code Samples
COPY
                    curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '{"password:"string","provider:"string","username:"string"}' https://{api_host}/api/v1/sessions