List the environments an API is deployed to
Where this API actually runs — the URLs the platform already knows, so a client doesn't have to ask a developer to type them.
Targets, not client environments. These are destinations: an environment's
name and the URL it serves at. They carry no variables, tokens or secrets, and
clients must not treat them as a place to put any. Per-API custom metadata
(envMetadata on the internal surface) is free-form and may hold credentials in
existing orgs, so it is deliberately not returned here.
Environments are whatever the organisation defined, named however they named them, and the name is the whole of their meaning. There is no classification field: this endpoint reports what exists, it does not interpret it.
Returned in the organisation's promotion order — the same order the dashboard lays them out in, so the two surfaces agree.
Choosing a destination is the developer's, so a client should present these and let one be picked rather than picking on their behalf.
Authorization stack:
- scope:
read:apis - ABAC v2: caller must be permitted to
viewthe API resource (cross-org and cross-team isolation collapse to 404 to avoid leaking existence).
Requires scope read:apis.
Authorization
BearerAuth Bearer token. Either a Personal Access Token (pat_...) or a Service Account
Token (sat_...). Issued via the Spec0 dashboard or /me/personal-access-tokens.
In: header
Path Parameters
uuidResponse Body
application/json
application/json
application/json
application/json
curl -X GET "https://app.spec0.io/api/v1/public/apis/team/497f6eca-6276-4993-bfeb-53cbbbba6f08/environments"[
{
"name": "string",
"url": "string",
"currentVersion": "string",
"updatedAt": "string"
}
]{
"error": "string",
"message": "string"
}{
"status": 0,
"title": "string",
"detail": "string",
"type": "string",
"instance": "string"
}{
"status": 0,
"title": "string",
"detail": "string",
"type": "string",
"instance": "string"
}