Integration audit log subscriptions

Create audit log subscription

POST
/api/v2/integrations/{integrationKey}

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.

Authorization

ApiKey read, write
Authorization<token>

In: header

Scope: read, write

Path Parameters

integrationKey*string

The integration key

Formatstring

Request Body

application/json

name*string

A human-friendly name for your audit log subscription.

statements?array<>

The set of resources you wish to subscribe to audit log notifications for.

on?boolean

Whether or not you want your subscription to actively send events.

tags?array<string>

An array of tags for this subscription.

config*

The unique set of fields required to configure an audit log subscription integration of this type. Refer to the formVariables field in the corresponding manifest.json at https://github.com/launchdarkly/integration-framework/tree/main/integrations for a full list of fields for the integration you wish to configure.

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.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/v2/integrations/string" \  -H "Content-Type: application/json" \  -d '{    "config": {      "optional": "an optional property",      "required": "the required property",      "url": "https://example.com"    },    "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"}