Login externally
POST /api/v1/login/external. Identity and access API reference.
Login externally
curl --request POST \
--url https://{apiHost}/api/v1/login/external \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"usernameAtRealm": "<string>",
"enterpriseName": "<string>",
"redirectUri": "<string>"
}
'import requests
url = "https://{apiHost}/api/v1/login/external"
payload = {
"usernameAtRealm": "<string>",
"enterpriseName": "<string>",
"redirectUri": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
usernameAtRealm: '<string>',
enterpriseName: '<string>',
redirectUri: '<string>'
})
};
fetch('https://{apiHost}/api/v1/login/external', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"cause": "UNSPECIFIED",
"userId": "<string>",
"token": {
"base64": "<string>",
"expires": "<string>"
},
"policies": [
{
"id": "<string>",
"zone": "<string>",
"scope": "PermissionScope__INVALID__",
"access": "PermissionAccess__INVALID__",
"ownerId": "<string>",
"external": true
}
],
"simpleUser": {
"id": "<string>",
"username": "<string>",
"realmId": "<string>",
"state": "USER_STATE_UNSPECIFIED",
"firstName": "<string>"
},
"detailedUser": {
"username": "<string>",
"roleId": "<string>",
"email": "<string>",
"id": "<string>",
"SfdcId": "<string>",
"HubspotId": "<string>",
"revision": {
"curr": "<string>",
"createdAt": {},
"createdBy": "<string>",
"updatedAt": {},
"updatedBy": "<string>",
"prev": "<string>"
},
"state": "USER_STATE_UNSPECIFIED",
"firstName": "<string>",
"locale": "<string>",
"fullName": "<string>",
"timeZone": "<string>",
"type": "AUTH_TYPE_UNSPECIFIED",
"phone": "<string>",
"notifyPref": "<string>",
"LastLoginTime": "2023-11-07T05:31:56Z",
"LastLogoutTime": "2023-11-07T05:31:56Z",
"emailState": "ID_STATE_UNSPECIFIED",
"phoneState": "ID_STATE_UNSPECIFIED",
"customUserInput": {},
"allowedEnterprises": [
{
"id": "<string>",
"name": "<string>",
"roleId": "<string>"
}
],
"enterpriseId": "<string>",
"totpEnabled": true,
"allowedEntpProjectList": {},
"zksSyncStatus": {
"status": "ZKS_SYNC_STATUS_CODE_UNSPECIFIED",
"serverStatuses": [
{
"serverName": "<string>",
"status": "<string>",
"error": "<string>"
}
]
},
"tokenZksSyncStatus": {},
"passwordExpiryNotificationPeriodInSeconds": 123
},
"realm": {
"id": "EAJ1ABAi-KOom7dJlrBoE8eq1pj9",
"name": "zededa.com",
"enterpriseId": "AAFlABDe6Nm63ixF5LJBbk9Keqp6",
"title": "zededa",
"description": "Test realm",
"revision": {
"prev": "",
"curr": "1",
"createdAt": "2020-07-17T06:03:14Z",
"createdBy": "us.root@zededa.com",
"updatedAt": "2020-07-17T06:03:14Z",
"updatedBy": "us.root@zededa.com"
}
},
"enterprise": {
"name": "<string>",
"title": "<string>",
"id": "<string>",
"SfdcId": "<string>",
"HubspotId": "<string>",
"state": "ENTERPRISE_STATE_UNSPECIFIED",
"type": "ENTERPRISE_TYPE_UNSPECIFIED",
"policyList": {
"list": [
{
"Policy": "<string>",
"Version": "<string>",
"AcceptedAt": "2023-11-07T05:31:56Z",
"AcceptedBy": "<string>",
"EffectiveFrom": "2023-11-07T05:31:56Z"
}
]
},
"parentEntpId": "<string>",
"azureSubId": "<string>",
"description": "<string>",
"revision": {
"curr": "<string>",
"createdAt": {},
"createdBy": "<string>",
"updatedAt": {},
"updatedBy": "<string>",
"prev": "<string>"
},
"realms": [
"<string>"
],
"attributes": {},
"inheritAuthFromParent": true,
"childEnterprises": [
{
"name": "<string>",
"id": "<string>"
}
],
"controllerHostURL": "<string>",
"streamEvents": {
"pluginId": "<string>",
"enabled": true
},
"totpSettings": {
"enforce": true,
"enforceInChildren": true,
"enforcedByParent": true
},
"apiTokenExpiryInSeconds": 123
},
"role": {
"id": "AAGFABAEqnH4je5PHZTXSmHOs-XC",
"name": "SysRoot",
"title": "SysRoot",
"description": "",
"revision": {
"prev": "",
"curr": "1",
"createdAt": "2020-07-16T18:19:56Z",
"createdBy": "SYSTEM_ROOT",
"updatedAt": "1970-01-01T00:00:01Z",
"updatedBy": "SYSTEM_ROOT"
},
"type": "USER_ROLE_CLUSTER",
"state": "ROLE_STATE_ACTIVE",
"scopes": [
{
"accessDevice": "PermissionAccessCreateReadUpdateDelete",
"accessApp": "PermissionAccessCreateReadUpdateDelete",
"accessUser": "PermissionAccessCreateReadUpdateDelete",
"accessStorage": "PermissionAccessCreateReadUpdateDelete",
"accessEnterprise": "PermissionAccessCreateReadUpdateDelete",
"enterpriseFilter": [
"srAll"
],
"projectFilter": [
"srAll"
]
}
]
},
"noOfLoginAttemptsLeft": 123,
"redirectUrl": "<string>",
"loginToken": {
"base64": "<string>",
"expires": "<string>"
},
"apiToken": {
"base64": "<string>",
"expires": "<string>"
},
"passwordExpiryTime": "2023-11-07T05:31:56Z",
"passwordExpiryNotificationPeriodInSeconds": 123,
"tempToken": {
"base64": "<string>",
"expires": "<string>"
}
}{
"operationType": "OPS_TYPE_UNSPECIFIED",
"operationStatus": "OPS_STATUS_UNSPECIFIED",
"objectKind": "<string>",
"objectId": "<string>",
"objectName": "<string>",
"objectRevision": "<string>",
"objectType": "OBJECT_TYPE_UNSPECIFIED",
"operationTime": "<string>",
"startTime": "<string>",
"endTime": "<string>",
"user": "<string>",
"httpStatusCode": 123,
"httpStatusMsg": "<string>",
"jobId": "<string>",
"error": [
{
"ec": "zMsgErrorNone",
"location": "<string>",
"details": "<string>"
}
]
}{
"operationType": "OPS_TYPE_UNSPECIFIED",
"operationStatus": "OPS_STATUS_UNSPECIFIED",
"objectKind": "<string>",
"objectId": "<string>",
"objectName": "<string>",
"objectRevision": "<string>",
"objectType": "OBJECT_TYPE_UNSPECIFIED",
"operationTime": "<string>",
"startTime": "<string>",
"endTime": "<string>",
"user": "<string>",
"httpStatusCode": 123,
"httpStatusMsg": "<string>",
"jobId": "<string>",
"error": [
{
"ec": "zMsgErrorNone",
"location": "<string>",
"details": "<string>"
}
]
}{
"operationType": "OPS_TYPE_UNSPECIFIED",
"operationStatus": "OPS_STATUS_UNSPECIFIED",
"objectKind": "<string>",
"objectId": "<string>",
"objectName": "<string>",
"objectRevision": "<string>",
"objectType": "OBJECT_TYPE_UNSPECIFIED",
"operationTime": "<string>",
"startTime": "<string>",
"endTime": "<string>",
"user": "<string>",
"httpStatusCode": 123,
"httpStatusMsg": "<string>",
"jobId": "<string>",
"error": [
{
"ec": "zMsgErrorNone",
"location": "<string>",
"details": "<string>"
}
]
}{
"operationType": "OPS_TYPE_UNSPECIFIED",
"operationStatus": "OPS_STATUS_UNSPECIFIED",
"objectKind": "<string>",
"objectId": "<string>",
"objectName": "<string>",
"objectRevision": "<string>",
"objectType": "OBJECT_TYPE_UNSPECIFIED",
"operationTime": "<string>",
"startTime": "<string>",
"endTime": "<string>",
"user": "<string>",
"httpStatusCode": 123,
"httpStatusMsg": "<string>",
"jobId": "<string>",
"error": [
{
"ec": "zMsgErrorNone",
"location": "<string>",
"details": "<string>"
}
]
}{
"code": 123,
"message": "<string>",
"details": [
{
"typeUrl": "<string>",
"value": "aSDinaTvuI8gbWludGxpZnk="
}
]
}
Authentication · API availability · Download OpenAPI
This operation can change resources or access. After signing in, open API request settings and select Enable modifying requests, then Apply settings, to use its playground. Check the request body and destination before selecting Send. Your existing API permissions still apply.
A successful response.Unauthorized. The API gateway did not process the request because it lacks valid authentication credentials for the target resource. The request header has either no authorization details or an authorization that has been refused.Forbidden. The API gateway did not process the request because the requestor does not have edge-node level access permission for the operation or does not have access scope to the project.Internal Server Error. The API gateway experienced an unexpected condition. Specific error condition is indicated in error codes.Gateway Timeout. The API gateway did not receive a timely response from an upstream microservice it needed to communicate with in order to complete the request.An unexpected error response.
Authorizations
Bearer token for user session
Headers
User-Agent specified id to track a request
Response
A successful response.
Available options:
UNSPECIFIED, OK, UNKNOWN, CREDENTIALS, SUSPENDED, EXCEPTION, INACTIVE, SIGNEDUPSTATE, UNKNOWNSTATE, CREATEDSTATE, USER_UNKNOWN, ENTERPRISE_UNKNOWN, ROLE_UNKNOWN, USER_UNKNOWNSTATE, USER_INACTIVE, USER_SIGNEDUPSTATE, USER_CREATEDSTATE, ENTERPRISE_UNKNOWNSTATE, ENTERPRISE_INACTIVE, ENTERPRISE_SIGNEDUPSTATE, ENTERPRISE_CREATEDSTATE, CREDENTIAL_NOTFOUND, CREDENTIAL_MISMATCH, SCHEME_UNKNOWN, UPDATE_LOGINTIME_FAILED, CREDENTIAL_MISMATCH_MAX_FAILED_PWD_ATTEMPT, REDIRECT, DECRYPTION_FAILED, PASSWORD_EXPIRED, TOTP_OK, TOTP_INVALID_CODE, TOTP_ERR Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
User meta data
Show child attributes
Show child attributes
Realm meta data
Show child attributes
Show child attributes
Example:
{
"id": "EAJ1ABAi-KOom7dJlrBoE8eq1pj9",
"name": "zededa.com",
"enterpriseId": "AAFlABDe6Nm63ixF5LJBbk9Keqp6",
"title": "zededa",
"description": "Test realm",
"revision": {
"prev": "",
"curr": "1",
"createdAt": "2020-07-17T06:03:14Z",
"createdBy": "us.root@zededa.com",
"updatedAt": "2020-07-17T06:03:14Z",
"updatedBy": "us.root@zededa.com"
}
}
Enterprise meta data
Show child attributes
Show child attributes
Role meta data
Show child attributes
Show child attributes
Example:
{
"id": "AAGFABAEqnH4je5PHZTXSmHOs-XC",
"name": "SysRoot",
"title": "SysRoot",
"description": "",
"revision": {
"prev": "",
"curr": "1",
"createdAt": "2020-07-16T18:19:56Z",
"createdBy": "SYSTEM_ROOT",
"updatedAt": "1970-01-01T00:00:01Z",
"updatedBy": "SYSTEM_ROOT"
},
"type": "USER_ROLE_CLUSTER",
"state": "ROLE_STATE_ACTIVE",
"scopes": [
{
"accessDevice": "PermissionAccessCreateReadUpdateDelete",
"accessApp": "PermissionAccessCreateReadUpdateDelete",
"accessUser": "PermissionAccessCreateReadUpdateDelete",
"accessStorage": "PermissionAccessCreateReadUpdateDelete",
"accessEnterprise": "PermissionAccessCreateReadUpdateDelete",
"enterpriseFilter": ["srAll"],
"projectFilter": ["srAll"]
}
]
}
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?
⌘I
Login externally
curl --request POST \
--url https://{apiHost}/api/v1/login/external \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"usernameAtRealm": "<string>",
"enterpriseName": "<string>",
"redirectUri": "<string>"
}
'import requests
url = "https://{apiHost}/api/v1/login/external"
payload = {
"usernameAtRealm": "<string>",
"enterpriseName": "<string>",
"redirectUri": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
usernameAtRealm: '<string>',
enterpriseName: '<string>',
redirectUri: '<string>'
})
};
fetch('https://{apiHost}/api/v1/login/external', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"cause": "UNSPECIFIED",
"userId": "<string>",
"token": {
"base64": "<string>",
"expires": "<string>"
},
"policies": [
{
"id": "<string>",
"zone": "<string>",
"scope": "PermissionScope__INVALID__",
"access": "PermissionAccess__INVALID__",
"ownerId": "<string>",
"external": true
}
],
"simpleUser": {
"id": "<string>",
"username": "<string>",
"realmId": "<string>",
"state": "USER_STATE_UNSPECIFIED",
"firstName": "<string>"
},
"detailedUser": {
"username": "<string>",
"roleId": "<string>",
"email": "<string>",
"id": "<string>",
"SfdcId": "<string>",
"HubspotId": "<string>",
"revision": {
"curr": "<string>",
"createdAt": {},
"createdBy": "<string>",
"updatedAt": {},
"updatedBy": "<string>",
"prev": "<string>"
},
"state": "USER_STATE_UNSPECIFIED",
"firstName": "<string>",
"locale": "<string>",
"fullName": "<string>",
"timeZone": "<string>",
"type": "AUTH_TYPE_UNSPECIFIED",
"phone": "<string>",
"notifyPref": "<string>",
"LastLoginTime": "2023-11-07T05:31:56Z",
"LastLogoutTime": "2023-11-07T05:31:56Z",
"emailState": "ID_STATE_UNSPECIFIED",
"phoneState": "ID_STATE_UNSPECIFIED",
"customUserInput": {},
"allowedEnterprises": [
{
"id": "<string>",
"name": "<string>",
"roleId": "<string>"
}
],
"enterpriseId": "<string>",
"totpEnabled": true,
"allowedEntpProjectList": {},
"zksSyncStatus": {
"status": "ZKS_SYNC_STATUS_CODE_UNSPECIFIED",
"serverStatuses": [
{
"serverName": "<string>",
"status": "<string>",
"error": "<string>"
}
]
},
"tokenZksSyncStatus": {},
"passwordExpiryNotificationPeriodInSeconds": 123
},
"realm": {
"id": "EAJ1ABAi-KOom7dJlrBoE8eq1pj9",
"name": "zededa.com",
"enterpriseId": "AAFlABDe6Nm63ixF5LJBbk9Keqp6",
"title": "zededa",
"description": "Test realm",
"revision": {
"prev": "",
"curr": "1",
"createdAt": "2020-07-17T06:03:14Z",
"createdBy": "us.root@zededa.com",
"updatedAt": "2020-07-17T06:03:14Z",
"updatedBy": "us.root@zededa.com"
}
},
"enterprise": {
"name": "<string>",
"title": "<string>",
"id": "<string>",
"SfdcId": "<string>",
"HubspotId": "<string>",
"state": "ENTERPRISE_STATE_UNSPECIFIED",
"type": "ENTERPRISE_TYPE_UNSPECIFIED",
"policyList": {
"list": [
{
"Policy": "<string>",
"Version": "<string>",
"AcceptedAt": "2023-11-07T05:31:56Z",
"AcceptedBy": "<string>",
"EffectiveFrom": "2023-11-07T05:31:56Z"
}
]
},
"parentEntpId": "<string>",
"azureSubId": "<string>",
"description": "<string>",
"revision": {
"curr": "<string>",
"createdAt": {},
"createdBy": "<string>",
"updatedAt": {},
"updatedBy": "<string>",
"prev": "<string>"
},
"realms": [
"<string>"
],
"attributes": {},
"inheritAuthFromParent": true,
"childEnterprises": [
{
"name": "<string>",
"id": "<string>"
}
],
"controllerHostURL": "<string>",
"streamEvents": {
"pluginId": "<string>",
"enabled": true
},
"totpSettings": {
"enforce": true,
"enforceInChildren": true,
"enforcedByParent": true
},
"apiTokenExpiryInSeconds": 123
},
"role": {
"id": "AAGFABAEqnH4je5PHZTXSmHOs-XC",
"name": "SysRoot",
"title": "SysRoot",
"description": "",
"revision": {
"prev": "",
"curr": "1",
"createdAt": "2020-07-16T18:19:56Z",
"createdBy": "SYSTEM_ROOT",
"updatedAt": "1970-01-01T00:00:01Z",
"updatedBy": "SYSTEM_ROOT"
},
"type": "USER_ROLE_CLUSTER",
"state": "ROLE_STATE_ACTIVE",
"scopes": [
{
"accessDevice": "PermissionAccessCreateReadUpdateDelete",
"accessApp": "PermissionAccessCreateReadUpdateDelete",
"accessUser": "PermissionAccessCreateReadUpdateDelete",
"accessStorage": "PermissionAccessCreateReadUpdateDelete",
"accessEnterprise": "PermissionAccessCreateReadUpdateDelete",
"enterpriseFilter": [
"srAll"
],
"projectFilter": [
"srAll"
]
}
]
},
"noOfLoginAttemptsLeft": 123,
"redirectUrl": "<string>",
"loginToken": {
"base64": "<string>",
"expires": "<string>"
},
"apiToken": {
"base64": "<string>",
"expires": "<string>"
},
"passwordExpiryTime": "2023-11-07T05:31:56Z",
"passwordExpiryNotificationPeriodInSeconds": 123,
"tempToken": {
"base64": "<string>",
"expires": "<string>"
}
}{
"operationType": "OPS_TYPE_UNSPECIFIED",
"operationStatus": "OPS_STATUS_UNSPECIFIED",
"objectKind": "<string>",
"objectId": "<string>",
"objectName": "<string>",
"objectRevision": "<string>",
"objectType": "OBJECT_TYPE_UNSPECIFIED",
"operationTime": "<string>",
"startTime": "<string>",
"endTime": "<string>",
"user": "<string>",
"httpStatusCode": 123,
"httpStatusMsg": "<string>",
"jobId": "<string>",
"error": [
{
"ec": "zMsgErrorNone",
"location": "<string>",
"details": "<string>"
}
]
}{
"operationType": "OPS_TYPE_UNSPECIFIED",
"operationStatus": "OPS_STATUS_UNSPECIFIED",
"objectKind": "<string>",
"objectId": "<string>",
"objectName": "<string>",
"objectRevision": "<string>",
"objectType": "OBJECT_TYPE_UNSPECIFIED",
"operationTime": "<string>",
"startTime": "<string>",
"endTime": "<string>",
"user": "<string>",
"httpStatusCode": 123,
"httpStatusMsg": "<string>",
"jobId": "<string>",
"error": [
{
"ec": "zMsgErrorNone",
"location": "<string>",
"details": "<string>"
}
]
}{
"operationType": "OPS_TYPE_UNSPECIFIED",
"operationStatus": "OPS_STATUS_UNSPECIFIED",
"objectKind": "<string>",
"objectId": "<string>",
"objectName": "<string>",
"objectRevision": "<string>",
"objectType": "OBJECT_TYPE_UNSPECIFIED",
"operationTime": "<string>",
"startTime": "<string>",
"endTime": "<string>",
"user": "<string>",
"httpStatusCode": 123,
"httpStatusMsg": "<string>",
"jobId": "<string>",
"error": [
{
"ec": "zMsgErrorNone",
"location": "<string>",
"details": "<string>"
}
]
}{
"operationType": "OPS_TYPE_UNSPECIFIED",
"operationStatus": "OPS_STATUS_UNSPECIFIED",
"objectKind": "<string>",
"objectId": "<string>",
"objectName": "<string>",
"objectRevision": "<string>",
"objectType": "OBJECT_TYPE_UNSPECIFIED",
"operationTime": "<string>",
"startTime": "<string>",
"endTime": "<string>",
"user": "<string>",
"httpStatusCode": 123,
"httpStatusMsg": "<string>",
"jobId": "<string>",
"error": [
{
"ec": "zMsgErrorNone",
"location": "<string>",
"details": "<string>"
}
]
}{
"code": 123,
"message": "<string>",
"details": [
{
"typeUrl": "<string>",
"value": "aSDinaTvuI8gbWludGxpZnk="
}
]
}