Create or update entity integration configuration

Note: This endpoint is in preview and is subject to change. If you have any feedback, contact Datadog support.

PUT https://api.ap1.datadoghq.com/api/v2/idp/entity_integrations/{integration_id}https://api.ap2.datadoghq.com/api/v2/idp/entity_integrations/{integration_id}https://api.datadoghq.eu/api/v2/idp/entity_integrations/{integration_id}https://api.ddog-gov.com/api/v2/idp/entity_integrations/{integration_id}https://api.us2.ddog-gov.com/api/v2/idp/entity_integrations/{integration_id}https://api.datadoghq.com/api/v2/idp/entity_integrations/{integration_id}https://api.us3.datadoghq.com/api/v2/idp/entity_integrations/{integration_id}https://api.us5.datadoghq.com/api/v2/idp/entity_integrations/{integration_id}

Overview

Create or replace the configuration for a given integration in the caller’s organization. The shape of data.attributes.config depends on the integration:

  • For github: config must contain an enabled_repos array of objects with hostname, github_org_name, and repo_name.
  • For jira: config must contain an enabled_projects array of objects with hostname, account_id, and project_key.
  • For pagerduty: config must contain an accounts array of objects with a required enabled boolean and an optional subdomain string.
This endpoint requires the integrations_read permission.

Arguments

Path Parameters

Name

Type

Description

integration_id [required]

string

The identifier of the integration whose configuration is being managed. Supported values are github, jira, and pagerduty.

Request

Body Data (required)

Expand All

Field

Type

Description

data [required]

object

JSON:API resource object used in a request to create or update an entity integration configuration.

attributes [required]

object

Attributes used to create or update an entity integration configuration.

config [required]

object

Integration-specific configuration payload. The shape of this object depends on the integration identified by the path parameter. For github, the object must contain an enabled_repos array. For jira, it must contain an enabled_projects array. For pagerduty, it must contain an accounts array.

type [required]

enum

JSON:API resource type for the entity integration configuration create or update request. Always entity_integration_config_requests. Allowed enum values: entity_integration_config_requests

default: entity_integration_config_requests

{
  "data": {
    "attributes": {
      "config": {
        "enabled_repos": [
          {
            "github_org_name": "myorg",
            "hostname": "github.com",
            "repo_name": "myrepo"
          }
        ]
      }
    },
    "type": "entity_integration_config_requests"
  }
}

Response

OK

Expand All

Field

Type

Description

data [required]

object

JSON:API resource object for an entity integration configuration.

attributes [required]

object

The organization ID, integration identifier, and integration-specific configuration payload for an entity integration configuration.

config [required]

object

Integration-specific configuration payload. The shape of this object depends on the integration identified by the path parameter. For github, the object must contain an enabled_repos array. For jira, it must contain an enabled_projects array. For pagerduty, it must contain an accounts array.

integration_id [required]

string

The identifier of the integration this configuration applies to (for example, github, jira, or pagerduty).

org_id [required]

int64

The Datadog organization identifier that owns this configuration.

id [required]

string

Unique identifier of the entity integration configuration.

type [required]

enum

JSON:API resource type for an entity integration configuration. Always entity_integration_configs. Allowed enum values: entity_integration_configs

default: entity_integration_configs

{
  "data": {
    "attributes": {
      "config": {
        "enabled_repos": [
          {
            "github_org_name": "myorg",
            "hostname": "github.com",
            "repo_name": "myrepo"
          }
        ]
      },
      "integration_id": "github",
      "org_id": 1234
    },
    "id": "01HJABCD12345678ABCDEFGHIJ",
    "type": "entity_integration_configs"
  }
}

JSON:API document containing a single entity integration configuration resource.

Expand All

Field

Type

Description

data [required]

object

JSON:API resource object for an entity integration configuration.

attributes [required]

object

The organization ID, integration identifier, and integration-specific configuration payload for an entity integration configuration.

config [required]

object

Integration-specific configuration payload. The shape of this object depends on the integration identified by the path parameter. For github, the object must contain an enabled_repos array. For jira, it must contain an enabled_projects array. For pagerduty, it must contain an accounts array.

integration_id [required]

string

The identifier of the integration this configuration applies to (for example, github, jira, or pagerduty).

org_id [required]

int64

The Datadog organization identifier that owns this configuration.

id [required]

string

Unique identifier of the entity integration configuration.

type [required]

enum

JSON:API resource type for an entity integration configuration. Always entity_integration_configs. Allowed enum values: entity_integration_configs

default: entity_integration_configs

{
  "data": {
    "attributes": {
      "config": {
        "enabled_repos": [
          {
            "github_org_name": "myorg",
            "hostname": "github.com",
            "repo_name": "myrepo"
          }
        ]
      },
      "integration_id": "github",
      "org_id": 1234
    },
    "id": "01HJABCD12345678ABCDEFGHIJ",
    "type": "entity_integration_configs"
  }
}

Bad Request

API error response.

Expand All

Field

Type

Description

errors [required]

[object]

A list of errors.

detail

string

A human-readable explanation specific to this occurrence of the error.

meta

object

Non-standard meta-information about the error

source

object

References to the source of the error.

header

string

A string indicating the name of a single request header which caused the error.

parameter

string

A string indicating which URI query parameter caused the error.

pointer

string

A JSON pointer to the value in the request document that caused the error.

status

string

Status code of the response.

title

string

Short human-readable summary of the error.

{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}

Not Authorized

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Too many requests

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Code Example

                  ## GitHub integration configuration
# 

# Path parameters
export integration_id="github"
# Curl command
curl -X PUT "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.us2.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/idp/entity_integrations/${integration_id}" \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \ -d @- << EOF { "data": { "attributes": { "config": { "enabled_repos": [ { "github_org_name": "myorg", "hostname": "github.com", "repo_name": "myrepo" } ] } }, "type": "entity_integration_config_requests" } } EOF
## Jira integration configuration #
# Path parameters
export integration_id="github"
# Curl command
curl -X PUT "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.us2.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/idp/entity_integrations/${integration_id}" \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \ -d @- << EOF { "data": { "attributes": { "config": { "enabled_projects": [ { "account_id": "123456789", "hostname": "mycompany.atlassian.net", "project_key": "AAA" } ] } }, "type": "entity_integration_config_requests" } } EOF
## PagerDuty integration configuration #
# Path parameters
export integration_id="github"
# Curl command
curl -X PUT "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.us2.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/idp/entity_integrations/${integration_id}" \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \ -d @- << EOF { "data": { "attributes": { "config": { "accounts": [ { "enabled": true, "subdomain": "mycompany" } ] } }, "type": "entity_integration_config_requests" } } EOF