---
title: "Get pending deployments for a workflow run"
method: GET
path: "/repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments"
tags: ["actions"]
---

# Get pending deployments for a workflow run

`GET /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments`

Get all deployment environments for a workflow run that are waiting for protection rules to pass.

Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint.

## Path parameters

- `owner` string, required
- `repo` string, required
- `run_id` integer, required

## Response `200`

Response

- PendingDeployment[]
  - `environment` object, required
    - `id` integer — The id of the environment.
    - `node_id` string
    - `name` string — The name of the environment.
    - `url` string
    - `html_url` string
  - `wait_timer` integer, required — The set duration of the wait timer
  - `wait_timer_started_at` string, date-time, nullable, required — The time that the wait timer began.
  - `current_user_can_approve` boolean, required — Whether the currently authenticated user can approve the deployment
  - `reviewers` object[], required — The people or teams that may approve jobs that reference the environment. You can list up to six users or teams as reviewers. The reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed.
    - `type` 'User' | 'Team' — The type of reviewer.
    - `reviewer` union
      - SimpleUser — A GitHub user.
        - `name` string, nullable
        - `email` string, nullable
        - `login` string, required
        - `id` integer, required
        - `node_id` string, required
        - `avatar_url` string, uri, required
        - `gravatar_id` string, nullable, required
        - `url` string, uri, required
        - `html_url` string, uri, required
        - `followers_url` string, uri, required
        - `following_url` string, required
        - `gists_url` string, required
        - `starred_url` string, required
        - `subscriptions_url` string, uri, required
        - `organizations_url` string, uri, required
        - `repos_url` string, uri, required
        - `events_url` string, required
        - `received_events_url` string, uri, required
        - `type` string, required
        - `site_admin` boolean, required
        - `starred_at` string
      - Team — Groups of organization members that gives permissions on specified repositories.
        - `id` integer, required
        - `node_id` string, required
        - `name` string, required
        - `slug` string, required
        - `description` string, nullable, required
        - `privacy` string
        - `permission` string, required
        - `permissions` object
          - `pull` boolean, required
          - `triage` boolean, required
          - `push` boolean, required
          - `maintain` boolean, required
          - `admin` boolean, required
        - `url` string, uri, required
        - `html_url` string, uri, required
        - `members_url` string, required
        - `repositories_url` string, uri, required
        - `parent` NullableTeamSimple, nullable, required — Groups of organization members that gives permissions on specified repositories.
          - `id` integer, required — Unique identifier of the team
          - `node_id` string, required
          - `url` string, uri, required — URL for the team
          - `members_url` string, required
          - `name` string, required — Name of the team
          - `description` string, nullable, required — Description of the team
          - `permission` string, required — Permission that the team will have for its repositories
          - `privacy` string — The level of privacy this team should have
          - `html_url` string, uri, required
          - `repositories_url` string, uri, required
          - `slug` string, required
          - `ldap_dn` string — Distinguished Name (DN) that team maps to within LDAP environment

---

[API](https://skmtc.net/github/apis/github-v3-rest-api-6.md) · [All operations](https://skmtc.net/github/apis/github-v3-rest-api-6/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/github/github-v3-rest-api-6/versions/15db3fa0759b/schema)
