Skip to content

Get stacks of an organization

GET
/v1/stacks/{org_uuid}

All stacks matching a given status are returned.

For the time being, if no page query parameter
is provided, all stacks will be returned.

Stacks that are soft-deleted are not returned.

Access

  • Only members of the organization with any role are allowed to query.

Authorizations

apiKey

API key as username in Basic Authorization with
empty password.

TypeAPI Key (header: Authorization)
or
jwtToken
TypeHTTP (bearer)

Parameters

Path Parameters

org_uuid*

UUID of the organization

Typestring
Required
format"uuid"

Query Parameters

page

Page number to return

Typeinteger
Example1
format"int64"
minimum1
per_page

Number of elements per page

Typeinteger
format"int64"
minimum1
default10
repository

Only select entities whose repository matches any
of the strings in the provided array. Only full strings will
be matched.

Typearray
target

Only select entities whose deployment target matches any
of the strings in the provided array. Only full strings will
be matched.

Typearray
status

only select stacks with specific status e.g. for dashboard view.

Typearray
Example{ "AllPossibleValues": { "value": [ "all", "unhealthy", "healthy", "drifted", "failed", "ok" ] } }
deployment_status

Only select stacks with these last known
deployment status.

Typearray
Example{ "AllPossibleValues": { "value": [ "canceled", "failed", "ok", "pending", "running" ] } }
drift_status

Only select entities with these last known drift status.

Typearray
Example{ "AllPossibleValues": { "value": [ "ok", "drifted", "failed" ] } }
draft

Only select stacks with the provided draft value.

Typeboolean
Examplefalse
is_archived

true - Only select entities that are archived.
false - Only select entities that are not archived (default).
true,false - Select all entities.

Typearray
Example{ "AllPossibleValues": { "value": [ true, false ] } }
search

This performs a substring search on the following stack
attributes:

  • meta_id
  • meta_name
  • meta_description
  • path
Typestring
Example"stackTitle"
meta_id

Only select stacks where meta_id matches this value.

Typestring
Example"4106cc6-ec4b-4ef7-a0eb-d927f860e176"
deployment_uuid

Deployment UUID

Typestring
Example"096c55b6-1599-4a17-a48f-fa846a84aa8a"
format"uuid"
meta_tag

Only select stacks where the meta_tags includes the given tag.
If they are provided multiple times ALL values should be
contained in the meta_tags. If the string contains ',' then
ANY value should be in the meta_tags.

Typearray
Example{ "TwoTagsExample": { "Value": [ "tag_a", "tag_b" ] } }
policy_severity

Only select entities that have specific policy check results.
Available options:

  • missing: No analysis data available.
  • none: No checks defined for the entity.
  • passed: Entity has no violations.
  • low: Entity has violations with low severity.
  • medium: Entity has violations with medium severity.
  • high: Entity has violations with high severity.
Typearray
sort

Stacks are sorted with updated_at by default.

Available sorts are:

  • meta_name[,(asc|desc)]
  • path[,(asc|desc)]
  • policy_severity[,(desc|asc)]
  • repository[,(asc|desc)]
  • resource_count[,(desc|asc)]
  • status[,(asc|desc)]
  • target[,(asc|desc)]
  • updated_at[,(desc|asc)]
Typearray
Example{ "UpdatedAtDescPathDescExample": { "Value": [ "updated_at,asc", "path,desc" ] } }

Responses

OK

application/json
JSON
{
"stacks": [
{
"stack_id": 1337,
"repository": "github.com/terramate-io/iac-gcloud",
"target": "staging",
"path": "/path/to/stack",
"default_branch": "main",
"meta_id": "a754255a-c92a-4aeb-9668-bd3ce21dc8a2",
"meta_name": "My Stack Name",
"meta_description": "My Stack Description",
"meta_tags": [
[
"tagA",
"tagB"
]
],
"status": "string",
"created_at": "string",
"updated_at": "string",
"seen_at": "string",
"is_archived": true,
"archived_at": "string",
"archived_by_user_uuid": "string",
"unarchived_at": "string",
"unarchived_by_user_uuid": "string",
"deployment_status": "string",
"drift_status": "string",
"draft": true,
"related_stacks": [
{
"stack_id": 0,
"target": "string"
}
],
"resources": {
"count": 42,
"policy_check": {
"created_at": "2024-09-12T07:06:00Z",
"passed": false,
"counters": {
"passed_count": 42,
"severity_low_count": 3,
"severity_medium_count": 2,
"severity_high_count": 1
}
}
}
}
],
"paginated_result": {
"total": 0,
"page": 0,
"per_page": 0
}
}

Playground

Authorization
Variables
Key
Value

Samples

Powered by VitePress OpenAPI