Deploy an application demo
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>"
}Applications
Deploy an 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).
POST
/
api
/
v1
/
org
/
applications
/
{application_id}
/
demos
Deploy an application demo
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
Body
application/json
The deploy-demo body. Provide exactly one of branch or a positive pr_number; PR demos additionally require an explicit image_tag.