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": "permission_denied",
"permission": "<string>",
"scope_type": "<string>"
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Secret Slots
Create a secret slot
Stores a secret in Vault and returns its slot, whose sentinel ${SECRET_SLOT:<slot_id>} can stand in for the value in manifests, addon values and MCP server env. Send either value or generate: generate has Ankra create a random value that nobody sees. The value is never returned.
POST
/
api
/
v1
/
org
/
secret-slots
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": "permission_denied",
"permission": "<string>",
"scope_type": "<string>"
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Body
application/json
Send value or generate, not both.
Response
The new slot
A secret slot without its value, which is never returned.