Execution Policy
List execution policies
Retrieve a list of execution policies for the current organization.
get/api/v2/actions/execution-policies
Request
- Base URLhttps://api.datadoghq.com
- Auth
- API key in header DD-API-KEY and API key in header DD-APPLICATION-KEY
- or OAuth 2Authorization code/oauth2/v1/authorizeToken URL/oauth2/v1/token
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Query parameters
page[size]integer
The number of execution policies to return per page.
page[number]integer
The page number to return.
filter[name]string
Filter execution policies by name.
filter[ids]string[]
Filter execution policies by a list of IDs.
filter[integration]Execution Policy Integration[]
Filter execution policies by a list of integrations.
[ "INTEGRATION_SCRIPT" ]
filter[effects]Execution Policy Effect[]
Filter execution policies by a list of effects.
[ "allow" ]
filter[creator_ids]string[]
Filter execution policies by a list of creator IDs.
sortstring[]
The sort order for the results. Prefix a field with - to sort in descending order. Valid fields are name, effect, integration, created_at, and updated_at.
Response
OK
Example response
{
"data": [
{
"attributes": {
"action_pattern": {
"action_fqns": [
"com.datadoghq.script.*"
],
"integration": "INTEGRATION_SCRIPT"
},
"created_at": "2026-01-15T10:00:00.000Z",
"created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"effect": "allow",
"name": "Block prod restarts",
"scope": {
"kubernetes": {
"rules": [
{
"target_namespaces": [
"default"
]
}
]
},
"remote_action_rshell": {
"rules": [
{
"access": "read_only",
"target_paths": [
"/var/log"
]
}
]
},
"scripts": {
"rules": [
{
"target_script_names": [
"restart_service.sh"
]
}
]
},
"slack": {
"rules": [
{
"channel_name_selectors": [
"incident-*"
]
}
]
}
},
"targets": [
{
"agent_tags": [
"env:prod"
],
"name": "Production hosts"
}
],
"updated_at": "2026-01-15T10:00:00.000Z",
"updated_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"version": 1
},
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"type": "execution_policy"
}
],
"meta": {
"page": {
"total": 1
}
}
}Changes
Changes to this operation have not been checked yet.