Set an application environment secret
import requests
url = "https://platform.ankra.app/api/v1/org/applications/{application_id}/env-secrets/{secret_key}"
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/applications/{application_id}/env-secrets/{secret_key}', 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/applications/{application_id}/env-secrets/{secret_key} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"value": "<string>"
}
'{
"key": "<string>",
"required": true,
"status": "set",
"updated_at": "<string>",
"updated_by": "<string>",
"optional": true,
"source": "shared"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "<string>"
}Applications
Set an application environment secret
Store the value of one environment secret, creating the entry or rotating it in place. The value goes to the platform secret store; the deploy renders it into the <app>-env Secret, encrypted with SOPS to the organisation's age recipient before it is stored or pushed to Git. The value is not echoed in the response and is never logged. Takes effect on the application's next deploy. A browser session twin is mounted at the same path without the /api/v1 prefix (cookie authentication plus the X-Ankra-CSRF double-submit header). With environment_id, resolve or modify only that environment; deletion suppresses a shared default locally, and apply never changes another target. Without it, existing shared catalogue behaviour is retained; all-target apply still preserves environment overrides.
PUT
/
api
/
v1
/
org
/
applications
/
{application_id}
/
env-secrets
/
{secret_key}
Set an application environment secret
import requests
url = "https://platform.ankra.app/api/v1/org/applications/{application_id}/env-secrets/{secret_key}"
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/applications/{application_id}/env-secrets/{secret_key}', 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/applications/{application_id}/env-secrets/{secret_key} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"value": "<string>"
}
'{
"key": "<string>",
"required": true,
"status": "set",
"updated_at": "<string>",
"updated_by": "<string>",
"optional": true,
"source": "shared"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "<string>"
}Authorizations
Query Parameters
Select an owned canonical application environment, including a planned environment. A legacy cluster ID is accepted only when it identifies one complete environment, or an unassigned legacy cluster. Mixed or partial aliases return 409; refresh and select the canonical ID. Empty or repeated values are refused. Omit only for shared catalogue management or application-wide apply.
Body
application/json
Response
The catalogued key after the write. It carries no value.
One key of an application's -env Secret. The stored value is never part of this model - no endpoint on this surface returns one.