import requests
url = "https://platform.ankra.app/api/v1/org/credentials/{credential_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/org/credentials/{credential_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://platform.ankra.app/api/v1/org/credentials/{credential_id} \
--header 'Authorization: Bearer <token>'{
"created_at": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"organisation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"provider": "<string>",
"updated_at": "<string>",
"access_key": "<string>",
"access_key_id": "<string>",
"access_token": "<string>",
"api_url": "<string>",
"application_key": "<string>",
"application_secret": "<string>",
"available": true,
"clusters": [],
"consumer_key": "<string>",
"gitlab_url": "<string>",
"display_name": "<string>",
"operations": [],
"project_id": "<string>",
"role_arn": "<string>",
"secret_access_key": "<string>",
"ssh_public_key": "<string>",
"fingerprint": "<string>",
"key_type": "<string>",
"comment": "<string>",
"fingerprint_error": "<string>",
"system": false,
"tls_insecure": true,
"token": "<string>",
"token_id": "<string>",
"username": "<string>"
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Get credential details
Returns one credential including its decrypted secret material, and records the read in the audit log. Requires credentials.reveal; answers 404 when the credential does not exist. An SSH-key credential is the exception: it stores only a public key, which is not a secret, so its detail (the public key with its fingerprint, key type and comment, and the clusters it is attached to) answers on credentials.read and records no reveal.
import requests
url = "https://platform.ankra.app/api/v1/org/credentials/{credential_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/org/credentials/{credential_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://platform.ankra.app/api/v1/org/credentials/{credential_id} \
--header 'Authorization: Bearer <token>'{
"created_at": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"organisation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"provider": "<string>",
"updated_at": "<string>",
"access_key": "<string>",
"access_key_id": "<string>",
"access_token": "<string>",
"api_url": "<string>",
"application_key": "<string>",
"application_secret": "<string>",
"available": true,
"clusters": [],
"consumer_key": "<string>",
"gitlab_url": "<string>",
"display_name": "<string>",
"operations": [],
"project_id": "<string>",
"role_arn": "<string>",
"secret_access_key": "<string>",
"ssh_public_key": "<string>",
"fingerprint": "<string>",
"key_type": "<string>",
"comment": "<string>",
"fingerprint_error": "<string>",
"system": false,
"tls_insecure": true,
"token": "<string>",
"token_id": "<string>",
"username": "<string>"
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Response
Credential retrieved successfully
- GetPlatformCredentialResult
- GetCredentialResult
The clusters using the credential, each as {id, name, kind, created_at}. For an ssh-key credential these are the clusters whose SSH-key resource holds its public key - the keys a cluster was created with and every key attached since through PUT /api/v1/clusters/{provider}/{cluster_id}/ssh-keys, the same set that route's GET reads back.
The stored OpenSSH public key of an ssh-key credential; null on every other provider.
Set on ssh-key credentials only: the OpenSSH SHA256 fingerprint of the stored public key, in the form ssh-keygen -l prints (SHA256: followed by the unpadded base64 digest). Null when the stored value is not a readable key; fingerprint_error then says why.
Set on ssh-key credentials only: the key algorithm the public key declares, such as ssh-ed25519 or ssh-rsa. Null when the stored value is not a readable key.
Set on ssh-key credentials only: the comment after the key material, an empty string when the key has none. Null when the stored value is not a readable key.
Set on ssh-key credentials only: why the stored value could not be read as an OpenSSH public key, and null when it could. A non-null value means the fingerprint is unknown, not that the credential holds no key.