Rename an application environment (browser session)
import requests
url = "https://platform.ankra.app/org/applications/{application_id}/environments/{environment_id}"
payload = { "name": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>'})
};
fetch('https://platform.ankra.app/org/applications/{application_id}/environments/{environment_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PATCH \
--url https://platform.ankra.app/org/applications/{application_id}/environments/{environment_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>"
}
'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
}{
"detail": "<string>",
"error_code": "environment_name_invalid"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>",
"error_code": "environment_name_invalid"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "<string>"
}Applications
Rename an application environment (browser session)
Renames one named environment of the application. Only the name changes: its identity, role, order and deployments stay as they are, and the change is audited. An environment still named after its cluster cannot be renamed yet (409 environment_named_after_cluster). Held to the applications.write permission.
PATCH
/
org
/
applications
/
{application_id}
/
environments
/
{environment_id}
Rename an application environment (browser session)
import requests
url = "https://platform.ankra.app/org/applications/{application_id}/environments/{environment_id}"
payload = { "name": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>'})
};
fetch('https://platform.ankra.app/org/applications/{application_id}/environments/{environment_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PATCH \
--url https://platform.ankra.app/org/applications/{application_id}/environments/{environment_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>"
}
'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
}{
"detail": "<string>",
"error_code": "environment_name_invalid"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>",
"error_code": "environment_name_invalid"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
The new name. Trimmed; 1 to 100 characters with no control characters; unique within the application ignoring case.
Required string length:
1 - 100