Skip to content

Get all deployments from an organization.

GET
/v1/organizations/{org_uuid}/deployments

Get all deployments from an organization.

That's different from GET /v1/deployments/{org_uuid} which is
intended for dashboards to see active deployments.

Results can be sorted using sort parameter with following fields:

  • updated_at (default with descending order)
  • finished_at (desc by default)
  • total_stack_count (desc by default)
  • type
  • duration (desc by default)

Authorizations

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
type

Only select entities whose auth type was in provided array.

Typearray
status

Only entities whose status matches any of
provided input elements.

Typearray
collaborator_id

Only collaborators whose identifier is set.

Typearray
user_uuid

Only entities that relates to those users.

Typearray
search

Select deployments where the following attributes match the provided
search query. If string contains a comma or spaces all terms will be
searched and matched.

  • pull request number
  • pull request title
  • commit SHA
  • commit title
  • branch
  • base_branch
Typestring
Example"fix,main"
created_at_from

Only entities that has a created_at timestamp from this date including
the date.

Typestring
Example"2024-04-11T20:31:00Z"
format"date-time"
created_at_to

Only entities that has a created_at timestamp up to this date including
the date.

Typestring
Example"2024-04-11T21:31:00Z"
format"date-time"
started_at_from

Only entities that has a started_at timestamp from this date including
the date.

Typestring
Example"2024-04-11T20:31:00Z"
format"date-time"
started_at_to

Only entities that has a started_at timestamp up to this date including
the date.

Typestring
Example"2024-04-11T21:31:00Z"
format"date-time"
finished_at_from

Only entities that has a finished_at timestamp from this date including
the date.

Typestring
Example"2024-04-11T20:31:00Z"
format"date-time"
finished_at_to

Only entities that has a finished_at timestamp up to this date including
the date.

Typestring
Example"2024-04-11T21:31:00Z"
format"date-time"
sort

Sorting

Allows for sorting of the returned entities based on specified fields and order.
Multiple fields can be provided with their sorting direction, separated by commas.
For example, to sort by 'updated_at' in ascending order and then by 'path' in descending order,
the parameter can be specified as follows: sort=updated_at,asc&sort=path,desc.
By default, entities are sorted by 'updated_at' in descending order.

Typearray
Example{ "UpdatedAtDescPathDescExample": { "Value": [ "updated_at,asc", "path,desc" ] } }

Responses

OK

application/json
JSON
{
"deployments": [
{
"id": 42,
"status": "string",
"commit_title": "Fix this",
"commit_sha": "deadc0decafebabecafed00ddeadbeeff00dface",
"repository": "github.com/terramate-io/iac-gcloud",
"auth_type": "string",
"auth_id": "string",
"auth_user": {
"display_name": "Marius Tolzmann",
"position": "CTPO",
"user_picture_url": "https://lh3.googleusercontent.com/a/AAcHTtcBqudpP0hVoQyjDv-v5b4lP6e0vN_92zi_aPp90hE=s96-c"
},
"canceled_count": 8,
"failed_count": 1,
"ok_count": 7,
"pending_count": 23,
"running_count": 1,
"stack_deployment_total_count": 40,
"created_at": "string",
"started_at": "string",
"finished_at": "string",
"metadata": {
"additionalProperties": "string"
},
"review_request": {
"review_request_id": 42,
"platform": "github",
"repository": "github.com/terramate-io/iac-gcloud",
"commit_sha": "deadc0decafebabecafed00ddeadbeeff00dface",
"number": 23,
"title": "feat: Add feature X",
"description": "My Change Description with a lot of details. ",
"url": "https://github.com/terramate-io/iac-gcloud/pull/666",
"author": {
"login": "hacker",
"avatar_url": "https://avatar.url/hacker",
"id": "id"
},
"status": "string",
"platform_updated_at": "string",
"platform_created_at": "string",
"platform_pushed_at": "string",
"platform_merged_at": "string",
"reviewers": [
{
"login": "hacker",
"avatar_url": "https://avatar.url/hacker",
"id": "id"
}
],
"branch": "my_awesome_feature",
"base_branch": "main",
"draft": true,
"review_decision": "approved",
"changes_requested_count": 1,
"approved_count": 1,
"checks_total_count": 1,
"checks_failure_count": 1,
"checks_success_count": 1,
"labels": [
{
"name": "label1",
"color": "#000000",
"description": "label description"
}
],
"preview": {
"id": 232,
"status": "outdated",
"affected_count": 1,
"pending_count": 1,
"running_count": 1,
"changed_count": 1,
"unchanged_count": 1,
"failed_count": 1,
"canceled_count": 0,
"resource_changes": {
"create_count": 3,
"delete_count": 2,
"noop_count": 5,
"read_count": 4,
"replace_count": 7,
"update_count": 0
}
},
"metrics": {
"last_drafted_at": "string",
"last_ready_for_review_at": "string",
"ready_for_review_count": 1,
"review_total_duration_seconds": 1,
"last_mergeable_at": "string",
"mergeable_count": 1,
"mergeable_total_duration_seconds": 2323,
"last_closed_at": "string",
"deployment": {
"started_at": "string",
"finished_at": "string",
"failed_at": "string",
"fixed_at": "string",
"wait_time_total_duration_seconds": 2323,
"status": "string",
"time_to_restore_seconds": 2323,
"lead_time_for_change_seconds": 2342,
"stack_deployment_ok_count": 34,
"stack_deployment_failed_count": 23
}
},
"collaborators": [
{
"id": 232,
"platform": "github",
"display_name": "hacker",
"avatar_url": "https://avatar.url/hacker",
"linked_user": {
"user_uuid": "683e0589-65a8-48b8-bd90-6ee89e0682ab",
"display_name": "Marius Tolzmann",
"user_picture_url": "https://lh3.googleusercontent.com/a/AAcHTtcBqudpP0hVoQyjDv-v5b4lP6e0vN_92zi_aPp90hE=s96-c"
},
"roles": [
"string"
]
}
]
},
"branch": "main",
"workflow_triggered_by": "hacker",
"workflow_name": "deploy to prod",
"grouping_key": "string",
"triggered_by": {
"id": 232,
"platform": "github",
"display_name": "hacker",
"avatar_url": "https://avatar.url/hacker",
"linked_user": {
"user_uuid": "683e0589-65a8-48b8-bd90-6ee89e0682ab",
"display_name": "Marius Tolzmann",
"user_picture_url": "https://lh3.googleusercontent.com/a/AAcHTtcBqudpP0hVoQyjDv-v5b4lP6e0vN_92zi_aPp90hE=s96-c"
}
}
}
],
"paginated_result": {
"total": 0,
"page": 0,
"per_page": 0
}
}

Playground

Authorization
Variables
Key
Value

Samples

Powered by VitePress OpenAPI