Opsgenie Integration

Configure your Datadog Opsgenie integration directly through the Datadog API.

GET https://api.ap1.datadoghq.com/api/v2/integration/opsgenie/serviceshttps://api.datadoghq.eu/api/v2/integration/opsgenie/serviceshttps://api.ddog-gov.com/api/v2/integration/opsgenie/serviceshttps://api.datadoghq.com/api/v2/integration/opsgenie/serviceshttps://api.us3.datadoghq.com/api/v2/integration/opsgenie/serviceshttps://api.us5.datadoghq.com/api/v2/integration/opsgenie/services

Overview

Get a list of all services from the Datadog Opsgenie integration. This endpoint requires the integrations_read permission.

Response

OK

Response with a list of Opsgenie services.

Expand All

Field

Type

Description

data [required]

[object]

An array of Opsgenie services.

attributes [required]

object

The attributes from an Opsgenie service response.

custom_url

string

The custom URL for a custom region.

name

string

The name for the Opsgenie service.

region

enum

The region for the Opsgenie service. Allowed enum values: us,eu,custom

id [required]

string

The ID of the Opsgenie service.

type [required]

enum

Opsgenie service resource type. Allowed enum values: opsgenie-service

default: opsgenie-service

{
  "data": [
    {
      "attributes": {
        "custom_url": null,
        "name": "fake-opsgenie-service-name",
        "region": "us"
      },
      "id": "596da4af-0563-4097-90ff-07230c3f9db3",
      "type": "opsgenie-service"
    }
  ]
}

Forbidden

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

                  # Curl command
curl -X GET "https://api.ap1.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/integration/opsgenie/services" \ -H "Accept: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}"

POST https://api.ap1.datadoghq.com/api/v2/integration/opsgenie/serviceshttps://api.datadoghq.eu/api/v2/integration/opsgenie/serviceshttps://api.ddog-gov.com/api/v2/integration/opsgenie/serviceshttps://api.datadoghq.com/api/v2/integration/opsgenie/serviceshttps://api.us3.datadoghq.com/api/v2/integration/opsgenie/serviceshttps://api.us5.datadoghq.com/api/v2/integration/opsgenie/services

Overview

Create a new service object in the Opsgenie integration. This endpoint requires the manage_integrations permission.

Request

Body Data (required)

Opsgenie service payload

Expand All

Field

Type

Description

data [required]

object

Opsgenie service data for a create request.

attributes [required]

object

The Opsgenie service attributes for a create request.

custom_url

string

The custom URL for a custom region.

name [required]

string

The name for the Opsgenie service.

opsgenie_api_key [required]

string

The Opsgenie API key for your Opsgenie service.

region [required]

enum

The region for the Opsgenie service. Allowed enum values: us,eu,custom

type [required]

enum

Opsgenie service resource type. Allowed enum values: opsgenie-service

default: opsgenie-service

{
  "data": {
    "attributes": {
      "name": "Example-Opsgenie-Integration",
      "opsgenie_api_key": "00000000-0000-0000-0000-000000000000",
      "region": "us"
    },
    "type": "opsgenie-service"
  }
}

Response

CREATED

Response of an Opsgenie service.

Expand All

Field

Type

Description

data [required]

object

Opsgenie service data from a response.

attributes [required]

object

The attributes from an Opsgenie service response.

custom_url

string

The custom URL for a custom region.

name

string

The name for the Opsgenie service.

region

enum

The region for the Opsgenie service. Allowed enum values: us,eu,custom

id [required]

string

The ID of the Opsgenie service.

type [required]

enum

Opsgenie service resource type. Allowed enum values: opsgenie-service

default: opsgenie-service

{
  "data": {
    "attributes": {
      "custom_url": null,
      "name": "fake-opsgenie-service-name",
      "region": "us"
    },
    "id": "596da4af-0563-4097-90ff-07230c3f9db3",
    "type": "opsgenie-service"
  }
}

Bad Request

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Forbidden

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Conflict

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

                          # Curl command
curl -X POST "https://api.ap1.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/integration/opsgenie/services" \ -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": { "name": "Example-Opsgenie-Integration", "opsgenie_api_key": "00000000-0000-0000-0000-000000000000", "region": "us" }, "type": "opsgenie-service" } } EOF

GET https://api.ap1.datadoghq.com/api/v2/integration/opsgenie/services/{integration_service_id}https://api.datadoghq.eu/api/v2/integration/opsgenie/services/{integration_service_id}https://api.ddog-gov.com/api/v2/integration/opsgenie/services/{integration_service_id}https://api.datadoghq.com/api/v2/integration/opsgenie/services/{integration_service_id}https://api.us3.datadoghq.com/api/v2/integration/opsgenie/services/{integration_service_id}https://api.us5.datadoghq.com/api/v2/integration/opsgenie/services/{integration_service_id}

Overview

Get a single service from the Datadog Opsgenie integration. This endpoint requires the integrations_read permission.

Arguments

Path Parameters

Name

Type

Description

integration_service_id [required]

string

The UUID of the service.

Response

OK

Response of an Opsgenie service.

Expand All

Field

Type

Description

data [required]

object

Opsgenie service data from a response.

attributes [required]

object

The attributes from an Opsgenie service response.

custom_url

string

The custom URL for a custom region.

name

string

The name for the Opsgenie service.

region

enum

The region for the Opsgenie service. Allowed enum values: us,eu,custom

id [required]

string

The ID of the Opsgenie service.

type [required]

enum

Opsgenie service resource type. Allowed enum values: opsgenie-service

default: opsgenie-service

{
  "data": {
    "attributes": {
      "custom_url": null,
      "name": "fake-opsgenie-service-name",
      "region": "us"
    },
    "id": "596da4af-0563-4097-90ff-07230c3f9db3",
    "type": "opsgenie-service"
  }
}

Bad Request

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Forbidden

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Not Found

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Conflict

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

                  # Path parameters
export integration_service_id="CHANGE_ME"
# Curl command
curl -X GET "https://api.ap1.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/integration/opsgenie/services/${integration_service_id}" \ -H "Accept: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}"

PATCH https://api.ap1.datadoghq.com/api/v2/integration/opsgenie/services/{integration_service_id}https://api.datadoghq.eu/api/v2/integration/opsgenie/services/{integration_service_id}https://api.ddog-gov.com/api/v2/integration/opsgenie/services/{integration_service_id}https://api.datadoghq.com/api/v2/integration/opsgenie/services/{integration_service_id}https://api.us3.datadoghq.com/api/v2/integration/opsgenie/services/{integration_service_id}https://api.us5.datadoghq.com/api/v2/integration/opsgenie/services/{integration_service_id}

Overview

Update a single service object in the Datadog Opsgenie integration. This endpoint requires the manage_integrations permission.

Arguments

Path Parameters

Name

Type

Description

integration_service_id [required]

string

The UUID of the service.

Request

Body Data (required)

Opsgenie service payload.

Expand All

Field

Type

Description

data [required]

object

Opsgenie service for an update request.

attributes [required]

object

The Opsgenie service attributes for an update request.

custom_url

string

The custom URL for a custom region.

name

string

The name for the Opsgenie service.

opsgenie_api_key

string

The Opsgenie API key for your Opsgenie service.

region

enum

The region for the Opsgenie service. Allowed enum values: us,eu,custom

id [required]

string

The ID of the Opsgenie service.

type [required]

enum

Opsgenie service resource type. Allowed enum values: opsgenie-service

default: opsgenie-service

{
  "data": {
    "attributes": {
      "name": "fake-opsgenie-service-name--updated",
      "opsgenie_api_key": "00000000-0000-0000-0000-000000000000",
      "region": "eu"
    },
    "id": "596da4af-0563-4097-90ff-07230c3f9db3",
    "type": "opsgenie-service"
  }
}

Response

OK

Response of an Opsgenie service.

Expand All

Field

Type

Description

data [required]

object

Opsgenie service data from a response.

attributes [required]

object

The attributes from an Opsgenie service response.

custom_url

string

The custom URL for a custom region.

name

string

The name for the Opsgenie service.

region

enum

The region for the Opsgenie service. Allowed enum values: us,eu,custom

id [required]

string

The ID of the Opsgenie service.

type [required]

enum

Opsgenie service resource type. Allowed enum values: opsgenie-service

default: opsgenie-service

{
  "data": {
    "attributes": {
      "custom_url": null,
      "name": "fake-opsgenie-service-name",
      "region": "us"
    },
    "id": "596da4af-0563-4097-90ff-07230c3f9db3",
    "type": "opsgenie-service"
  }
}

Bad Request

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Forbidden

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Not Found

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Conflict

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

                          # Path parameters
export integration_service_id="CHANGE_ME"
# Curl command
curl -X PATCH "https://api.ap1.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/integration/opsgenie/services/${integration_service_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": { "name": "fake-opsgenie-service-name--updated", "opsgenie_api_key": "00000000-0000-0000-0000-000000000000", "region": "eu" }, "id": "596da4af-0563-4097-90ff-07230c3f9db3", "type": "opsgenie-service" } } EOF

DELETE https://api.ap1.datadoghq.com/api/v2/integration/opsgenie/services/{integration_service_id}https://api.datadoghq.eu/api/v2/integration/opsgenie/services/{integration_service_id}https://api.ddog-gov.com/api/v2/integration/opsgenie/services/{integration_service_id}https://api.datadoghq.com/api/v2/integration/opsgenie/services/{integration_service_id}https://api.us3.datadoghq.com/api/v2/integration/opsgenie/services/{integration_service_id}https://api.us5.datadoghq.com/api/v2/integration/opsgenie/services/{integration_service_id}

Overview

Delete a single service object in the Datadog Opsgenie integration. This endpoint requires the manage_integrations permission.

Arguments

Path Parameters

Name

Type

Description

integration_service_id [required]

string

The UUID of the service.

Response

OK

Bad Request

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Forbidden

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Not Found

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

                  # Path parameters
export integration_service_id="CHANGE_ME"
# Curl command
curl -X DELETE "https://api.ap1.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/integration/opsgenie/services/${integration_service_id}" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}"

PREVIEWING: aliciascott/DOCS-9725-Cloudcraft