apicheats.dev Cheat sheet Raw .md
PUT

Try PUT /repos/{owner}/{repo}/environments/{environment_name} — GitHub API

GitHub playground

Create or update an environment

Credentials

Kept in this tab only. Requests go through apicheats.dev's same-origin proxy straight to api.github.com; the proxy stores and logs nothing about them.

Headers

Path

Body application/json

4 body fields
  • wait_timer · optional · integer — The amount of time to delay a job after the job is initially triggered. The time (in minutes) must be an integer between 0 and 43,200 (30 days).
  • prevent_self_review · optional · boolean — Whether or not a user who created the job is prevented from approving their own job.
  • reviewers · optional · object[] — The people or teams that may review 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.
  • deployment_branch_policy · optional · object — The type of deployment branch policy for this environment. To allow all branches to deploy, set to `null`.