API token authentication for Idira Identity Security Platform
This page provides service API URLs for Idira Identity Security Platform APIs and describes how to generate and use an access token for authentication.
Service API URLs
The following table lists the service API URLs:
| Service name | Service API URL |
|---|---|
| Access Control Policies | https://<subdomain>.uap.cyberark.cloud/api |
| Access Request | https://<subdomain>.uar.cyberark.cloud/api |
| Cloud Discovery Service | https://<subdomain>.cds.cyberark.cloud/api |
| Cloud Visibility (CV) | https://<subdomain>.cem.cyberark.cloud/api |
| Connector Management | https://<subdomain>.connectormanagement.cyberark.cloud/api |
| Discovery & Context | https://<subdomain>.inventory.cyberark.cloud/api/graphql |
| Privilege Cloud | Gen 3 (recommended):https://<subdomain>.privilegecloud.cyberark.cloud/apiGen 2: https://<subdomain>.privilegecloud.cyberark.cloud/PasswordVault/API |
| Risk Management | https://<subdomain>.compass.cyberark.cloud/api |
| Secrets Hub | https://<subdomain>.secretshub.cyberark.cloud/api |
| Secure Access | https://<subdomain>-userportal.cyberark.cloud/api |
| Secure Cloud Access (SCA) | https://<subdomain>.sca.cyberark.cloud/api |
| Secure Infrastructure Access (SIA) | https://<subdomain>.dpa.cyberark.cloud/api |
Get platform token for API authentication
A platform token is a short-lived bearer token issued by the Idira Identity Security Platform. The steps below walk you through creating a service account, generating the token, and using it to authenticate requests to the service APIs listed above.
Note:
- Secure Cloud Access APIs and Access Control Policies APIs (for cloud console and group assignment policies only), use a custom OAuth2 token instead of the platform token. For details on setting this up, see SCA-related API authentication.
- For information about other authentication methods, see the Developer resources documentation.
Step 1: Create an ISPSS service account
In the Idira Identity Security Platform portal, create an OAuth service user:
Go to Manage > Inventory > Identities > Users, then click Add User and fill out the following fields:
Login nameDisplay namePassword
Note: You need the
Login nameandPasswordvalues in Step 2 below.In the Status checklist, select the Is OAuth confidential client checkbox.
The following checkboxes are automatically selected:
- Is Service User
- Password never expires
Click Create User.
To enable authenticating with the token to the ISPSS APIs, add the service user to the required role:
Go to Manage > Inventory > Identities > Roles, then select the relevant role and add the service user as a member.
For example, to enable authenticating to SIA APIs, add the service user to the DpaAdmin role (see ISPSS user roles for more information).
Note: Service users are not displayed in the list of active users as they do not access the Idira Identity Security Platform portal. To view service users, click All Users or All Service Users.
Step 2: Get the bearer token
To get a bearer token for ISPSS APIs, call the platformtoken endpoint. The endpoint returns a JSON object with the token used to authenticate ISPSS API calls (in the access_token field).
Request URL
POST https://<identity-tenant-id>.id.cyberark.cloud/oauth2/platformtoken
Request body
A URL-encoded form with the following fields:
grant_type: must beclient_credentialsclient_id: the login name of the service account you created in Step 1 aboveclient_secret: the password of the service account you created in Step 1 above
Example request
The request below returns a token for a service account with the these credentials:
- username:
[email protected] - password:
myAPIpassword1!
POST /oauth2/platformtoken
Host: hostname.id.cyberark.cloud
content-type: application/x-www-form-urlencoded
grant_type=client_credentials&client_id=api%40cyberark.cloud&client_secret=myAPIpassword1!Success response code
200
Success response body
A JSON object with the bearer token specified in the access_token field.
Example response
200 OK
Content-Type: application/json
{
"access_token": "eyJh...",
"token_type": "Bearer",app://resources/notifications.html#
"expires_in": 900
}Step 3: Send requests to your service APIs
Add the token returned from the platformtoken endpoint as an Authorization header:
Authorization: Bearer <token>
Where <token> is the value of access_token returned in the platformtoken response.
For example:
GET https://hostname.dpa.cyberark.cloud/api/settings
Authorization: Bearer eyJh...Back to Idira API Home