import requests
url = "https://platform.ankra.app/api/v1/org/secret-slots"
payload = { "label": "<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({label: '<string>'})
};
fetch('https://platform.ankra.app/api/v1/org/secret-slots', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://platform.ankra.app/api/v1/org/secret-slots \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"label": "<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>"
}
]
}Create a secret slot
import requests
url = "https://platform.ankra.app/api/v1/org/secret-slots"
payload = { "label": "<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({label: '<string>'})
};
fetch('https://platform.ankra.app/api/v1/org/secret-slots', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://platform.ankra.app/api/v1/org/secret-slots \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"label": "<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.
Body
Send value or generate, not both.
The slot's name, unique in the organisation, with no line breaks.
120The secret value. Leave it out when sending generate.
1A note about what the secret is for.
240How long the slot lives, in seconds. Leave it out for a slot that does not expire. A generated slot is the exception: it defaults to one day and cannot live longer than a week.
Have Ankra create a random value that nobody sees.
Show child attributes
Show child attributes
Response
The new slot
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.