import requests
url = "https://platform.ankra.app/api/v1/org/secret-slots/{slot_id}"
payload = { "value": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({value: '<string>'})
};
fetch('https://platform.ankra.app/api/v1/org/secret-slots/{slot_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PUT \
--url https://platform.ankra.app/api/v1/org/secret-slots/{slot_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"value": "<string>"
}
'{
"slot_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"label": "<string>",
"hint": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"last_accessed_at": "2023-11-07T05:31:56Z",
"access_count": 123,
"sentinel": "<string>",
"created_via": "user",
"pinned_at": "2023-11-07T05:31:56Z",
"references": [
{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_name": "<string>",
"resource_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"resource_kind": "<string>",
"resource_name": "<string>",
"document_path": "<string>",
"last_seen_at": "2023-11-07T05:31:56Z"
}
],
"created_by_user_id": "<string>"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Replace a secret slot value
import requests
url = "https://platform.ankra.app/api/v1/org/secret-slots/{slot_id}"
payload = { "value": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({value: '<string>'})
};
fetch('https://platform.ankra.app/api/v1/org/secret-slots/{slot_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PUT \
--url https://platform.ankra.app/api/v1/org/secret-slots/{slot_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"value": "<string>"
}
'{
"slot_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"label": "<string>",
"hint": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"last_accessed_at": "2023-11-07T05:31:56Z",
"access_count": 123,
"sentinel": "<string>",
"created_via": "user",
"pinned_at": "2023-11-07T05:31:56Z",
"references": [
{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_name": "<string>",
"resource_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"resource_kind": "<string>",
"resource_name": "<string>",
"document_path": "<string>",
"last_seen_at": "2023-11-07T05:31:56Z"
}
],
"created_by_user_id": "<string>"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"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
The secret slot's id, the <slot_id> in its ${SECRET_SLOT:<slot_id>} sentinel.
Body
- SecretSlotReplaceValue
- SecretSlotReplaceGenerate
Send exactly one of value or generate.
The new secret value.
1Response
The slot after the replacement
A secret slot without its value, which is never returned.
The slot's name, unique in the organisation.
A note about what the secret is for, or null.
When the slot expires, or null when it does not.
When the value was last read, or null.
How many times the value has been read.
${SECRET_SLOT:<slot_id>}: put this where the value belongs.
user when a person supplied the current value, generated when Ankra created it.
user, generated When the slot was pinned so it does not expire, or null.
The live resources that carry the sentinel.
Show child attributes
Show child attributes
The user who created the slot, or null when unknown.