ObtainCredential
Retrieves the plaintext of a secret.
Operation description
This API uses an access token from IDaaS for authentication and authorization.
The access token must have permissions to obtain static credentials for the built-in privileged access management (PAM) application in IDaaS.
The required scope is urn:cloud:idaas:pam|credential:obtain.
Try it now
Test
RAM authorization
Request syntax
GET /v2/{instanceId}/credentials/_/actions/obtain HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| instanceId |
string |
Yes |
The ID of the IDaaS instance. |
idaas_ue2jvisn35ea5lmthk267xxxxx |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| Authorization |
string |
Yes |
Authentication information. The format is Note
Use an access token issued by IDaaS. |
Bearer xxxxxx |
| credentialIdentifier |
string |
Yes |
The identifier for the credential to obtain. |
credential_identifier_test |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| instanceId |
string |
The EIAM instance ID. |
idaas_ue2jvisn35ea5lmthk267xxxxx |
| credentialId |
string |
The credential ID. |
cred_mkv7rgt4d7i4u7zqtzev2mxxxx |
| status |
string |
The status of the credential. Valid values:
|
enabled |
| credentialIdentifier |
string |
The credential identifier. |
credential_identifier_test |
| credentialName |
string |
The credential name. |
credential_name |
| credentialSubjectType |
string |
The credential's subject type. Valid values:
|
authentication_token_provider |
| credentialSubjectId |
string |
The ID of the credential's subject. |
apt_werthgfdsasffxxxxx |
| credentialScenarioLabel |
string |
The usage scenario for the credential. Valid values:
|
llm |
| credentialType |
string |
The credential type. Valid values:
|
api_key |
| credentialCreationType |
string |
Indicates how the credential was created. Valid values:
|
user_custom |
| description |
string |
The credential description. |
credential_description |
| createTime |
integer |
The creation time of the credential, formatted as a Unix timestamp in milliseconds. |
1649830225000 |
| updateTime |
integer |
The last update time of the credential, formatted as a Unix timestamp in milliseconds. |
1649830227000 |
| credentialContent |
object |
The detailed content of the credential. The structure of this object depends on the value of |
|
| oauthClientContent |
object |
Contains details for an OAuth client credential. Returned only when |
|
| clientId |
string |
The |
dmvncmxersdxxxxxx |
| clientSecret |
string |
The |
nsklnertyt5ddwizncxxxx |
| apiKeyContent |
object |
Contains details for an API key credential. Returned only when |
|
| apiKey |
string |
The API key value. |
sk-nsklncmwizncxxxx |
| credentialSharingScope |
string |
The sharing scope of the credential, such as whether it is exclusive to a specific account. |
user_exclusive |
| exclusiveUserId |
string |
The ID of the account that exclusively owns the credential. This field is present only when |
user_xxx |
| credentialExternalId |
string |
Examples
Success response
JSON format
{
"instanceId": "idaas_ue2jvisn35ea5lmthk267xxxxx",
"credentialId": "cred_mkv7rgt4d7i4u7zqtzev2mxxxx",
"status": "enabled",
"credentialIdentifier": "credential_identifier_test",
"credentialName": "credential_name",
"credentialSubjectType": "authentication_token_provider",
"credentialSubjectId": "apt_werthgfdsasffxxxxx",
"credentialScenarioLabel": "llm",
"credentialType": "api_key",
"credentialCreationType": "user_custom",
"description": "credential_description",
"createTime": 1649830225000,
"updateTime": 1649830227000,
"credentialContent": {
"oauthClientContent": {
"clientId": "dmvncmxersdxxxxxx",
"clientSecret": "nsklnertyt5ddwizncxxxx"
},
"apiKeyContent": {
"apiKey": "sk-nsklncmwizncxxxx\n"
}
},
"credentialSharingScope": "user_exclusive",
"exclusiveUserId": "user_xxx",
"credentialExternalId": ""
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.