Audit log integration subscriptions allow you to send audit log events hooks to one of dozens of external tools. For example, you can send flag change event webhooks to external third party software. To learn more, read Building your own integrations.
You can use the integration subscriptions API to create, delete, and manage your integration audit log subscriptions.
Each of these operations requires an integrationKey
that refers to the type of integration. The required config
fields to create a subscription vary depending on the integrationKey
. You can find a full list of the fields for each integration below.
Several of these operations require a subscription ID. The subscription ID is returned as part of the Create audit log subscription and Get audit log subscriptions by integration responses. It is the _id
field, or the _id
field of each element in the items
array.
apiKey
is a sensitive value.
hostURL
must evaluate to either "https://api.datadoghq.com"
or "https://api.datadoghq.eu"
and will default to the former if not explicitly defined.
"config": {
"apiKey": <string, optional>, # sensitive value
"hostURL": <string, optional>
}
apiToken
is a sensitive value.
entity
must evaluate to one of the following fields and will default to "APPLICATION"
if not explicitly defined:
"config": {
"apiToken": <string, required>,
"url": <string, required>,
"entity": <string, optional>
}
token
is a sensitive field.
"config": {
"url": <string, required>,
"token": <string, required>,
"index": <string, required>
}
apiKey
is a sensitive field.
"config": {
"datasetName": <string, required>,
"apiKey": <string, required>
}
ingestionKey
is a sensitive field.
"config": {
"ingestionKey": <string, required>,
"level": <string, optional>
}
"config": {
"url": <string, required>
}
apiKey
is a sensitive field.
domain
must evaluate to either "api.newrelic.com"
or "api.eu.newrelic.com"
and will default to the former if not explicitly defined.
"config": {
"apiKey": <string, required>,
"applicationId": <string, required>,
"domain": <string, optional>
}
accessToken
is a sensitive field.
"config": {
"accessToken": <string, required>,
"realm": <string, required>
}
token
is a sensitive field.
"config": {
"base-url": <string, required>,
"token": <string, required>,
"skip-ca-verificiation": <boolean, required>
}
Get all audit log subscriptions associated with a given integration.
Integrations collection response
Invalid access token
Forbidden
Invalid resource identifier
Rate limited
{- "_links": {
- "property1": {
- "href": "string",
- "type": "string"
}, - "property2": {
- "href": "string",
- "type": "string"
}
}, - "items": [
- {
- "_links": {
- "property1": {
- "href": "string",
- "type": "string"
}, - "property2": {
- "href": "string",
- "type": "string"
}
}, - "_id": "1234a56b7c89d012345e678f",
- "kind": "datadog",
- "name": "Example Datadog integration",
- "config": {
- "property1": null,
- "property2": null
}, - "statements": [
- {
- "resources": [
- "proj/*:env/*;qa_*:/flag/*"
], - "notResources": [
- "string"
], - "actions": [
- "*"
], - "notActions": [
- "string"
], - "effect": "allow"
}
], - "on": true,
- "tags": [
- "testing"
], - "_access": {
- "denied": [
- {
- "action": "string",
- "reason": {
- "resources": [
- "proj/*:env/*;qa_*:/flag/*"
], - "notResources": [
- null
], - "actions": [
- "*"
], - "notActions": [
- null
], - "effect": "allow",
- "role_name": "string"
}
}
], - "allowed": [
- {
- "action": "string",
- "reason": {
- "resources": [
- "proj/*:env/*;qa_*:/flag/*"
], - "notResources": [
- null
], - "actions": [
- "*"
], - "notActions": [
- null
], - "effect": "allow",
- "role_name": "string"
}
}
]
}, - "_status": {
- "successCount": 0,
- "lastSuccess": 0,
- "lastError": 0,
- "errorCount": 0,
- "errors": [
- {
- "statusCode": 0,
- "responseBody": "string",
- "timestamp": 0
}
]
}, - "url": "string",
- "apiKey": "string"
}
], - "key": "string"
}
Create an audit log subscription.
For each subscription, you must specify the set of resources you wish to subscribe to audit log notifications for. You can describe these resources using a custom role policy. To learn more, read Custom role concepts.
name required | string A human-friendly name for your audit log subscription. |
Array of objects (StatementPostList) | |
on | boolean Whether or not you want your subscription to actively send events. |
tags | Array of strings An array of tags for this subscription. |
required | object The unique set of fields required to configure an audit log subscription integration of this type. Refer to the |
url | string Slack webhook receiver URL. Only necessary for legacy Slack webhook integrations. |
apiKey | string Datadog API key. Only necessary for legacy Datadog webhook integrations. |
Integration response
Invalid request
Invalid access token
Forbidden
Invalid resource identifier
Rate limited
{- "config": {
- "optional": "an optional property",
- "required": "the required property",
}, - "name": "Example audit log subscription.",
- "on": false,
- "statements": [
- {
- "actions": [
- "*"
], - "effect": "allow",
- "resources": [
- "proj/*:env/*:flag/*;testing-tag"
]
}
], - "tags": [
- "testing-tag"
]
}
{- "_links": {
- "property1": {
- "href": "string",
- "type": "string"
}, - "property2": {
- "href": "string",
- "type": "string"
}
}, - "_id": "1234a56b7c89d012345e678f",
- "kind": "datadog",
- "name": "Example Datadog integration",
- "config": {
- "property1": null,
- "property2": null
}, - "statements": [
- {
- "resources": [
- "proj/*:env/*;qa_*:/flag/*"
], - "notResources": [
- "string"
], - "actions": [
- "*"
], - "notActions": [
- "string"
], - "effect": "allow"
}
], - "on": true,
- "tags": [
- "testing"
], - "_access": {
- "denied": [
- {
- "action": "string",
- "reason": {
- "resources": [
- "proj/*:env/*;qa_*:/flag/*"
], - "notResources": [
- "string"
], - "actions": [
- "*"
], - "notActions": [
- "string"
], - "effect": "allow",
- "role_name": "string"
}
}
], - "allowed": [
- {
- "action": "string",
- "reason": {
- "resources": [
- "proj/*:env/*;qa_*:/flag/*"
], - "notResources": [
- "string"
], - "actions": [
- "*"
], - "notActions": [
- "string"
], - "effect": "allow",
- "role_name": "string"
}
}
]
}, - "_status": {
- "successCount": 0,
- "lastSuccess": 0,
- "lastError": 0,
- "errorCount": 0,
- "errors": [
- {
- "statusCode": 0,
- "responseBody": "string",
- "timestamp": 0
}
]
}, - "url": "string",
- "apiKey": "string"
}
Get an audit log subscription by ID.
Integration response
Invalid access token
Forbidden
Invalid resource identifier
Rate limited
{- "_links": {
- "property1": {
- "href": "string",
- "type": "string"
}, - "property2": {
- "href": "string",
- "type": "string"
}
}, - "_id": "1234a56b7c89d012345e678f",
- "kind": "datadog",
- "name": "Example Datadog integration",
- "config": {
- "property1": null,
- "property2": null
}, - "statements": [
- {
- "resources": [
- "proj/*:env/*;qa_*:/flag/*"
], - "notResources": [
- "string"
], - "actions": [
- "*"
], - "notActions": [
- "string"
], - "effect": "allow"
}
], - "on": true,
- "tags": [
- "testing"
], - "_access": {
- "denied": [
- {
- "action": "string",
- "reason": {
- "resources": [
- "proj/*:env/*;qa_*:/flag/*"
], - "notResources": [
- "string"
], - "actions": [
- "*"
], - "notActions": [
- "string"
], - "effect": "allow",
- "role_name": "string"
}
}
], - "allowed": [
- {
- "action": "string",
- "reason": {
- "resources": [
- "proj/*:env/*;qa_*:/flag/*"
], - "notResources": [
- "string"
], - "actions": [
- "*"
], - "notActions": [
- "string"
], - "effect": "allow",
- "role_name": "string"
}
}
]
}, - "_status": {
- "successCount": 0,
- "lastSuccess": 0,
- "lastError": 0,
- "errorCount": 0,
- "errors": [
- {
- "statusCode": 0,
- "responseBody": "string",
- "timestamp": 0
}
]
}, - "url": "string",
- "apiKey": "string"
}
Update an audit log subscription configuration. Updating an audit log subscription uses a JSON patch representation of the desired changes. To learn more, read Updates.
Integration response
Invalid request
Forbidden
Invalid resource identifier
Status conflict
Rate limited
[- {
- "op": "replace",
- "path": "/on",
- "value": false
}
]
{- "_links": {
- "property1": {
- "href": "string",
- "type": "string"
}, - "property2": {
- "href": "string",
- "type": "string"
}
}, - "_id": "1234a56b7c89d012345e678f",
- "kind": "datadog",
- "name": "Example Datadog integration",
- "config": {
- "property1": null,
- "property2": null
}, - "statements": [
- {
- "resources": [
- "proj/*:env/*;qa_*:/flag/*"
], - "notResources": [
- "string"
], - "actions": [
- "*"
], - "notActions": [
- "string"
], - "effect": "allow"
}
], - "on": true,
- "tags": [
- "testing"
], - "_access": {
- "denied": [
- {
- "action": "string",
- "reason": {
- "resources": [
- "proj/*:env/*;qa_*:/flag/*"
], - "notResources": [
- "string"
], - "actions": [
- "*"
], - "notActions": [
- "string"
], - "effect": "allow",
- "role_name": "string"
}
}
], - "allowed": [
- {
- "action": "string",
- "reason": {
- "resources": [
- "proj/*:env/*;qa_*:/flag/*"
], - "notResources": [
- "string"
], - "actions": [
- "*"
], - "notActions": [
- "string"
], - "effect": "allow",
- "role_name": "string"
}
}
]
}, - "_status": {
- "successCount": 0,
- "lastSuccess": 0,
- "lastError": 0,
- "errorCount": 0,
- "errors": [
- {
- "statusCode": 0,
- "responseBody": "string",
- "timestamp": 0
}
]
}, - "url": "string",
- "apiKey": "string"
}
Delete an audit log subscription.
Action succeeded
Invalid access token
Forbidden
Invalid resource identifier
Rate limited
{- "code": "unauthorized",
- "message": "Invalid access token"
}