import requests
url = "https://platform.ankra.app/api/v1/org/stack-profiles/{profile_id}/service-classification"
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}/service-classification', 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}/service-classification \
--header 'Authorization: Bearer <token>'{
"available": true,
"unavailable_reason": "no_addons",
"profile_version_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"verdict": "engine",
"protocol": "postgres",
"engine": "<string>",
"addon": "<string>",
"confidence": "high",
"reason": "<string>"
}Classify the service a stack profile runs
Asks the organisation’s service_classification AI lane (the Quick tier, Claude Haiku, unless the organisation chose another model for the lane) what kind of managed service the profile’s latest version runs: an engine applications connect to over a protocol Ankra supports (protocol set), an engine Ankra has no protocol for, an application or piece of infrastructure, or unclear. Only the profile’s name and description and each add-on’s name, chart, chart version, registry and namespace are sent; configuration values and manifests never are. The answer is validated before it is returned and cached per profile version for 24 hours, and every call is metered and gated by the monthly AI allowance. Model trouble is never an error status: available false with unavailable_reason says why no classification could be made (no_addons, allowance_exhausted, ai_unavailable or model_error). Requires profiles.read on a profile the caller can see.
import requests
url = "https://platform.ankra.app/api/v1/org/stack-profiles/{profile_id}/service-classification"
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}/service-classification', 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}/service-classification \
--header 'Authorization: Bearer <token>'{
"available": true,
"unavailable_reason": "no_addons",
"profile_version_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"verdict": "engine",
"protocol": "postgres",
"engine": "<string>",
"addon": "<string>",
"confidence": "high",
"reason": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Response
The classification, or why none could be made
What kind of managed service a stack profile's latest version runs. When available is true every other member except unavailable_reason is present (null where it does not apply); when it is false only unavailable_reason is.
Whether a validated classification was made.
Only when available is false. no_addons: the latest version has no add-ons, and the model was not asked. spec_unreadable: the latest version's stored specification could not be read, so whether it has add-ons is unknown, and the model was not asked. allowance_exhausted: the monthly AI allowance or billing standing refused the call. ai_unavailable: no model can serve the lane for this organisation. model_error: the call failed or its answer did not validate.
no_addons, spec_unreadable, allowance_exhausted, ai_unavailable, model_error The latest version, the one classified.
engine: a data engine applications connect to over a supported protocol (wire-compatible engines included). unsupported_engine: something applications connect to that Ankra has no protocol for. application: a tool people use or cluster infrastructure. unclear: the model could not tell.
engine, unsupported_engine, application, unclear The protocol applications connect over; set only for the engine verdict.
postgres, redis, nats, opensearch, s3, victorialogs, victoriametrics, null The engine's common name (for example PostgreSQL or Apache Kafka), at most 80 characters, for the two engine verdicts; otherwise null.
The name of the profile add-on that runs it, exactly as the profile spells it, or null.
high, medium, low One plain sentence, at most 280 characters.