import requests
url = "https://platform.ankra.app/org/stack-profiles/{profile_id}/demos/{workspace_id}/connection-probes"
payload = { "connection": {
"protocol": "<string>",
"endpoints": [
{
"name": "<string>",
"scheme": "<string>",
"service": "<string>",
"port": 123
}
],
"secret_name": "<string>",
"secret_keys": ["<string>"],
"fields": {}
} }
headers = {
"cookie": "ankra_session=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {cookie: 'ankra_session=', 'Content-Type': 'application/json'},
body: JSON.stringify({
connection: {
protocol: '<string>',
endpoints: [{name: '<string>', scheme: '<string>', service: '<string>', port: 123}],
secret_name: '<string>',
secret_keys: ['<string>'],
fields: {}
}
})
};
fetch('https://platform.ankra.app/org/stack-profiles/{profile_id}/demos/{workspace_id}/connection-probes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://platform.ankra.app/org/stack-profiles/{profile_id}/demos/{workspace_id}/connection-probes \
--header 'Content-Type: application/json' \
--cookie ankra_session= \
--data '
{
"connection": {
"protocol": "<string>",
"endpoints": [
{
"name": "<string>",
"scheme": "<string>",
"service": "<string>",
"port": 123
}
],
"secret_name": "<string>",
"secret_keys": [
"<string>"
],
"fields": {}
}
}
'{
"probe_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "queued",
"verdict": "passed",
"cause": "<string>",
"reason": "<string>",
"requested_at": "2023-11-07T05:31:56Z",
"probed_at": "2023-11-07T05:31:56Z"
}Probe a proposed connection on a demo (browser session)
Requests a probe of a proposed connection block against one running demo of a stack profile: the connection’s own canary (PostgreSQL’s SELECT 1, or the protocol’s pod canary) runs in the demo’s namespace on the organisation’s staging cluster, before any package is published. The connection is validated as publishing validates it, and a credential given as a literal is refused, because the request is stored. The probe runs in the background; the answer is the queued probe, to be read back by probe_id. Requires stacks.deploy.
import requests
url = "https://platform.ankra.app/org/stack-profiles/{profile_id}/demos/{workspace_id}/connection-probes"
payload = { "connection": {
"protocol": "<string>",
"endpoints": [
{
"name": "<string>",
"scheme": "<string>",
"service": "<string>",
"port": 123
}
],
"secret_name": "<string>",
"secret_keys": ["<string>"],
"fields": {}
} }
headers = {
"cookie": "ankra_session=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {cookie: 'ankra_session=', 'Content-Type': 'application/json'},
body: JSON.stringify({
connection: {
protocol: '<string>',
endpoints: [{name: '<string>', scheme: '<string>', service: '<string>', port: 123}],
secret_name: '<string>',
secret_keys: ['<string>'],
fields: {}
}
})
};
fetch('https://platform.ankra.app/org/stack-profiles/{profile_id}/demos/{workspace_id}/connection-probes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://platform.ankra.app/org/stack-profiles/{profile_id}/demos/{workspace_id}/connection-probes \
--header 'Content-Type: application/json' \
--cookie ankra_session= \
--data '
{
"connection": {
"protocol": "<string>",
"endpoints": [
{
"name": "<string>",
"scheme": "<string>",
"service": "<string>",
"port": 123
}
],
"secret_name": "<string>",
"secret_keys": [
"<string>"
],
"fields": {}
}
}
'{
"probe_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "queued",
"verdict": "passed",
"cause": "<string>",
"reason": "<string>",
"requested_at": "2023-11-07T05:31:56Z",
"probed_at": "2023-11-07T05:31:56Z"
}Authorizations
Browser session. Mutations also require X-Ankra-CSRF.
Body
A connection block to try against a running demo: the one a service package would declare.
Show child attributes
Show child attributes
Response
The probe, queued
A connection probe requested on a stack-profile demo, and what it found.
Where the probe is. Read verdict for the answer.
queued, probed, expired passed: a pod in the demo's namespace connected. failed: the canary ran and did not connect. unknown: nothing was learned yet or at all.
passed, failed, unknown The canary's cause word, empty until the probe has run.
One line saying what the probe found, or why there is no verdict.