---
title: "Update a restriction policy"
method: POST
path: "/api/v2/restriction_policy/{resource_id}"
tags: ["Restriction Policies"]
---

# Update a restriction policy

`POST /api/v2/restriction_policy/{resource_id}`

Updates the restriction policy associated with a resource.

#### Supported resources
Restriction policies can be applied to the following resources:
- Dashboards: `dashboard`
- Integration Services: `integration-service`
- Integration Webhooks: `integration-webhook`
- Notebooks: `notebook`
- Powerpacks: `powerpack`
- Reference Tables: `reference-table`
- Security Rules: `security-rule`
- Service Level Objectives: `slo`
- Synthetic Global Variables: `synthetics-global-variable`
- Synthetic Tests: `synthetics-test`
- Synthetic Private Locations: `synthetics-private-location`
- Monitors: `monitor`
- Workflows: `workflow`
- App Builder Apps: `app-builder-app`
- Connections: `connection`
- Connection Groups: `connection-group`
- RUM Applications: `rum-application`
- Cross Org Connections: `cross-org-connection`
- Spreadsheets: `spreadsheet`
- On-Call Schedules: `on-call-schedule`
- On-Call Escalation Policies: `on-call-escalation-policy`
- On-Call Team Routing Rules: `on-call-team-routing-rules`
- Logs Pipelines: `logs-pipeline`
- Case Management Projects: `case-management-project`
- Monitor Notification Rules: `monitor-notification-rule`
- Status Pages: `status-page`

#### Supported relations for resources
Resource Type               | Supported Relations
----------------------------|--------------------------
Dashboards                  | `viewer`, `editor`
Integration Services        | `viewer`, `editor`
Integration Webhooks        | `viewer`, `editor`
Notebooks                   | `viewer`, `editor`
Powerpacks                  | `viewer`, `editor`
Security Rules              | `viewer`, `editor`
Service Level Objectives    | `viewer`, `editor`
Synthetic Global Variables  | `viewer`, `editor`
Synthetic Tests             | `viewer`, `editor`
Synthetic Private Locations | `viewer`, `editor`
Monitors                    | `viewer`, `editor`
Reference Tables            | `viewer`, `editor`
Workflows                   | `viewer`, `runner`, `editor`
App Builder Apps            | `viewer`, `editor`
Connections                 | `viewer`, `resolver`, `editor`
Connection Groups           | `viewer`, `editor`
RUM Application             | `viewer`, `editor`
Cross Org Connections       | `viewer`, `editor`
Spreadsheets                | `viewer`, `editor`
On-Call Schedules           | `viewer`, `overrider`, `editor`
On-Call Escalation Policies | `viewer`, `editor`
On-Call Team Routing Rules  | `viewer`, `editor`
Logs Pipelines              | `viewer`, `processors_editor`, `editor`
Case Management Projects    | `viewer`, `contributor`, `manager`
Monitor Notification Rules  | `viewer`, `editor`
Status Pages                | `viewer`, `responder`, `manager`

## Path parameters

- `resource_id` string, required

## Query parameters

- `allow_self_lockout` boolean

## Request body

- RestrictionPolicyUpdateRequest — Update request for a restriction policy.
  - `data` RestrictionPolicy, required — Restriction policy object.
    - `attributes` RestrictionPolicyAttributes, required — Restriction policy attributes.
      - `bindings` RestrictionPolicyBinding[], required — An array of bindings.
        - `principals` string[], required — An array of principals. A principal is a subject or group of subjects. Each principal is formatted as `type:id`. Supported types: `role`, `team`, `user`, and `org`. The org ID can be obtained through the api/v2/current_user API. The user principal type accepts service account IDs.
        - `relation` string, required — The role/level of access.
    - `id` string, required — The identifier, always equivalent to the value specified in the `resource_id` path parameter.
    - `type` 'restriction_policy', required — Restriction policy type.

## Response `200`

OK

- RestrictionPolicyResponse — Response containing information about a single restriction policy.
  - `data` RestrictionPolicy, required — Restriction policy object.
    - `attributes` RestrictionPolicyAttributes, required — Restriction policy attributes.
      - `bindings` RestrictionPolicyBinding[], required — An array of bindings.
        - `principals` string[], required — An array of principals. A principal is a subject or group of subjects. Each principal is formatted as `type:id`. Supported types: `role`, `team`, `user`, and `org`. The org ID can be obtained through the api/v2/current_user API. The user principal type accepts service account IDs.
        - `relation` string, required — The role/level of access.
    - `id` string, required — The identifier, always equivalent to the value specified in the `resource_id` path parameter.
    - `type` 'restriction_policy', required — Restriction policy type.

## Other responses

- `400` — Bad Request
- `403` — Not Authorized
- `429` — Too many requests

---

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