For AI agents: A markdown version of this page is available at https://dnd37xeb23o8n.cloudfront.net/jen.gilbert/astro-base/es/api/latest/app-builder/update-app-protection-level.md. A documentation index is available at /llms.txt.
Language
Datadog site
PRECAUCIÓNEste producto no es compatible con el sitio Datadog seleccionado. (US2-FED).

Update App Protection Level

PATCHhttps://api.datadoghq.com/api/v2/app-builder/apps/{app_id}/protection-levelhttps://api.us3.datadoghq.com/api/v2/app-builder/apps/{app_id}/protection-levelhttps://api.us5.datadoghq.com/api/v2/app-builder/apps/{app_id}/protection-levelhttps://api.datadoghq.eu/api/v2/app-builder/apps/{app_id}/protection-levelhttps://api.ap1.datadoghq.com/api/v2/app-builder/apps/{app_id}/protection-levelhttps://api.ap2.datadoghq.com/api/v2/app-builder/apps/{app_id}/protection-levelhttps://api.uk1.datadoghq.com/api/v2/app-builder/apps/{app_id}/protection-levelhttps://api.ddog-gov.com/api/v2/app-builder/apps/{app_id}/protection-levelhttps://api.us2.ddog-gov.com/api/v2/app-builder/apps/{app_id}/protection-level

Descripción general

Update the publication protection level of an app. When set to approval_required, future publishes must go through an approval workflow before going live.

This endpoint requires the apps_write permission.

Argumentos

Parámetros de ruta

Nombre
Type
Descripción
app_id [required]
string

The ID of the app.

Solicitud

Body Data (required)

Campo
Type
Descripción
data
object

Data for updating an app's publication protection level.

Respuesta

OK

The response object after an app is successfully updated.

Campo
Type
Descripción
data
object

The data object containing the updated app definition.

included
[object]

Data on the version of the app that was published.

meta
object

Metadata of an app.

relationship
object

The app's publication relationship and custom connections.

Ejemplo de código

Update App Protection Level returns "OK" response
# Path parameters
export app_id="65bb1f25-52e1-4510-9f8d-22d1516ed693"

# 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 PATCH "https://api.${DD_SITE}/api/v2/app-builder/apps/${app_id}/protection-level" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "protectionLevel": "approval_required"
    },
    "type": "protectionLevel"
  }
}
EOF
# Path parameters
export app_id="65bb1f25-52e1-4510-9f8d-22d1516ed693"

# 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 PATCH "https://api.${DD_SITE}/api/v2/app-builder/apps/${app_id}/protection-level" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "protectionLevel": "approval_required"
    },
    "type": "protectionLevel"
  }
}
EOF
# Path parameters
export app_id="65bb1f25-52e1-4510-9f8d-22d1516ed693"

# 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 PATCH "https://api.${DD_SITE}/api/v2/app-builder/apps/${app_id}/protection-level" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "protectionLevel": "approval_required"
    },
    "type": "protectionLevel"
  }
}
EOF
# Path parameters
export app_id="65bb1f25-52e1-4510-9f8d-22d1516ed693"

# 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 PATCH "https://api.${DD_SITE}/api/v2/app-builder/apps/${app_id}/protection-level" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "protectionLevel": "approval_required"
    },
    "type": "protectionLevel"
  }
}
EOF
# Path parameters
export app_id="65bb1f25-52e1-4510-9f8d-22d1516ed693"

# 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 PATCH "https://api.${DD_SITE}/api/v2/app-builder/apps/${app_id}/protection-level" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "protectionLevel": "approval_required"
    },
    "type": "protectionLevel"
  }
}
EOF
# Path parameters
export app_id="65bb1f25-52e1-4510-9f8d-22d1516ed693"

# 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 PATCH "https://api.${DD_SITE}/api/v2/app-builder/apps/${app_id}/protection-level" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "protectionLevel": "approval_required"
    },
    "type": "protectionLevel"
  }
}
EOF
# Path parameters
export app_id="65bb1f25-52e1-4510-9f8d-22d1516ed693"

# 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 PATCH "https://api.${DD_SITE}/api/v2/app-builder/apps/${app_id}/protection-level" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "protectionLevel": "approval_required"
    },
    "type": "protectionLevel"
  }
}
EOF
# Path parameters
export app_id="65bb1f25-52e1-4510-9f8d-22d1516ed693"

# 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 PATCH "https://api.${DD_SITE}/api/v2/app-builder/apps/${app_id}/protection-level" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "protectionLevel": "approval_required"
    },
    "type": "protectionLevel"
  }
}
EOF
# Path parameters
export app_id="65bb1f25-52e1-4510-9f8d-22d1516ed693"

# 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 PATCH "https://api.${DD_SITE}/api/v2/app-builder/apps/${app_id}/protection-level" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "protectionLevel": "approval_required"
    },
    "type": "protectionLevel"
  }
}
EOF