import requests
url = "https://platform.ankra.app/api/v1/org/stack-profiles/{profile_id}/demos/{workspace_id}/connection-proposal"
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/stack-profiles/{profile_id}/demos/{workspace_id}/connection-proposal', 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/stack-profiles/{profile_id}/demos/{workspace_id}/connection-proposal \
--header 'Authorization: Bearer <token>'{
"demo_status": "<string>",
"observable": true,
"reason": "<string>",
"observed_services": 123,
"observed_secrets": 123,
"proposals": [
{
"connection": {
"protocol": "<string>",
"endpoints": [
{
"name": "<string>",
"scheme": "<string>",
"service": "<string>",
"port": 123
}
],
"secret_name": "<string>",
"secret_keys": [
"<string>"
],
"fields": {}
},
"complete": true,
"confidence": "high",
"unresolved": [
"<string>"
],
"reasons": [
"<string>"
]
}
],
"note": "<string>"
}Propose a service connection from a demo
Observes one running demo of a stack profile on the organisation’s staging cluster and proposes the connection blocks a service package built from the profile could declare: one per Service port speaking PostgreSQL, Redis, NATS, OpenSearch, S3, VictoriaLogs or VictoriaMetrics, with each field mapped to a key of the Secret that holds the most of its credentials. Only Service ports and Secret key names are read, never Secret values, and nothing is written or tried. observable false means the demo’s namespace could not be observed yet (the demo is not ready, or the staging cluster could not list its Services and Secrets) and reason says why; it is never an empty answer. Publishing the package lets the readiness canary verify the connection.
import requests
url = "https://platform.ankra.app/api/v1/org/stack-profiles/{profile_id}/demos/{workspace_id}/connection-proposal"
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/stack-profiles/{profile_id}/demos/{workspace_id}/connection-proposal', 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/stack-profiles/{profile_id}/demos/{workspace_id}/connection-proposal \
--header 'Authorization: Bearer <token>'{
"demo_status": "<string>",
"observable": true,
"reason": "<string>",
"observed_services": 123,
"observed_secrets": 123,
"proposals": [
{
"connection": {
"protocol": "<string>",
"endpoints": [
{
"name": "<string>",
"scheme": "<string>",
"service": "<string>",
"port": 123
}
],
"secret_name": "<string>",
"secret_keys": [
"<string>"
],
"fields": {}
},
"complete": true,
"confidence": "high",
"unresolved": [
"<string>"
],
"reasons": [
"<string>"
]
}
],
"note": "<string>"
}Authorizations
Response
The proposals, or why the demo could not be observed