Skip to content

List the review requests from an organization

GET
/v1/review_requests/{org_uuid}

List the review requests from an organization sorted by
updated_at in descendent order.

Results can be sorted using sort parameter with following fields:

  • last_updated_at (default with descending order nulls last)
  • status (where order is open, merged, closed in asc order)
  • repository (asc by default)

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
status

Review request status like open, closed or merged.

Typearray
repository

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

Typearray
collaborator_id

Only collaborators whose identifier is set.

Typearray
user_uuid

Only entities that relates to those users.

Typearray
author_uuid

Only review requests whose author is the TMC User UUID.

This is an interim solution until a flexible filter is implemented.

Typearray
review_requested_uuid

Only return entities where the given user was a requested reviewer.

Typestring
format"uuid"
draft

Only select review requests with the provided draft value.

Typeboolean
Examplefalse
search

Select review_requests 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"
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
{
"review_requests": [
{
"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"
]
}
]
}
],
"paginated_result": {
"total": 0,
"page": 0,
"per_page": 0
}
}

Playground

Authorization
Variables
Key
Value

Samples

Powered by VitePress OpenAPI