import requests
url = "https://platform.ankra.app/api/v1/org/applications/{application_id}/demos"
payload = {}
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({})
};
fetch('https://platform.ankra.app/api/v1/org/applications/{application_id}/demos', 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/applications/{application_id}/demos \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'{
"branch": "<string>",
"image": "<string>",
"namespace": "<string>",
"pr_number": 123,
"service_dns": "<string>",
"status": "<string>",
"ttl_hours": 123,
"workspace_id": "<string>",
"preview_url": "<string>",
"components": [
{
"name": "<string>",
"image": "<string>",
"image_tag": "<string>",
"container_port": 123,
"entry": true,
"ingress_path": "<string>"
}
]
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "<string>"
}Deploy Application Demo
Deploy a throwaway demo of the application onto the organisation’s staging cluster. Provide exactly one of branch or a positive pr_number; PR demos additionally require an explicit image_tag. Launch env entries are merged over the application’s saved demo defaults (overrides win by name) and database overrides the saved throwaway-database default (null keeps it). 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).
import requests
url = "https://platform.ankra.app/api/v1/org/applications/{application_id}/demos"
payload = {}
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({})
};
fetch('https://platform.ankra.app/api/v1/org/applications/{application_id}/demos', 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/applications/{application_id}/demos \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'{
"branch": "<string>",
"image": "<string>",
"namespace": "<string>",
"pr_number": 123,
"service_dns": "<string>",
"status": "<string>",
"ttl_hours": 123,
"workspace_id": "<string>",
"preview_url": "<string>",
"components": [
{
"name": "<string>",
"image": "<string>",
"image_tag": "<string>",
"container_port": 123,
"entry": true,
"ingress_path": "<string>"
}
]
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
The deploy-demo body. Provide exactly one of branch or a positive pr_number; PR demos additionally require an explicit image_tag.
Null resolves the application's default demo container port.
Overrides the application's saved throwaway-database default; null keeps it.
Per-launch env overrides, merged over the application's saved demo defaults (overrides win by name). Secret values ride as ${SECRET_SLOT:} sentinels.
Show child attributes
Show child attributes
Null resolves the branch's built image via the build check.
At least 1 and at most the caller's role-capped maximum; null applies the policy default.
Subset of a monorepo's components to deploy with optional per-component overrides; omitted deploys every recorded component.
Show child attributes
Show child attributes
Names the component that owns the demo host's root path; omitted applies the entry heuristic.