import requests
url = "https://platform.ankra.app/api/v1/org/applications/{application_id}/demos"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
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 GET \
--url https://platform.ankra.app/api/v1/org/applications/{application_id}/demos \
--header 'Authorization: Bearer <token>'{
"default_container_port": 123,
"demos": [
{
"application_id": "<string>",
"branch": "<string>",
"cluster_id": "<string>",
"container_port": 123,
"created_at": "2023-11-07T05:31:56Z",
"created_by_user_id": "<string>",
"database": true,
"expires_at": "2023-11-07T05:31:56Z",
"head_sha": "<string>",
"id": "<string>",
"image_tag": "<string>",
"kind": "<string>",
"last_error": "<string>",
"namespace": "<string>",
"pod_name": "<string>",
"pr_number": 123,
"preview_url": "<string>",
"repos": [
{
"name": "<string>",
"path": "<string>",
"url": "<string>"
}
],
"status": "<string>",
"component": "<string>",
"detected_container_port": 123,
"port_corrected_at": "2023-11-07T05:31:56Z",
"demo_base_stack_error": "<string>",
"demo_base_stack_id": "<string>",
"demo_base_stack_name": "<string>",
"demo_base_stack_status": "<string>",
"demo_stack_error": "<string>",
"demo_stack_name": "<string>",
"demo_stack_status": "<string>",
"environment": [
{
"name": "<string>",
"secret": true
}
],
"preview_dns_unconfirmed_at": "2023-11-07T05:31:56Z",
"stack_profile_name": "<string>",
"provisioning_deadline_at": "2023-11-07T05:31:56Z",
"provisioning_timeout_seconds": 123,
"components": [
{
"name": "<string>",
"container_port": 123,
"image_tag": "<string>",
"ingress_path": "<string>",
"entry": true,
"detected_container_port": 123,
"port_corrected_at": "2023-11-07T05:31:56Z"
}
]
}
],
"staging": {
"agent_online": true,
"cluster_id": "<string>",
"cluster_name": "<string>",
"configured": true
},
"ttl": {
"can_deploy": true,
"default_ttl_hours": 123,
"max_ttl_hours": 123
}
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Get Application Demos
Return the application’s active demos plus everything the demos tab needs in one round-trip: the caller’s TTL policy, the staging-cluster status, and the default container port (the generated Dockerfile’s EXPOSE port when known). A browser session twin is mounted at the same path without the /api/v1 prefix (cookie authentication).
import requests
url = "https://platform.ankra.app/api/v1/org/applications/{application_id}/demos"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
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 GET \
--url https://platform.ankra.app/api/v1/org/applications/{application_id}/demos \
--header 'Authorization: Bearer <token>'{
"default_container_port": 123,
"demos": [
{
"application_id": "<string>",
"branch": "<string>",
"cluster_id": "<string>",
"container_port": 123,
"created_at": "2023-11-07T05:31:56Z",
"created_by_user_id": "<string>",
"database": true,
"expires_at": "2023-11-07T05:31:56Z",
"head_sha": "<string>",
"id": "<string>",
"image_tag": "<string>",
"kind": "<string>",
"last_error": "<string>",
"namespace": "<string>",
"pod_name": "<string>",
"pr_number": 123,
"preview_url": "<string>",
"repos": [
{
"name": "<string>",
"path": "<string>",
"url": "<string>"
}
],
"status": "<string>",
"component": "<string>",
"detected_container_port": 123,
"port_corrected_at": "2023-11-07T05:31:56Z",
"demo_base_stack_error": "<string>",
"demo_base_stack_id": "<string>",
"demo_base_stack_name": "<string>",
"demo_base_stack_status": "<string>",
"demo_stack_error": "<string>",
"demo_stack_name": "<string>",
"demo_stack_status": "<string>",
"environment": [
{
"name": "<string>",
"secret": true
}
],
"preview_dns_unconfirmed_at": "2023-11-07T05:31:56Z",
"stack_profile_name": "<string>",
"provisioning_deadline_at": "2023-11-07T05:31:56Z",
"provisioning_timeout_seconds": 123,
"components": [
{
"name": "<string>",
"container_port": 123,
"image_tag": "<string>",
"ingress_path": "<string>",
"entry": true,
"detected_container_port": 123,
"port_corrected_at": "2023-11-07T05:31:56Z"
}
]
}
],
"staging": {
"agent_online": true,
"cluster_id": "<string>",
"cluster_name": "<string>",
"configured": true
},
"ttl": {
"can_deploy": true,
"default_ttl_hours": 123,
"max_ttl_hours": 123
}
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Response
Successful Response
The application's active demos plus everything the demos tab needs in one round-trip.
The port a demo of this application should target by default (the generated Dockerfile's EXPOSE port when known).
Show child attributes
Show child attributes
The staging-cluster status the demos tab renders.
Show child attributes
Show child attributes
The caller-specific TTL contract the demos tab renders: the pre-filled default, the role-capped maximum, and whether the caller may deploy at all.
Show child attributes
Show child attributes