PagerDuty 통합

Datadog API를 통해 바로 Datadog-PagerDuty 통합을 구성하세요.

POST https://api.ap1.datadoghq.com/api/v1/integration/pagerduty/configuration/serviceshttps://api.datadoghq.eu/api/v1/integration/pagerduty/configuration/serviceshttps://api.ddog-gov.com/api/v1/integration/pagerduty/configuration/serviceshttps://api.datadoghq.com/api/v1/integration/pagerduty/configuration/serviceshttps://api.us3.datadoghq.com/api/v1/integration/pagerduty/configuration/serviceshttps://api.us5.datadoghq.com/api/v1/integration/pagerduty/configuration/services

개요

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

요청

Body Data (required)

Create a new service object request body.

Expand All

항목

유형

설명

service_key [required]

string

Your service key in PagerDuty.

service_name [required]

string

Your service name associated with a service key in PagerDuty.

{
  "service_key": "",
  "service_name": ""
}

응답

OK

PagerDuty service object name.

Expand All

항목

유형

설명

service_name [required]

string

Your service name associated service key in PagerDuty.

{
  "service_name": ""
}

Bad Request

Error response object.

Expand All

항목

유형

설명

errors [required]

[string]

Array of errors returned by the API.

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

Authentication error

Error response object.

Expand All

항목

유형

설명

errors [required]

[string]

Array of errors returned by the API.

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

Too many requests

Error response object.

Expand All

항목

유형

설명

errors [required]

[string]

Array of errors returned by the API.

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

코드 사례

/**
 * Create a new service object returns "OK" response
 */

import { client, v1 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
const apiInstance = new v1.PagerDutyIntegrationApi(configuration);

const params: v1.PagerDutyIntegrationApiCreatePagerDutyIntegrationServiceRequest =
  {
    body: {
      serviceKey: "",
      serviceName: "",
    },
  };

apiInstance
  .createPagerDutyIntegrationService(params)
  .then((data: v1.PagerDutyServiceName) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));

Instructions

First install the library and its dependencies and then save the example to example.ts and run following commands:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" tsc "example.ts"

GET https://api.ap1.datadoghq.com/api/v1/integration/pagerduty/configuration/services/{service_name}https://api.datadoghq.eu/api/v1/integration/pagerduty/configuration/services/{service_name}https://api.ddog-gov.com/api/v1/integration/pagerduty/configuration/services/{service_name}https://api.datadoghq.com/api/v1/integration/pagerduty/configuration/services/{service_name}https://api.us3.datadoghq.com/api/v1/integration/pagerduty/configuration/services/{service_name}https://api.us5.datadoghq.com/api/v1/integration/pagerduty/configuration/services/{service_name}

개요

Get service name in the Datadog-PagerDuty integration. This endpoint requires the integrations_read permission.

인수

경로 파라미터

이름

유형

설명

service_name [required]

string

The service name.

응답

OK

PagerDuty service object name.

Expand All

항목

유형

설명

service_name [required]

string

Your service name associated service key in PagerDuty.

{
  "service_name": ""
}

Authentication error

Error response object.

Expand All

항목

유형

설명

errors [required]

[string]

Array of errors returned by the API.

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

Item Not Found

Error response object.

Expand All

항목

유형

설명

errors [required]

[string]

Array of errors returned by the API.

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

Too many requests

Error response object.

Expand All

항목

유형

설명

errors [required]

[string]

Array of errors returned by the API.

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

코드 사례

/**
 * Get a single service object returns "OK" response
 */

import { client, v1 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
const apiInstance = new v1.PagerDutyIntegrationApi(configuration);

const params: v1.PagerDutyIntegrationApiGetPagerDutyIntegrationServiceRequest =
  {
    serviceName: "service_name",
  };

apiInstance
  .getPagerDutyIntegrationService(params)
  .then((data: v1.PagerDutyServiceName) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));

Instructions

First install the library and its dependencies and then save the example to example.ts and run following commands:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" tsc "example.ts"

PUT https://api.ap1.datadoghq.com/api/v1/integration/pagerduty/configuration/services/{service_name}https://api.datadoghq.eu/api/v1/integration/pagerduty/configuration/services/{service_name}https://api.ddog-gov.com/api/v1/integration/pagerduty/configuration/services/{service_name}https://api.datadoghq.com/api/v1/integration/pagerduty/configuration/services/{service_name}https://api.us3.datadoghq.com/api/v1/integration/pagerduty/configuration/services/{service_name}https://api.us5.datadoghq.com/api/v1/integration/pagerduty/configuration/services/{service_name}

개요

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

인수

경로 파라미터

이름

유형

설명

service_name [required]

string

The service name

요청

Body Data (required)

Update an existing service object request body.

Expand All

항목

유형

설명

service_key [required]

string

Your service key in PagerDuty.

{
  "service_key": ""
}

응답

OK

Bad Request

Error response object.

Expand All

항목

유형

설명

errors [required]

[string]

Array of errors returned by the API.

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

Authentication error

Error response object.

Expand All

항목

유형

설명

errors [required]

[string]

Array of errors returned by the API.

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

Item Not Found

Error response object.

Expand All

항목

유형

설명

errors [required]

[string]

Array of errors returned by the API.

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

Too many requests

Error response object.

Expand All

항목

유형

설명

errors [required]

[string]

Array of errors returned by the API.

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

코드 사례

/**
 * Update a single service object returns "OK" response
 */

import { client, v1 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
const apiInstance = new v1.PagerDutyIntegrationApi(configuration);

const params: v1.PagerDutyIntegrationApiUpdatePagerDutyIntegrationServiceRequest =
  {
    body: {
      serviceKey: "",
    },
    serviceName: "service_name",
  };

apiInstance
  .updatePagerDutyIntegrationService(params)
  .then((data: any) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));

Instructions

First install the library and its dependencies and then save the example to example.ts and run following commands:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" tsc "example.ts"

DELETE https://api.ap1.datadoghq.com/api/v1/integration/pagerduty/configuration/services/{service_name}https://api.datadoghq.eu/api/v1/integration/pagerduty/configuration/services/{service_name}https://api.ddog-gov.com/api/v1/integration/pagerduty/configuration/services/{service_name}https://api.datadoghq.com/api/v1/integration/pagerduty/configuration/services/{service_name}https://api.us3.datadoghq.com/api/v1/integration/pagerduty/configuration/services/{service_name}https://api.us5.datadoghq.com/api/v1/integration/pagerduty/configuration/services/{service_name}

개요

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

인수

경로 파라미터

이름

유형

설명

service_name [required]

string

The service name

응답

No Content

Authentication error

Error response object.

Expand All

항목

유형

설명

errors [required]

[string]

Array of errors returned by the API.

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

Item Not Found

Error response object.

Expand All

항목

유형

설명

errors [required]

[string]

Array of errors returned by the API.

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

Too many requests

Error response object.

Expand All

항목

유형

설명

errors [required]

[string]

Array of errors returned by the API.

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

코드 사례

/**
 * Delete a single service object returns "No Content" response
 */

import { client, v1 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
const apiInstance = new v1.PagerDutyIntegrationApi(configuration);

const params: v1.PagerDutyIntegrationApiDeletePagerDutyIntegrationServiceRequest =
  {
    serviceName: "service_name",
  };

apiInstance
  .deletePagerDutyIntegrationService(params)
  .then((data: any) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));

Instructions

First install the library and its dependencies and then save the example to example.ts and run following commands:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" tsc "example.ts"

PREVIEWING: brett.blue/dt-red-compatibility