import requests
url = "https://platform.ankra.app/api/v1/org/applications/{application_id}/demos/{workspace_id}/detail"
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/{workspace_id}/detail', 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/{workspace_id}/detail \
--header 'Authorization: Bearer <token>'{
"can_deploy": true,
"demo": {
"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"
}
]
},
"inspection": {
"cluster_reachable": true,
"containers": [
"<string>"
],
"elapsed_seconds": 123,
"events": [
{
"count": 123,
"message": "<string>",
"object": "<string>",
"reason": "<string>",
"timestamp": "<string>",
"type": "<string>"
}
],
"pod_names": [
"<string>"
],
"resources": [
{
"ankra": true,
"facts": [
{
"label": "<string>",
"value": "<string>"
}
],
"kind": "<string>",
"manifest": {},
"manifest_source": "<string>",
"name": "<string>",
"present": true,
"purpose": "<string>",
"status": "ready",
"component": "<string>"
}
],
"steps": [
{
"detail": "<string>",
"key": "namespace",
"label": "<string>",
"status": "pending"
}
],
"timeout_seconds": 123,
"unreachable_reason": "<string>",
"unreadable_kinds": [
"<string>"
]
},
"staging": {
"agent_online": true,
"cluster_id": "<string>",
"cluster_name": "<string>",
"configured": true
}
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Get Application Demo Detail
Return the demo record plus the live picture of its namespace on the staging cluster: the derived provisioning steps, the bill of materials, the namespace’s Kubernetes events, and the pod/container names that drive the log viewer. A malformed workspace_id is reported as the same 404 as an unknown demo. 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/{workspace_id}/detail"
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/{workspace_id}/detail', 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/{workspace_id}/detail \
--header 'Authorization: Bearer <token>'{
"can_deploy": true,
"demo": {
"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"
}
]
},
"inspection": {
"cluster_reachable": true,
"containers": [
"<string>"
],
"elapsed_seconds": 123,
"events": [
{
"count": 123,
"message": "<string>",
"object": "<string>",
"reason": "<string>",
"timestamp": "<string>",
"type": "<string>"
}
],
"pod_names": [
"<string>"
],
"resources": [
{
"ankra": true,
"facts": [
{
"label": "<string>",
"value": "<string>"
}
],
"kind": "<string>",
"manifest": {},
"manifest_source": "<string>",
"name": "<string>",
"present": true,
"purpose": "<string>",
"status": "ready",
"component": "<string>"
}
],
"steps": [
{
"detail": "<string>",
"key": "namespace",
"label": "<string>",
"status": "pending"
}
],
"timeout_seconds": 123,
"unreachable_reason": "<string>",
"unreadable_kinds": [
"<string>"
]
},
"staging": {
"agent_online": true,
"cluster_id": "<string>",
"cluster_name": "<string>",
"configured": true
}
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Response
Successful Response
The demo record plus the live picture of its namespace on the staging cluster.
One ephemeral PR or branch demo record. kind is pr_demo or branch_demo; status is one of pending, provisioning, ready, failed, tearing_down, destroyed.
Show child attributes
Show child attributes
The full live picture of one demo, read from the staging cluster in one uncached pass. cluster_reachable false means the staging cluster or its agent could not be reached; steps and resources are then empty rather than misleadingly showing nothing-has-happened-yet.
Show child attributes
Show child attributes
The staging-cluster status the demos tab renders.
Show child attributes
Show child attributes