Documentation (2024.2 Enterprise)

# Default Reviewer Group

With default reviewer groups, you define which project groups are automatically added as reviewers to code reviews of a repository.

- Operations

  - GET /projects/:project_id/repositories/:repository_id/default-reviewer-groups
  - GET /projects/:project_id/repositories/:repository_id/default-reviewer-groups/:default_reviewer_group_id
  - POST /projects/:project_id/repositories/:repository_id/default-reviewer-groups
  - DELETE /projects/:project_id/repositories/:repository_id/default-reviewer-groups/:default_reviewer_group_idd

## Operations

### GET /projects/:project_id/repositories/:repository_id/default-reviewer-groups

Lists all default reviewer groups for a repository.

#### Example request

    curl -X GET \
      -H "Accept: application/vnd.api+json" \
      -H "Content-Type: application/vnd.api+json" \
      -H "Authorization: Token $ACCOUNT_KEY" \
      https://helixteamhub.cloud/api/v2/projects/luotsi/repositories/acme/default-reviewer-groups

#### Example response

    {
      "data": [
        {
          "id": "f90da853-c5f2-4e55-9fa5-773e83b78784_2dc25c4d-abd8-4235-824a-6dce895c82cb",
          "type": "default-reviewer-groups",
          "relationships": {
            "repository": {
              "data": {
                "id": "f90da853-c5f2-4e55-9fa5-773e83b78784",
                "type": "repositories"
              }
            },
            "group": {
              "data": {
                "id": "2dc25c4d-abd8-4235-824a-6dce895c82cb","type": "groups"
              }
            }
          }
        }
      ],
      "links": {
        "self": "https://helixteamhub.cloud/api/v2/projects/luotsi/repositories/acme/default-reviewer-groups?page%5Bnumber%5D=1&page%5Bsize%5D=25",
        "first": "https://helixteamhub.cloud/api/v2/projects/luotsi/repositories/acme/default-reviewer-groups?page%5Bnumber%5D=1&page%5Bsize%5D=25",
        "prev": null,
        "next": null,
        "last": "https://helixteamhub.cloud/api/v2/projects/luotsi/repositories/acme/default-reviewer-groups?page%5Bnumber%5D=1&page%5Bsize%5D=25"
      },
      "meta": {
        "total": 1
      }
    }

### GET /projects/:project_id/repositories/:repository_id/default-reviewer-groups/:default_reviewer_group_id

Returns a specific default reviewer group. You can construct default_reviewer_group_id by joining repository_id and group_id using an underscore (_).

#### Example request

    curl -X GET \
      -H "Accept: application/vnd.api+json" \
      -H "Content-Type: application/vnd.api+json" \
      -H "Authorization: Token $ACCOUNT_KEY" \
      https://helixteamhub.cloud/api/v2/projects/luotsi/repositories/acme/default-reviewer-groups/f90da853-c5f2-4e55-9fa5-773e83b78784_2dc25c4d-abd8-4235-824a-6dce895c82cb

#### Example response

    {
      "data": {
        "id": "f90da853-c5f2-4e55-9fa5-773e83b78784_2dc25c4d-abd8-4235-824a-6dce895c82cb",
        "type": "default-reviewer-groups",
        "relationships": {
          "repository": {
            "data": {
              "id": "f90da853-c5f2-4e55-9fa5-773e83b78784",
              "type": "repositories"
            }
          },
          "group": {
            "data": {
              "id": "2dc25c4d-abd8-4235-824a-6dce895c82cb",
              "type": "groups"
            }
          }
        }
      }
    }

### POST /projects/:project_id/repositories/:repository_id/default-reviewer-groups

Adds a default reviewer group for a repository. The group must have a project or repository role before you can add it.

#### Example request

    curl -X POST \
      -H "Accept: application/vnd.api+json" \
      -H "Content-Type: application/vnd.api+json" \
      -H "Authorization: Token $ACCOUNT_KEY" \
      -d '{ "data": { "relationships": { "group": { "data": { "type": "groups", "id": "2dc25c4d-abd8-4235-824a-6dce895c82cb" } } } }' \
      https://helixteamhub.cloud/api/v2/projects/luotsi/repositories/acme/default-reviewer-groups

#### Example response

    {
      "data": {
        "id": "f90da853-c5f2-4e55-9fa5-773e83b78784_2dc25c4d-abd8-4235-824a-6dce895c82cb",
        "type": "default-reviewer-groups",
        "relationships": {
          "repository": {
            "data": {
              "id": "f90da853-c5f2-4e55-9fa5-773e83b78784",
              "type": "repositories"
            }
          },
          "group": {
            "data": {
              "id": "2dc25c4d-abd8-4235-824a-6dce895c82cb",
              "type": "groups"
            }
          }
        }
      }
    }

### DELETE /projects/:project_id/repositories/:repository_id/default-reviewer-groups/:default_reviewer_group_id

Removes the default reviewer group from the repository. Returns a 204 status code and a blank response. You can construct default_reviewer_group_id by joining repository_id and group_id using an underscore (_).

#### Example request

    curl -X DELETE \
      -H "Accept: application/vnd.api+json" \
      -H "Authorization: Token $ACCOUNT_KEY" \
      https://helixteamhub.cloud/api/v2/projects/luotsi/repositories/acme/default-reviewer-groups/f90da853-c5f2-4e55-9fa5-773e83b78784_2dc25c4d-abd8-4235-824a-6dce895c82cb

Your search for returned results

Your search for returned results