For AI agents: A markdown version of this page is available at https://dnd37xeb23o8n.cloudfront.net/jen.gilbert/astro-base/ko/api/latest/oauth2-client-public/upsert-an-oauth2-client-scopes-restriction.md. A documentation index is available at /llms.txt.
Language
Datadog site

OAuth2 클라이언트 범위 제한 업서트

경고Note: This endpoint is in preview and is subject to change. If you have any feedback, contact Datadog support.
POSThttps://api.datadoghq.com/api/v2/oauth2/clients/{client_uuid}/scopes_restrictionhttps://api.us3.datadoghq.com/api/v2/oauth2/clients/{client_uuid}/scopes_restrictionhttps://api.us5.datadoghq.com/api/v2/oauth2/clients/{client_uuid}/scopes_restrictionhttps://api.datadoghq.eu/api/v2/oauth2/clients/{client_uuid}/scopes_restrictionhttps://api.ap1.datadoghq.com/api/v2/oauth2/clients/{client_uuid}/scopes_restrictionhttps://api.ap2.datadoghq.com/api/v2/oauth2/clients/{client_uuid}/scopes_restrictionhttps://api.uk1.datadoghq.com/api/v2/oauth2/clients/{client_uuid}/scopes_restrictionhttps://api.ddog-gov.com/api/v2/oauth2/clients/{client_uuid}/scopes_restrictionhttps://api.us2.ddog-gov.com/api/v2/oauth2/clients/{client_uuid}/scopes_restriction

개요

OAuth2 클라이언트에 대해 구성된 범위 제한을 생성하거나 업데이트합니다.

This endpoint requires the org_authorized_apps_write permission.

인수

경로 파라미터

이름
유형
설명
client_uuid [required]
string

UUID of the OAuth2 client.

요청

Body Data (required)

항목
유형
설명
data [required]
object

OAuth2 클라이언트의 범위 제한을 생성하거나 업데이트하기 위한 요청 페이로드입니다.

응답

OK

Response payload describing the scopes restriction of an OAuth2 client.

항목
유형
설명
data [required]
object

Data object of an OAuth2 client scopes restriction response.

코드 예시

OAuth2 클라이언트 범위 제한 업서트
# Path parameters
export client_uuid="fafa8e1c-36a5-11f0-a83d-da7ad0900001"

# Set your Datadog site and credentials
export DD_SITE="datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/oauth2/clients/${client_uuid}/scopes_restriction" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "oidc_scopes": [
        "openid",
        "email"
      ],
      "permission_scopes": [
        "dashboards_read",
        "metrics_read"
      ]
    },
    "type": "upsert_scopes_restriction"
  }
}
EOF
# Path parameters
export client_uuid="fafa8e1c-36a5-11f0-a83d-da7ad0900001"

# Set your Datadog site and credentials
export DD_SITE="us3.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/oauth2/clients/${client_uuid}/scopes_restriction" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "oidc_scopes": [
        "openid",
        "email"
      ],
      "permission_scopes": [
        "dashboards_read",
        "metrics_read"
      ]
    },
    "type": "upsert_scopes_restriction"
  }
}
EOF
# Path parameters
export client_uuid="fafa8e1c-36a5-11f0-a83d-da7ad0900001"

# Set your Datadog site and credentials
export DD_SITE="us5.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/oauth2/clients/${client_uuid}/scopes_restriction" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "oidc_scopes": [
        "openid",
        "email"
      ],
      "permission_scopes": [
        "dashboards_read",
        "metrics_read"
      ]
    },
    "type": "upsert_scopes_restriction"
  }
}
EOF
# Path parameters
export client_uuid="fafa8e1c-36a5-11f0-a83d-da7ad0900001"

# Set your Datadog site and credentials
export DD_SITE="datadoghq.eu"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/oauth2/clients/${client_uuid}/scopes_restriction" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "oidc_scopes": [
        "openid",
        "email"
      ],
      "permission_scopes": [
        "dashboards_read",
        "metrics_read"
      ]
    },
    "type": "upsert_scopes_restriction"
  }
}
EOF
# Path parameters
export client_uuid="fafa8e1c-36a5-11f0-a83d-da7ad0900001"

# Set your Datadog site and credentials
export DD_SITE="ap1.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/oauth2/clients/${client_uuid}/scopes_restriction" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "oidc_scopes": [
        "openid",
        "email"
      ],
      "permission_scopes": [
        "dashboards_read",
        "metrics_read"
      ]
    },
    "type": "upsert_scopes_restriction"
  }
}
EOF
# Path parameters
export client_uuid="fafa8e1c-36a5-11f0-a83d-da7ad0900001"

# Set your Datadog site and credentials
export DD_SITE="ap2.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/oauth2/clients/${client_uuid}/scopes_restriction" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "oidc_scopes": [
        "openid",
        "email"
      ],
      "permission_scopes": [
        "dashboards_read",
        "metrics_read"
      ]
    },
    "type": "upsert_scopes_restriction"
  }
}
EOF
# Path parameters
export client_uuid="fafa8e1c-36a5-11f0-a83d-da7ad0900001"

# Set your Datadog site and credentials
export DD_SITE="uk1.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/oauth2/clients/${client_uuid}/scopes_restriction" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "oidc_scopes": [
        "openid",
        "email"
      ],
      "permission_scopes": [
        "dashboards_read",
        "metrics_read"
      ]
    },
    "type": "upsert_scopes_restriction"
  }
}
EOF
# Path parameters
export client_uuid="fafa8e1c-36a5-11f0-a83d-da7ad0900001"

# Set your Datadog site and credentials
export DD_SITE="ddog-gov.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/oauth2/clients/${client_uuid}/scopes_restriction" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "oidc_scopes": [
        "openid",
        "email"
      ],
      "permission_scopes": [
        "dashboards_read",
        "metrics_read"
      ]
    },
    "type": "upsert_scopes_restriction"
  }
}
EOF
# Path parameters
export client_uuid="fafa8e1c-36a5-11f0-a83d-da7ad0900001"

# Set your Datadog site and credentials
export DD_SITE="us2.ddog-gov.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/oauth2/clients/${client_uuid}/scopes_restriction" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "oidc_scopes": [
        "openid",
        "email"
      ],
      "permission_scopes": [
        "dashboards_read",
        "metrics_read"
      ]
    },
    "type": "upsert_scopes_restriction"
  }
}
EOF