Every API here is available over the APIs.io API and to AI agents over MCP.
openapi: 3.2.0
info:
contact:
email: support@datadoghq.com
name: Datadog Support
url: https://www.datadoghq.com/support/
description: The Datadog API is an HTTP REST API. The API uses resource-oriented URLs to call the API, uses status codes to indicate the success or failure of requests, returns JSON from all requests, and uses standard HTTP response codes. Use the Datadog API to access the Datadog platform programmatically.
title: Datadog Policies API
version: '1.0'
servers:
- url: https://{subdomain}.{site}
variables:
site:
default: datadoghq.com
description: The regional site for Datadog customers.
enum:
- datadoghq.com
- us3.datadoghq.com
- us5.datadoghq.com
- ap1.datadoghq.com
- datadoghq.eu
- ddog-gov.com
subdomain:
default: api
description: The subdomain where the API is deployed.
- url: '{protocol}://{name}'
variables:
name:
default: api.datadoghq.com
description: Full site DNS name.
protocol:
default: https
description: The protocol for accessing the API.
- url: https://{subdomain}.{site}
variables:
site:
default: datadoghq.com
description: Any Datadog deployment.
subdomain:
default: api
description: The subdomain where the API is deployed.
security:
- apiKeyAuth: []
appKeyAuth: []
tags:
- name: Policies
paths:
/api/v2/on-call/escalation-policies/{policy_id}:
put:
description: Update an On-Call escalation policy
operationId: UpdateOnCallEscalationPolicy
parameters:
- description: The ID of the escalation policy
in: path
name: policy_id
required: true
schema:
example: a3000000-0000-0000-0000-000000000000
type: string
example: a3000000-0000-0000-0000-000000000000
- description: 'Comma-separated list of included relationships to be returned. Allowed values: `teams`, `steps`, `steps.targets`.'
in: query
name: include
schema:
type: string
example: example_value
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/EscalationPolicyUpdateRequest'
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/EscalationPolicy'
description: OK
'400':
$ref: '#/components/responses/BadRequestResponse'
'401':
$ref: '#/components/responses/UnauthorizedResponse'
'403':
$ref: '#/components/responses/ForbiddenResponse'
'404':
$ref: '#/components/responses/NotFoundResponse'
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
security:
- apiKeyAuth: []
appKeyAuth: []
- AuthZ: []
summary: Datadog Update On-call Escalation Policy
tags:
- Policies
x-menu-order: 6
x-permission:
operator: AND
permissions:
- on_call_write
x-undo:
type: idempotent
x-api-evangelist-processing:
PascalCaseOperationSummaries: true
ChooseTags: true
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/api/v2/remote_config/products/cws/policy/{policy_id}:
patch:
description: 'Update a specific Workload Protection policy.
Returns the policy object when the request is successful.
**Note**: This endpoint is not available for the Government (US1-FED) site. Please reference the (US1-FED) specific resource below.'
operationId: UpdateCSMThreatsAgentPolicy
parameters:
- $ref: '#/components/parameters/CloudWorkloadSecurityPathAgentPolicyID'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CloudWorkloadSecurityAgentPolicyUpdateRequest'
description: New definition of the Agent policy
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/CloudWorkloadSecurityAgentPolicyResponse'
description: OK
'400':
$ref: '#/components/responses/BadRequestResponse'
'403':
$ref: '#/components/responses/NotAuthorizedResponse'
'404':
$ref: '#/components/responses/NotFoundResponse'
'409':
$ref: '#/components/responses/ConcurrentModificationResponse'
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
summary: Datadog Update a Workload Protection Policy
tags:
- Policies
x-codegen-request-body-name: body
x-menu-order: 9
x-undo:
type: idempotent
x-api-evangelist-processing:
PascalCaseOperationSummaries: true
ChooseTags: true
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/api/v2/restriction_policy/{resource_id}:
post:
description: 'Updates the restriction policy associated with a resource.
#### Supported resources
Restriction policies can be applied to the following resources:
- Dashboards: `dashboard`
- Integration Accounts: `integration-account`
- 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`
#### Supported relations for resources
Resource Type | Supported Relations
----------------------------|--------------------------
Dashboards | `viewer`, `editor`
Integration Accounts | `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`'
operationId: UpdateRestrictionPolicy
parameters:
- $ref: '#/components/parameters/ResourceID'
- description: Allows admins (users with the `user_access_manage` permission) to remove their own access from the resource if set to `true`. By default, this is set to `false`, preventing admins from locking themselves out.
in: query
name: allow_self_lockout
required: false
schema:
type: boolean
example: true
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/RestrictionPolicyUpdateRequest'
description: Restriction policy payload
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/RestrictionPolicyResponse'
description: OK
'400':
$ref: '#/components/responses/BadRequestResponse'
'403':
$ref: '#/components/responses/NotAuthorizedResponse'
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
security:
- apiKeyAuth: []
appKeyAuth: []
- AuthZ: []
summary: Datadog Update a Restriction Policy
tags:
- Policies
x-codegen-request-body-name: body
x-menu-order: 1
x-permission:
operator: OPEN
permissions: []
x-undo:
type: idempotent
x-api-evangelist-processing:
PascalCaseOperationSummaries: true
ChooseTags: true
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
components:
schemas:
EscalationPolicyUpdateRequestDataType:
default: policies
description: Indicates that the resource is of type `policies`.
enum:
- policies
example: policies
type: string
x-enum-varnames:
- POLICIES
EscalationTarget:
description: Represents an escalation target, which can be a team, user, or schedule.
oneOf:
- $ref: '#/components/schemas/TeamTarget'
- $ref: '#/components/schemas/UserTarget'
- $ref: '#/components/schemas/ScheduleTarget'
EscalationPolicyStepAttributes:
description: Defines attributes for an escalation policy step, such as assignment strategy and escalation timeout.
properties:
assignment:
$ref: '#/components/schemas/EscalationPolicyStepAttributesAssignment'
escalate_after_seconds:
description: Specifies how many seconds to wait before escalating to the next step.
format: int64
type: integer
example: 42
type: object
CloudWorkloadSecurityAgentPolicyUpdateRequest:
description: Request object that includes the Agent policy with the attributes to update
properties:
data:
$ref: '#/components/schemas/CloudWorkloadSecurityAgentPolicyUpdateData'
required:
- data
type: object
EscalationPolicyUserType:
default: users
description: Users resource type.
enum:
- users
example: users
type: string
x-enum-varnames:
- USERS
UserAttributesStatus:
description: The user's status.
enum:
- active
- deactivated
- pending
type: string
x-enum-varnames:
- ACTIVE
- DEACTIVATED
- PENDING
UserTargetType:
default: users
description: Indicates that the resource is of type `users`.
enum:
- users
example: users
type: string
x-enum-varnames:
- USERS
CloudWorkloadSecurityAgentPolicyUpdateAttributes:
description: Update an existing Cloud Workload Security Agent policy
properties:
description:
description: The description of the policy
example: My agent policy
type: string
enabled:
description: Whether the policy is enabled
example: true
type: boolean
hostTags:
description: The host tags defining where this policy is deployed
items:
type: string
type: array
hostTagsLists:
description: The host tags defining where this policy is deployed, the inner values are linked with AND, the outer values are linked with OR
items:
items:
type: string
type: array
type: array
name:
description: The name of the policy
example: my_agent_policy
type: string
type: object
EscalationPolicy:
description: Represents a complete escalation policy response, including policy data and optionally included related resources.
example:
data:
attributes:
name: Escalation Policy 1
resolve_page_on_policy_end: true
retries: 2
id: 00000000-aba1-0000-0000-000000000000
relationships:
steps:
data:
- id: 00000000-aba1-0000-0000-000000000000
type: steps
teams:
data:
- id: 00000000-da3a-0000-0000-000000000000
type: teams
type: policies
included:
- attributes:
avatar: ''
description: Team 1 description
handle: team1
name: Team 1
id: 00000000-da3a-0000-0000-000000000000
type: teams
- attributes:
assignment: default
escalate_after_seconds: 3600
id: 00000000-aba1-0000-0000-000000000000
relationships:
targets:
data:
- id: 00000000-aba1-0000-0000-000000000000
type: users
- id: 00000000-aba2-0000-0000-000000000000
type: schedules
- id: 00000000-aba3-0000-0000-000000000000
type: teams
type: steps
- id: 00000000-aba1-0000-0000-000000000000
type: users
- id: 00000000-aba2-0000-0000-000000000000
type: schedules
- id: 00000000-aba3-0000-0000-000000000000
type: teams
properties:
data:
$ref: '#/components/schemas/EscalationPolicyData'
included:
description: Provides any included related resources, such as steps or targets, returned with the policy.
items:
$ref: '#/components/schemas/EscalationPolicyIncluded'
type: array
type: object
DataRelationshipsTeams:
description: Associates teams with this schedule in a data structure.
properties:
data:
description: An array of team references for this schedule.
items:
$ref: '#/components/schemas/DataRelationshipsTeamsDataItems'
type: array
type: object
DataRelationshipsTeamsDataItemsType:
default: teams
description: Teams resource type.
enum:
- teams
example: teams
type: string
x-enum-varnames:
- TEAMS
RestrictionPolicyType:
default: restriction_policy
description: Restriction policy type.
enum:
- restriction_policy
example: restriction_policy
type: string
x-enum-varnames:
- RESTRICTION_POLICY
EscalationPolicyStepRelationships:
description: Represents the relationship of an escalation policy step to its targets.
properties:
targets:
$ref: '#/components/schemas/EscalationTargets'
type: object
EscalationPolicyStep:
description: Represents a single step in an escalation policy, including its attributes, relationships, and resource type.
properties:
attributes:
$ref: '#/components/schemas/EscalationPolicyStepAttributes'
id:
description: Specifies the unique identifier of this escalation policy step.
type: string
example: abc-123-def
relationships:
$ref: '#/components/schemas/EscalationPolicyStepRelationships'
type:
$ref: '#/components/schemas/EscalationPolicyStepType'
required:
- type
type: object
CloudWorkloadSecurityAgentPolicyUpdateData:
description: Object for a single Agent policy
properties:
attributes:
$ref: '#/components/schemas/CloudWorkloadSecurityAgentPolicyUpdateAttributes'
id:
$ref: '#/components/schemas/CloudWorkloadSecurityAgentPolicyID'
type:
$ref: '#/components/schemas/CloudWorkloadSecurityAgentPolicyType'
required:
- attributes
- type
type: object
ScheduleDataRelationshipsLayersDataItems:
description: Relates a layer to this schedule, identified by `id` and `type` (must be `layers`).
properties:
id:
description: The unique identifier of the layer in this relationship.
example: 00000000-0000-0000-0000-000000000001
type: string
type:
$ref: '#/components/schemas/ScheduleDataRelationshipsLayersDataItemsType'
required:
- type
- id
type: object
ScheduleTarget:
description: Represents a schedule target for an escalation policy step, including its ID and resource type.
properties:
id:
description: Specifies the unique identifier of the schedule resource.
example: 00000000-aba1-0000-0000-000000000000
type: string
type:
$ref: '#/components/schemas/ScheduleTargetType'
required:
- type
- id
type: object
EscalationPolicyUpdateRequestDataAttributes:
description: Defines the attributes that can be updated for an escalation policy, such as description, name, resolution behavior, retries, and steps.
properties:
name:
description: Specifies the name of the escalation policy.
example: On-Call Escalation Policy
type: string
resolve_page_on_policy_end:
description: Indicates whether the page is automatically resolved when the policy ends.
type: boolean
example: true
retries:
description: Specifies how many times the escalation sequence is retried if there is no response.
format: int64
type: integer
example: 42
steps:
description: A list of escalation steps, each defining assignment, escalation timeout, and targets.
items:
$ref: '#/components/schemas/EscalationPolicyUpdateRequestDataAttributesStepsItems'
type: array
required:
- name
- steps
type: object
RestrictionPolicyUpdateRequest:
description: Update request for a restriction policy.
properties:
data:
$ref: '#/components/schemas/RestrictionPolicy'
required:
- data
type: object
TeamTargetType:
default: teams
description: Indicates that the resource is of type `teams`.
enum:
- teams
example: teams
type: string
x-enum-varnames:
- TEAMS
CloudWorkloadSecurityAgentPolicyAttributes:
description: A Cloud Workload Security Agent policy returned by the API
properties:
blockingRulesCount:
description: The number of rules with the blocking feature in this policy
example: 100
format: int32
maximum: 2147483647
type: integer
datadogManaged:
description: Whether the policy is managed by Datadog
example: false
type: boolean
description:
description: The description of the policy
example: My agent policy
type: string
disabledRulesCount:
description: The number of rules that are disabled in this policy
example: 100
format: int32
maximum: 2147483647
type: integer
enabled:
description: Whether the Agent policy is enabled
example: true
type: boolean
hostTags:
description: The host tags defining where this policy is deployed
items:
type: string
type: array
hostTagsLists:
description: The host tags defining where this policy is deployed, the inner values are linked with AND, the outer values are linked with OR
items:
items:
type: string
type: array
type: array
monitoringRulesCount:
description: The number of rules in the monitoring state in this policy
example: 100
format: int32
maximum: 2147483647
type: integer
name:
description: The name of the policy
example: my_agent_policy
type: string
policyVersion:
description: The version of the policy
example: '1'
type: string
priority:
description: The priority of the policy
example: 10
format: int64
type: integer
ruleCount:
description: The number of rules in this policy
example: 100
format: int32
maximum: 2147483647
type: integer
updateDate:
description: Timestamp in milliseconds when the policy was last updated
example: 1624366480320
format: int64
type: integer
updatedAt:
description: When the policy was last updated, timestamp in milliseconds
example: 1624366480320
format: int64
type: integer
updater:
$ref: '#/components/schemas/CloudWorkloadSecurityAgentPolicyUpdaterAttributes'
type: object
CloudWorkloadSecurityAgentPolicyUpdaterAttributes:
description: The attributes of the user who last updated the policy
properties:
handle:
description: The handle of the user
example: datadog.user@example.com
type: string
name:
description: The name of the user
example: Datadog User
type:
- string
- 'null'
type: object
APIErrorResponse:
description: API error response.
properties:
errors:
description: A list of errors.
example:
- Bad Request
items:
description: A list of items.
example: Bad Request
type: string
type: array
required:
- errors
type: object
RestrictionPolicyResponse:
description: Response containing information about a single restriction policy.
properties:
data:
$ref: '#/components/schemas/RestrictionPolicy'
required:
- data
type: object
RestrictionPolicy:
description: Restriction policy object.
properties:
attributes:
$ref: '#/components/schemas/RestrictionPolicyAttributes'
id:
description: The identifier, always equivalent to the value specified in the `resource_id` path parameter.
example: dashboard:abc-def-ghi
type: string
type:
$ref: '#/components/schemas/RestrictionPolicyType'
required:
- type
- id
- attributes
type: object
RestrictionPolicyAttributes:
description: Restriction policy attributes.
example:
bindings: []
properties:
bindings:
description: An array of bindings.
items:
$ref: '#/components/schemas/RestrictionPolicyBinding'
type: array
required:
- bindings
type: object
RestrictionPolicyBinding:
description: Specifies which principals are associated with a relation.
properties:
principals:
description: '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.'
example:
- role:00000000-0000-1111-0000-000000000000
items:
description: '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.'
type: string
type: array
relation:
description: The role/level of access.
example: editor
type: string
required:
- relation
- principals
type: object
EscalationPolicyUpdateRequestData:
description: Represents the data for updating an existing escalation policy, including its ID, attributes, relationships, and resource type.
properties:
attributes:
$ref: '#/components/schemas/EscalationPolicyUpdateRequestDataAttributes'
id:
description: Specifies the unique identifier of the escalation policy being updated.
example: 00000000-aba1-0000-0000-000000000000
type: string
relationships:
$ref: '#/components/schemas/EscalationPolicyUpdateRequestDataRelationships'
type:
$ref: '#/components/schemas/EscalationPolicyUpdateRequestDataType'
required:
- type
- id
- attributes
type: object
EscalationPolicyUpdateRequestDataRelationships:
description: Represents relationships in an escalation policy update request, including references to teams.
properties:
teams:
$ref: '#/components/schemas/DataRelationshipsTeams'
type: object
EscalationPolicyStepTarget:
description: Defines a single escalation target within a step for an escalation policy creation request. Contains `id` and `type`.
properties:
id:
description: Specifies the unique identifier for this target.
example: 00000000-aba1-0000-0000-000000000000
type: string
type:
$ref: '#/components/schemas/EscalationPolicyStepTargetType'
type: object
EscalationPolicyUser:
description: Represents a user object in the context of an escalation policy, including their `id`, type, and basic attributes.
properties:
attributes:
$ref: '#/components/schemas/EscalationPolicyUserAttributes'
id:
description: The unique user identifier.
type: string
example: abc-123-def
type:
$ref: '#/components/schemas/EscalationPolicyUserType'
required:
- type
type: object
CloudWorkloadSecurityAgentPolicyData:
description: Object for a single Agent policy
properties:
attributes:
$ref: '#/components/schemas/CloudWorkloadSecurityAgentPolicyAttributes'
id:
description: The ID of the Agent policy
example: 6517fcc1-cec7-4394-a655-8d6e9d085255
type: string
type:
$ref: '#/components/schemas/CloudWorkloadSecurityAgentPolicyType'
type: object
ScheduleData:
description: Represents the primary data object for a schedule, linking attributes and relationships.
properties:
attributes:
$ref: '#/components/schemas/ScheduleDataAttributes'
id:
description: The schedule's unique identifier.
example: 3653d3c6-0c75-11ea-ad28-fb5701eabc7d
type: string
relationships:
$ref: '#/components/schemas/ScheduleDataRelationships'
type:
$ref: '#/components/schemas/ScheduleDataType'
required:
- type
type: object
TeamReference:
description: Provides a reference to a team, including ID, type, and basic attributes/relationships.
properties:
attributes:
$ref: '#/components/schemas/TeamReferenceAttributes'
id:
description: The team's unique identifier.
type: string
example: abc-123-def
type:
$ref: '#/components/schemas/TeamReferenceType'
required:
- type
type: object
EscalationPolicyStepTargetType:
description: Specifies the type of escalation target (example `users`, `schedules`, or `teams`).
enum:
- users
- schedules
- teams
example: users
type: string
x-enum-varnames:
- USERS
- SCHEDULES
- TEAMS
EscalationPolicyDataRelationshipsStepsDataItems:
description: Defines a relationship to a single step within an escalation policy. Contains the step's `id` and `type`.
properties:
id:
description: Specifies the unique identifier for the step resource.
example: 00000000-aba1-0000-0000-000000000000
type: string
type:
$ref: '#/components/schemas/EscalationPolicyDataRelationshipsStepsDataItemsType'
required:
- type
- id
type: object
EscalationPolicyIncluded:
description: Represents included related resources when retrieving an escalation policy, such as teams, steps, or targets.
oneOf:
- $ref: '#/components/schemas/TeamReference'
- $ref: '#/components/schemas/EscalationPolicyStep'
- $ref: '#/components/schemas/EscalationPolicyUser'
- $ref: '#/components/schemas/ScheduleData'
ScheduleDataRelationshipsLayers:
description: Associates layers with this schedule in a data structure.
properties:
data:
description: An array of layer references for this schedule.
items:
$ref: '#/components/schemas/ScheduleDataRelationshipsLayersDataItems'
type: array
type: object
EscalationPolicyDataRelationships:
description: Represents the relationships for an escalation policy, including references to steps and teams.
properties:
steps:
$ref: '#/components/schemas/EscalationPolicyDataRelationshipsSteps'
teams:
$ref: '#/components/schemas/DataRelationshipsTeams'
required:
- steps
type: object
EscalationPolicyUpdateRequest:
description: Represents a request to update an existing escalation policy, including the updated policy data.
example:
data:
attributes:
name: Escalation Policy 1
resolve_page_on_policy_end: false
retries: 2
steps:
- assignment: default
escalate_after_seconds: 3600
id: 00000000-aba1-0000-0000-000000000000
targets:
- id: 00000000-aba1-0000-0000-000000000000
type: users
- id: 00000000-aba2-0000-0000-000000000000
type: schedules
id: a3000000-0000-0000-0000-000000000000
relationships:
teams:
data:
- id: 00000000-da3a-0000-0000-000000000000
type: teams
type: policies
properties:
data:
$ref: '#/components/schemas/EscalationPolicyUpdateRequestData'
required:
- data
type: object
EscalationPolicyUpdateRequestDataAttributesStepsItems:
description: Defines a single escalation step within an escalation policy update request. Contains assignment strategy, escalation timeout, an optional step ID, and a list of targets.
properties:
assignment:
$ref: '#/components/schemas/EscalationPolicyStepAttributesAssignment'
escalate_after_seconds:
description: Defines how many seconds to wait before escalating to the next step.
example: 3600
format: int64
type: integer
id:
description: Specifies the unique identifier of this step.
example: 00000000-aba1-0000-0000-000000000000
type: string
targets:
description: Specifies the collection of escalation targets for this step.
items:
$ref: '#/components/schemas/EscalationPolicyStepTarget'
type: array
required:
- targets
type: object
ScheduleDataType:
default: schedules
description: Schedules resource type.
enum:
- schedules
example: schedules
type: string
x-enum-varnames:
- SCHEDULES
ScheduleDataRelationshipsLayersDataItemsType:
default: layers
description: Layers resource type.
enum:
- layers
example: layers
type: string
x-enum-varnames:
- LAYERS
ScheduleDataRelationships:
description: Groups the relationships for a schedule object, referencing layers and teams.
properties:
layers:
$ref: '#/components/schemas/ScheduleDataRelationshipsLayers'
teams:
$ref: '#/components/schemas/DataRelationshipsTeams'
type: object
CloudWorkloadSecurityAgentPolicyType:
default: policy
description: The type of the resource, must always be `policy`
enum:
- policy
example: policy
type: string
x-enum-varnames:
- POLICY
ScheduleDataAttrib
# --- truncated at 32 KB (47 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/datadog/refs/heads/main/openapi/datadog-policies-api-openapi.yml