Bulk Update Project Environments
PUT /api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/environments/
Bulk update the visibility for a project's environments.
Path Parameters
organization_id_or_slug(string)REQUIREDThe ID or slug of the organization the resource belongs to.
project_id_or_slug(string)REQUIREDThe ID or slug of the project the resource belongs to.
Body Parameters
environmentNames(array(string))REQUIREDList of environment names to update. Maximum 1000.
isHidden(boolean)REQUIREDSpecify
trueto hide orfalseto show the specified environments.
Scopes
You need to authenticate via bearer auth token.
<auth_token> requires one of the following scopes:project:adminproject:write
Copied
curl https://sentry.io/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/environments/ \ -H 'Authorization: Bearer <auth_token>' \ -X PUT \ -H 'Content-Type: application/json' \ -d '{}'
RESPONSESCHEMA
Copied[ { "id": "1", "name": "Production", "isHidden": false }, { "id": "2", "name": "Staging", "isHidden": true } ]
Was this helpful?