---
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, OAuth tokens and personal access tokens (classic) need the `repo` scope 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
        - `user_view_type` 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
        - `notification_setting` 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
        - `type` 'enterprise' | 'organization', required — The ownership type of the team
        - `access_source` 'direct' | 'organization' | 'enterprise' — How the team's access to the repository was granted. This property is only present when the team is returned in a repository context, such as `GET /repos/{owner}/{repo}/teams`.
        - `organization_id` integer — Unique identifier of the organization to which this team belongs
        - `enterprise_id` integer — Unique identifier of the enterprise to which this team belongs
        - `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
          - `notification_setting` string — The notification setting the team has set
          - `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
          - `type` 'enterprise' | 'organization', required — The ownership type of the team
          - `organization_id` integer — Unique identifier of the organization to which this team belongs
          - `enterprise_id` integer — Unique identifier of the enterprise to which this team belongs

---

[API](https://skmtc.net/github/apis/api-github-com.md) · [All operations](https://skmtc.net/github/apis/api-github-com/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/github/api-github-com/revisions/a367f7028301/schema)
