Create Session
Generates a new active session token for authentication. Supports both local PAM authentication and vSphere SSO authentication. Returns session details including user role information along with an authentication token in the response header.
Credentials required for session creation
Show optional properties
{
"username": "admin",
"password": "SecureP@ssw0rd"
}
{
"authType": "vsphere",
"username": "admin",
"password": "SecureP@ssw0rd"
}
Authentication type
Username for authentication
Password for authentication
Successfully generated session
{
"success": true,
"completed": true,
"time": 1753089693083,
"version": "1.0",
"data": {
"user": {
"enterprise": "HybridityAdmin",
"organization": [
"DEFAULT"
],
"currentOrganization": "DEFAULT",
"roles": [
"System Administrator",
"Appliance Administrator"
],
"username": "[email protected]",
"transactionId": "4636e751-ca87-42d4-a7fc-809b31fbbd82"
},
"cloud": {
"name": "HCX Manager",
"type": "vsphere"
},
"organizations": [
{
"name": "DEFAULT",
"id": "default-org-id"
}
]
}
}
success
completed
Unix timestamp in milliseconds
version
Session data including user and organization details
Response Headers
Session authentication token (use this in subsequent API calls)
Name of the authentication token header
Bad request - unsupported authentication type
{
"success": false,
"completed": false,
"time": 1753089693083,
"version": "1.0",
"errorCode": "BAD_REQUEST",
"error": "Unsupported auth type: invalid"
}
Indicates if the operation was successful
Indicates if the operation completed
Unix timestamp in milliseconds
API version
Enum error code for specific errors
Human-readable error message
Unauthorized - invalid credentials
{
"success": false,
"completed": false,
"time": 1753089693083,
"version": "1.0",
"errorCode": "INVALID_CREDENTIALS",
"error": "Invalid username or password."
}
Indicates if the operation was successful
Indicates if the operation completed
Unix timestamp in milliseconds
API version
Enum error code for specific errors
Human-readable error message
Forbidden - access denied
{
"success": false,
"completed": false,
"time": 1753089693083,
"version": "1.0",
"errorCode": "NOT_ENOUGH_PRIVILEGES",
"error": "Access Denied"
}
Indicates if the operation was successful
Indicates if the operation completed
Unix timestamp in milliseconds
API version
Enum error code for specific errors
Human-readable error message
Internal server error
{
"success": false,
"completed": false,
"time": 1753089693083,
"version": "1.0",
"errorCode": "INTERNAL_SERVER_ERROR",
"error": "Exception while performing auth"
}
Indicates if the operation was successful
Indicates if the operation completed
Unix timestamp in milliseconds
API version
Enum error code for specific errors
Human-readable error message
curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '{"username":"string","password":"string"}' https://{api_host}/api/admin/v1/sessions