Create Session
Creates a session with the API. This is the equivalent of login. This operation exchanges user credentials supplied in the security context for a session identifier that is to be used for authenticating subsequent calls. To authenticate subsequent calls clients are expected to include the session key.
Request
URLURL
https://{api_host}/rest/com/vmware/cis/session
Header Parameters
Header Parameters
boolean
vmware-use-header-authn
Optional
custom header to prevent CSRF attacks in browser
string
Authorization
Required
Required basic authentication header. Takes in a Base64 encoded value of your username:password
Authorization Example
Basic dXNlcm5hbWU6cGFzc3dvcmQ=
Response
Response
Response BodyResponse Body
200 OK returns
SessionCreateResponseBody
of type application/json
Newly created session identifier to be used for authenticating further requests.
{
"value": "string"
}
string
value
Optional
Newly created session identifier to be used for authenticating further requests.
cURL Command
curl -X POST -H "vmware-use-header-authn: string" -H "Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=" https://{api_host}/rest/com/vmware/cis/session
Errors
401
com.vmware.vapi.std.errors.unauthenticated : if the session creation fails due to request specific issues. Due to the security nature of the API the details of the error are not disclosed.
Please check the following preconditions if using a SAML token to authenticate:
- the supplied token is delegate-able.
- the time of client and server system are synchronized.
- the token supplied is valid.
- if bearer tokens are used check that system configuration allows the API endpoint to accept such tokens.
503
com.vmware.vapi.std.errors.service_unavailable : if session creation fails due to server specific issues, for example connection to a back end component is failing. Due to the security nature of this API further details will not be disclosed in the error. Please refer to component health information, administrative logs and product specific documentation for possible causes.
default
'Default' means this response is used for all HTTP codes that are not covered individually for this operation.