Probe a proposed connection on a demo
import requests
url = "https://platform.ankra.app/api/v1/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 = {
"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({
connection: {
protocol: '<string>',
endpoints: [{name: '<string>', scheme: '<string>', service: '<string>', port: 123}],
secret_name: '<string>',
secret_keys: ['<string>'],
fields: {}
}
})
};
fetch('https://platform.ankra.app/api/v1/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/api/v1/org/stack-profiles/{profile_id}/demos/{workspace_id}/connection-probes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--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"
}Stack Profiles
Probe a proposed connection on a demo
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.
POST
/
api
/
v1
/
org
/
stack-profiles
/
{profile_id}
/
demos
/
{workspace_id}
/
connection-probes
Probe a proposed connection on a demo
import requests
url = "https://platform.ankra.app/api/v1/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 = {
"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({
connection: {
protocol: '<string>',
endpoints: [{name: '<string>', scheme: '<string>', service: '<string>', port: 123}],
secret_name: '<string>',
secret_keys: ['<string>'],
fields: {}
}
})
};
fetch('https://platform.ankra.app/api/v1/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/api/v1/org/stack-profiles/{profile_id}/demos/{workspace_id}/connection-probes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--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
Body
application/json
Response
The probe, queued
A connection probe requested on a stack-profile demo, and what it found.