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

# Get a restriction policy

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

## Request

- Base URL: `https://api.datadoghq.com`
- URL: `https://api.datadoghq.com/api/v2/restriction_policy/{resource_id}`
- Auth: one of:
  - API key in header `DD-API-KEY` and API key in header `DD-APPLICATION-KEY`
  - OAuth 2
    - Authorization code: `/oauth2/v1/authorize`
    - Token URL: `/oauth2/v1/token`

Retrieves the restriction policy associated with a specified resource.

## Path parameters

- `resource_id` string, required

## 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.dev/datadog/apis/datadog-api-v2-collection.md) - [All operations](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/llms.txt) - [OpenAPI document](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/revisions/da68bf029e4c?raw)
