Status Pages

Manage your status pages and communicate service disruptions to stakeholders via Datadog’s API. See the Status Pages documentation for more information.

POST https://api.ap1.datadoghq.com/api/v2/statuspageshttps://api.ap2.datadoghq.com/api/v2/statuspageshttps://api.datadoghq.eu/api/v2/statuspageshttps://api.ddog-gov.com/api/v2/statuspageshttps://api.datadoghq.com/api/v2/statuspageshttps://api.us3.datadoghq.com/api/v2/statuspageshttps://api.us5.datadoghq.com/api/v2/statuspages

개요

Creates a new status page. Note: Publishing a status page on creation via the enabled property will be deprecated. Use the dedicated publish status page endpoint after creation instead. This endpoint requires the status_pages_settings_write permission.

인수

쿼리 문자열

이름

유형

설명

include

string

Comma-separated list of resources to include. Supported values: created_by_user, last_modified_by_user.

요청

Body Data (required)

Expand All

항목

유형

설명

data

object

The data object for creating a status page.

attributes [required]

object

The supported attributes for creating a status page.

company_logo

string

The base64-encoded image data displayed on the status page.

components

[object]

The components displayed on the status page.

components

[object]

If creating a component of type group, the components to create within the group.

id

uuid

The ID of the grouped component.

name

string

The name of the grouped component.

position

int64

The zero-indexed position of the grouped component. Relative to the other components in the group.

status

enum

The status of the component. Allowed enum values: operational,degraded,partial_outage,major_outage,maintenance

type

enum

The type of the component. Allowed enum values: component

id

uuid

The ID of the component.

name

string

The name of the component.

position

int64

The zero-indexed position of the component.

status

enum

The status of the component. Allowed enum values: operational,degraded,partial_outage,major_outage,maintenance

type

enum

The type of the component. Allowed enum values: component,group

domain_prefix [required]

string

The subdomain of the status page's url taking the form https://{domain_prefix}.statuspage.datadoghq.com. Globally unique across Datadog Status Pages.

email_header_image

string

Base64-encoded image data included in email notifications sent to status page subscribers.

enabled [required]

boolean

Whether the status page is enabled.

favicon

string

Base64-encoded image data displayed in the browser tab.

name [required]

string

The name of the status page.

subscriptions_enabled

boolean

Whether users can subscribe to the status page.

type [required]

enum

The type of the status page controlling how the status page is accessed. Allowed enum values: public,internal

visualization_type [required]

enum

The visualization type of the status page. Allowed enum values: bars_and_uptime_percentage,bars_only,component_name_only

type [required]

enum

Status pages resource type. Allowed enum values: status_pages

default: status_pages

{
  "data": {
    "attributes": {
      "name": "A Status Page",
      "domain_prefix": "5e2fd69be33e79aa",
      "components": [
        {
          "name": "Login",
          "type": "component",
          "position": 0
        },
        {
          "name": "Settings",
          "type": "component",
          "position": 1
        }
      ],
      "enabled": true,
      "type": "internal",
      "visualization_type": "bars_and_uptime_percentage"
    },
    "type": "status_pages"
  }
}

응답

Created

Response object for a single status page.

Expand All

항목

유형

설명

data

object

The data object for a status page.

attributes

object

The attributes of a status page.

company_logo

string

Base64-encoded image data displayed on the status page.

components

[object]

Components displayed on the status page.

components

[object]

If the component is of type group, the components within the group.

id

uuid

The ID of the component.

name

string

The name of the component.

position

int64

The zero-indexed position of the component. Relative to the other components in the group.

status

enum

The status of the component. Allowed enum values: operational,degraded,partial_outage,major_outage,maintenance

type

enum

The type of the component. Allowed enum values: component

id

uuid

The ID of the component.

name

string

The name of the component.

position

int64

The zero-indexed position of the component.

status

enum

The status of the component. Allowed enum values: operational,degraded,partial_outage,major_outage,maintenance

type

enum

The type of the component. Allowed enum values: component,group

created_at

date-time

Timestamp of when the status page was created.

custom_domain

string

If configured, the url that the status page is accessible at.

custom_domain_enabled

boolean

Whether the custom domain is configured.

domain_prefix

string

The subdomain of the status page's url taking the form https://{domain_prefix}.statuspage.datadoghq.com. Globally unique across Datadog Status Pages.

email_header_image

string

Base64-encoded image data included in email notifications sent to status page subscribers.

enabled

boolean

Whether the status page is enabled.

favicon

string

Base64-encoded image data displayed in the browser tab.

modified_at

date-time

Timestamp of when the status page was last modified.

name

string

The name of the status page.

page_url

string

The url that the status page is accessible at.

subscriptions_enabled

boolean

Whether users can subscribe to the status page.

type

enum

The type of the status page controlling how the status page is accessed. Allowed enum values: public,internal

visualization_type

enum

The visualization type of the status page. Allowed enum values: bars_and_uptime_percentage,bars_only,component_name_only

id

uuid

The ID of the status page.

relationships

object

The relationships of a status page.

created_by_user

object

The Datadog user who created the status page.

data [required]

object

The data object identifying the Datadog user who created the status page.

id [required]

string

The ID of the Datadog user who created the status page.

type [required]

enum

Users resource type. Allowed enum values: users

default: users

last_modified_by_user

object

The Datadog user who last modified the status page.

data [required]

object

The data object identifying the Datadog user who last modified the status page.

id [required]

string

The ID of the Datadog user who last modified the status page.

type [required]

enum

Users resource type. Allowed enum values: users

default: users

type [required]

enum

Status pages resource type. Allowed enum values: status_pages

default: status_pages

included

[ <oneOf>]

The included related resources of a status page. Client must explicitly request these resources by name in the include query parameter.

Option 1

object

The included Datadog user resource.

attributes

object

Attributes of the Datadog user.

email

string

The email of the Datadog user.

handle

string

The handle of the Datadog user.

icon

string

The icon of the Datadog user.

name

string

The name of the Datadog user.

uuid

string

The UUID of the Datadog user.

id

uuid

The ID of the Datadog user.

type [required]

enum

Users resource type. Allowed enum values: users

default: users

{
  "data": {
    "attributes": {
      "company_logo": "string",
      "components": [
        {
          "components": [
            {
              "id": "string",
              "name": "string",
              "position": "integer",
              "status": "string",
              "type": "component"
            }
          ],
          "id": "string",
          "name": "string",
          "position": "integer",
          "status": "string",
          "type": "component"
        }
      ],
      "created_at": "2019-09-19T10:00:00.000Z",
      "custom_domain": "string",
      "custom_domain_enabled": false,
      "domain_prefix": "string",
      "email_header_image": "string",
      "enabled": false,
      "favicon": "string",
      "modified_at": "2019-09-19T10:00:00.000Z",
      "name": "string",
      "page_url": "string",
      "subscriptions_enabled": false,
      "type": "public",
      "visualization_type": "bars_and_uptime_percentage"
    },
    "id": "string",
    "relationships": {
      "created_by_user": {
        "data": {
          "id": "",
          "type": "users"
        }
      },
      "last_modified_by_user": {
        "data": {
          "id": "",
          "type": "users"
        }
      }
    },
    "type": "status_pages"
  },
  "included": [
    {
      "attributes": {
        "email": "string",
        "handle": "string",
        "icon": "string",
        "name": "string",
        "uuid": "string"
      },
      "id": "string",
      "type": "users"
    }
  ]
}

Too many requests

API error response.

Expand All

항목

유형

설명

errors [required]

[string]

A list of errors.

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

코드 사례

                          # Curl command
curl -X POST "https://api.ap1.datadoghq.com"https://api.ap2.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/statuspages" \ -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": "A Status Page", "domain_prefix": "5e2fd69be33e79aa", "components": [ { "name": "Login", "type": "component", "position": 0 }, { "name": "Settings", "type": "component", "position": 1 } ], "enabled": true, "type": "internal", "visualization_type": "bars_and_uptime_percentage" }, "type": "status_pages" } } EOF
// Create status page returns "Created" response

package main

import (
	"context"
	"encoding/json"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV2"
)

func main() {
	body := datadogV2.CreateStatusPageRequest{
		Data: &datadogV2.CreateStatusPageRequestData{
			Attributes: datadogV2.CreateStatusPageRequestDataAttributes{
				Name:         "A Status Page",
				DomainPrefix: "5e2fd69be33e79aa",
				Components: []datadogV2.CreateStatusPageRequestDataAttributesComponentsItems{
					{
						Name:     datadog.PtrString("Login"),
						Type:     datadogV2.CREATECOMPONENTREQUESTDATAATTRIBUTESTYPE_COMPONENT.Ptr(),
						Position: datadog.PtrInt64(0),
					},
					{
						Name:     datadog.PtrString("Settings"),
						Type:     datadogV2.CREATECOMPONENTREQUESTDATAATTRIBUTESTYPE_COMPONENT.Ptr(),
						Position: datadog.PtrInt64(1),
					},
				},
				Enabled:           true,
				Type:              datadogV2.CREATESTATUSPAGEREQUESTDATAATTRIBUTESTYPE_INTERNAL,
				VisualizationType: datadogV2.CREATESTATUSPAGEREQUESTDATAATTRIBUTESVISUALIZATIONTYPE_BARS_AND_UPTIME_PERCENTAGE,
			},
			Type: datadogV2.STATUSPAGEDATATYPE_STATUS_PAGES,
		},
	}
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV2.NewStatusPagesApi(apiClient)
	resp, r, err := api.CreateStatusPage(ctx, body, *datadogV2.NewCreateStatusPageOptionalParameters())

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `StatusPagesApi.CreateStatusPage`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `StatusPagesApi.CreateStatusPage`:\n%s\n", responseContent)
}

Instructions

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

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" go run "main.go"
// Create status page returns "Created" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.StatusPagesApi;
import com.datadog.api.client.v2.model.CreateComponentRequestDataAttributesType;
import com.datadog.api.client.v2.model.CreateStatusPageRequest;
import com.datadog.api.client.v2.model.CreateStatusPageRequestData;
import com.datadog.api.client.v2.model.CreateStatusPageRequestDataAttributes;
import com.datadog.api.client.v2.model.CreateStatusPageRequestDataAttributesComponentsItems;
import com.datadog.api.client.v2.model.CreateStatusPageRequestDataAttributesType;
import com.datadog.api.client.v2.model.CreateStatusPageRequestDataAttributesVisualizationType;
import com.datadog.api.client.v2.model.StatusPage;
import com.datadog.api.client.v2.model.StatusPageDataType;
import java.util.Arrays;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = ApiClient.getDefaultApiClient();
    StatusPagesApi apiInstance = new StatusPagesApi(defaultClient);

    CreateStatusPageRequest body =
        new CreateStatusPageRequest()
            .data(
                new CreateStatusPageRequestData()
                    .attributes(
                        new CreateStatusPageRequestDataAttributes()
                            .name("A Status Page")
                            .domainPrefix("5e2fd69be33e79aa")
                            .components(
                                Arrays.asList(
                                    new CreateStatusPageRequestDataAttributesComponentsItems()
                                        .name("Login")
                                        .type(CreateComponentRequestDataAttributesType.COMPONENT)
                                        .position(0L),
                                    new CreateStatusPageRequestDataAttributesComponentsItems()
                                        .name("Settings")
                                        .type(CreateComponentRequestDataAttributesType.COMPONENT)
                                        .position(1L)))
                            .enabled(true)
                            .type(CreateStatusPageRequestDataAttributesType.INTERNAL)
                            .visualizationType(
                                CreateStatusPageRequestDataAttributesVisualizationType
                                    .BARS_AND_UPTIME_PERCENTAGE))
                    .type(StatusPageDataType.STATUS_PAGES));

    try {
      StatusPage result = apiInstance.createStatusPage(body);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling StatusPagesApi#createStatusPage");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Instructions

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

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" java "Example.java"
"""
Create status page returns "Created" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.status_pages_api import StatusPagesApi
from datadog_api_client.v2.model.create_component_request_data_attributes_type import (
    CreateComponentRequestDataAttributesType,
)
from datadog_api_client.v2.model.create_status_page_request import CreateStatusPageRequest
from datadog_api_client.v2.model.create_status_page_request_data import CreateStatusPageRequestData
from datadog_api_client.v2.model.create_status_page_request_data_attributes import CreateStatusPageRequestDataAttributes
from datadog_api_client.v2.model.create_status_page_request_data_attributes_components_items import (
    CreateStatusPageRequestDataAttributesComponentsItems,
)
from datadog_api_client.v2.model.create_status_page_request_data_attributes_type import (
    CreateStatusPageRequestDataAttributesType,
)
from datadog_api_client.v2.model.create_status_page_request_data_attributes_visualization_type import (
    CreateStatusPageRequestDataAttributesVisualizationType,
)
from datadog_api_client.v2.model.status_page_data_type import StatusPageDataType

body = CreateStatusPageRequest(
    data=CreateStatusPageRequestData(
        attributes=CreateStatusPageRequestDataAttributes(
            name="A Status Page",
            domain_prefix="5e2fd69be33e79aa",
            components=[
                CreateStatusPageRequestDataAttributesComponentsItems(
                    name="Login",
                    type=CreateComponentRequestDataAttributesType.COMPONENT,
                    position=0,
                ),
                CreateStatusPageRequestDataAttributesComponentsItems(
                    name="Settings",
                    type=CreateComponentRequestDataAttributesType.COMPONENT,
                    position=1,
                ),
            ],
            enabled=True,
            type=CreateStatusPageRequestDataAttributesType.INTERNAL,
            visualization_type=CreateStatusPageRequestDataAttributesVisualizationType.BARS_AND_UPTIME_PERCENTAGE,
        ),
        type=StatusPageDataType.STATUS_PAGES,
    ),
)

configuration = Configuration()
with ApiClient(configuration) as api_client:
    api_instance = StatusPagesApi(api_client)
    response = api_instance.create_status_page(body=body)

    print(response)

Instructions

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

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" python3 "example.py"
# Create status page returns "Created" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::StatusPagesAPI.new

body = DatadogAPIClient::V2::CreateStatusPageRequest.new({
  data: DatadogAPIClient::V2::CreateStatusPageRequestData.new({
    attributes: DatadogAPIClient::V2::CreateStatusPageRequestDataAttributes.new({
      name: "A Status Page",
      domain_prefix: "5e2fd69be33e79aa",
      components: [
        DatadogAPIClient::V2::CreateStatusPageRequestDataAttributesComponentsItems.new({
          name: "Login",
          type: DatadogAPIClient::V2::CreateComponentRequestDataAttributesType::COMPONENT,
          position: 0,
        }),
        DatadogAPIClient::V2::CreateStatusPageRequestDataAttributesComponentsItems.new({
          name: "Settings",
          type: DatadogAPIClient::V2::CreateComponentRequestDataAttributesType::COMPONENT,
          position: 1,
        }),
      ],
      enabled: true,
      type: DatadogAPIClient::V2::CreateStatusPageRequestDataAttributesType::INTERNAL,
      visualization_type: DatadogAPIClient::V2::CreateStatusPageRequestDataAttributesVisualizationType::BARS_AND_UPTIME_PERCENTAGE,
    }),
    type: DatadogAPIClient::V2::StatusPageDataType::STATUS_PAGES,
  }),
})
p api_instance.create_status_page(body)

Instructions

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

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" rb "example.rb"
// Create status page returns "Created" response
use datadog_api_client::datadog;
use datadog_api_client::datadogV2::api_status_pages::CreateStatusPageOptionalParams;
use datadog_api_client::datadogV2::api_status_pages::StatusPagesAPI;
use datadog_api_client::datadogV2::model::CreateComponentRequestDataAttributesType;
use datadog_api_client::datadogV2::model::CreateStatusPageRequest;
use datadog_api_client::datadogV2::model::CreateStatusPageRequestData;
use datadog_api_client::datadogV2::model::CreateStatusPageRequestDataAttributes;
use datadog_api_client::datadogV2::model::CreateStatusPageRequestDataAttributesComponentsItems;
use datadog_api_client::datadogV2::model::CreateStatusPageRequestDataAttributesType;
use datadog_api_client::datadogV2::model::CreateStatusPageRequestDataAttributesVisualizationType;
use datadog_api_client::datadogV2::model::StatusPageDataType;

#[tokio::main]
async fn main() {
    let body = CreateStatusPageRequest::new().data(CreateStatusPageRequestData::new(
        CreateStatusPageRequestDataAttributes::new(
            "5e2fd69be33e79aa".to_string(),
            true,
            "A Status Page".to_string(),
            CreateStatusPageRequestDataAttributesType::INTERNAL,
            CreateStatusPageRequestDataAttributesVisualizationType::BARS_AND_UPTIME_PERCENTAGE,
        )
        .components(vec![
            CreateStatusPageRequestDataAttributesComponentsItems::new()
                .name("Login".to_string())
                .position(0)
                .type_(CreateComponentRequestDataAttributesType::COMPONENT),
            CreateStatusPageRequestDataAttributesComponentsItems::new()
                .name("Settings".to_string())
                .position(1)
                .type_(CreateComponentRequestDataAttributesType::COMPONENT),
        ]),
        StatusPageDataType::STATUS_PAGES,
    ));
    let configuration = datadog::Configuration::new();
    let api = StatusPagesAPI::with_config(configuration);
    let resp = api
        .create_status_page(body, CreateStatusPageOptionalParams::default())
        .await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}

Instructions

First install the library and its dependencies and then save the example to src/main.rs and run following commands:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo run
/**
 * Create status page returns "Created" response
 */

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

const configuration = client.createConfiguration();
const apiInstance = new v2.StatusPagesApi(configuration);

const params: v2.StatusPagesApiCreateStatusPageRequest = {
  body: {
    data: {
      attributes: {
        name: "A Status Page",
        domainPrefix: "5e2fd69be33e79aa",
        components: [
          {
            name: "Login",
            type: "component",
            position: 0,
          },
          {
            name: "Settings",
            type: "component",
            position: 1,
          },
        ],
        enabled: true,
        type: "internal",
        visualizationType: "bars_and_uptime_percentage",
      },
      type: "status_pages",
    },
  },
};

apiInstance
  .createStatusPage(params)
  .then((data: v2.StatusPage) => {
    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.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" tsc "example.ts"

PATCH https://api.ap1.datadoghq.com/api/v2/statuspages/{page_id}https://api.ap2.datadoghq.com/api/v2/statuspages/{page_id}https://api.datadoghq.eu/api/v2/statuspages/{page_id}https://api.ddog-gov.com/api/v2/statuspages/{page_id}https://api.datadoghq.com/api/v2/statuspages/{page_id}https://api.us3.datadoghq.com/api/v2/statuspages/{page_id}https://api.us5.datadoghq.com/api/v2/statuspages/{page_id}

개요

Updates an existing status page’s attributes. Note: Publishing and unpublishing via the enabled property will be deprecated on this endpoint. Use the dedicated publish and unpublish status page endpoints instead. This endpoint requires the status_pages_settings_write permission.

인수

경로 파라미터

이름

유형

설명

page_id [required]

string

The ID of the status page.

쿼리 문자열

이름

유형

설명

delete_subscribers

boolean

Whether to delete existing subscribers when updating a status page’s type.

include

string

Comma-separated list of resources to include. Supported values: created_by_user, last_modified_by_user.

요청

Body Data (required)

Expand All

항목

유형

설명

data

object

The data object for updating a status page.

attributes [required]

object

The supported attributes for updating a status page.

company_logo

string

The base64-encoded image data displayed on the status page.

domain_prefix

string

The subdomain of the status page's url taking the form https://{domain_prefix}.statuspage.datadoghq.com. Globally unique across Datadog Status Pages.

email_header_image

string

The base64-encoded image data displayed in email notifications sent to status page subscribers.

enabled

boolean

Whether the status page is enabled.

favicon

string

The base64-encoded image data displayed in the browser tab.

name

string

The name of the status page.

subscriptions_enabled

boolean

Whether users can subscribe to the status page.

type

enum

The type of the status page controlling how the status page is accessed. Allowed enum values: public,internal

visualization_type

enum

The visualization type of the status page. Allowed enum values: bars_and_uptime_percentage,bars_only,component_name_only

id [required]

uuid

The ID of the status page.

type [required]

enum

Status pages resource type. Allowed enum values: status_pages

default: status_pages

{
  "data": {
    "attributes": {
      "name": "A Status Page in US1"
    },
    "id": "string",
    "type": "status_pages"
  }
}

응답

OK

Response object for a single status page.

Expand All

항목

유형

설명

data

object

The data object for a status page.

attributes

object

The attributes of a status page.

company_logo

string

Base64-encoded image data displayed on the status page.

components

[object]

Components displayed on the status page.

components

[object]

If the component is of type group, the components within the group.

id

uuid

The ID of the component.

name

string

The name of the component.

position

int64

The zero-indexed position of the component. Relative to the other components in the group.

status

enum

The status of the component. Allowed enum values: operational,degraded,partial_outage,major_outage,maintenance

type

enum

The type of the component. Allowed enum values: component

id

uuid

The ID of the component.

name

string

The name of the component.

position

int64

The zero-indexed position of the component.

status

enum

The status of the component. Allowed enum values: operational,degraded,partial_outage,major_outage,maintenance

type

enum

The type of the component. Allowed enum values: component,group

created_at

date-time

Timestamp of when the status page was created.

custom_domain

string

If configured, the url that the status page is accessible at.

custom_domain_enabled

boolean

Whether the custom domain is configured.

domain_prefix

string

The subdomain of the status page's url taking the form https://{domain_prefix}.statuspage.datadoghq.com. Globally unique across Datadog Status Pages.

email_header_image

string

Base64-encoded image data included in email notifications sent to status page subscribers.

enabled

boolean

Whether the status page is enabled.

favicon

string

Base64-encoded image data displayed in the browser tab.

modified_at

date-time

Timestamp of when the status page was last modified.

name

string

The name of the status page.

page_url

string

The url that the status page is accessible at.

subscriptions_enabled

boolean

Whether users can subscribe to the status page.

type

enum

The type of the status page controlling how the status page is accessed. Allowed enum values: public,internal

visualization_type

enum

The visualization type of the status page. Allowed enum values: bars_and_uptime_percentage,bars_only,component_name_only

id

uuid

The ID of the status page.

relationships

object

The relationships of a status page.

created_by_user

object

The Datadog user who created the status page.

data [required]

object

The data object identifying the Datadog user who created the status page.

id [required]

string

The ID of the Datadog user who created the status page.

type [required]

enum

Users resource type. Allowed enum values: users

default: users

last_modified_by_user

object

The Datadog user who last modified the status page.

data [required]

object

The data object identifying the Datadog user who last modified the status page.

id [required]

string

The ID of the Datadog user who last modified the status page.

type [required]

enum

Users resource type. Allowed enum values: users

default: users

type [required]

enum

Status pages resource type. Allowed enum values: status_pages

default: status_pages

included

[ <oneOf>]

The included related resources of a status page. Client must explicitly request these resources by name in the include query parameter.

Option 1

object

The included Datadog user resource.

attributes

object

Attributes of the Datadog user.

email

string

The email of the Datadog user.

handle

string

The handle of the Datadog user.

icon

string

The icon of the Datadog user.

name

string

The name of the Datadog user.

uuid

string

The UUID of the Datadog user.

id

uuid

The ID of the Datadog user.

type [required]

enum

Users resource type. Allowed enum values: users

default: users

{
  "data": {
    "attributes": {
      "company_logo": "string",
      "components": [
        {
          "components": [
            {
              "id": "string",
              "name": "string",
              "position": "integer",
              "status": "string",
              "type": "component"
            }
          ],
          "id": "string",
          "name": "string",
          "position": "integer",
          "status": "string",
          "type": "component"
        }
      ],
      "created_at": "2019-09-19T10:00:00.000Z",
      "custom_domain": "string",
      "custom_domain_enabled": false,
      "domain_prefix": "string",
      "email_header_image": "string",
      "enabled": false,
      "favicon": "string",
      "modified_at": "2019-09-19T10:00:00.000Z",
      "name": "string",
      "page_url": "string",
      "subscriptions_enabled": false,
      "type": "public",
      "visualization_type": "bars_and_uptime_percentage"
    },
    "id": "string",
    "relationships": {
      "created_by_user": {
        "data": {
          "id": "",
          "type": "users"
        }
      },
      "last_modified_by_user": {
        "data": {
          "id": "",
          "type": "users"
        }
      }
    },
    "type": "status_pages"
  },
  "included": [
    {
      "attributes": {
        "email": "string",
        "handle": "string",
        "icon": "string",
        "name": "string",
        "uuid": "string"
      },
      "id": "string",
      "type": "users"
    }
  ]
}

Too many requests

API error response.

Expand All

항목

유형

설명

errors [required]

[string]

A list of errors.

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

코드 사례

                          # Path parameters
export page_id="1234abcd-12ab-34cd-56ef-123456abcdef"
# Curl command
curl -X PATCH "https://api.ap1.datadoghq.com"https://api.ap2.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/statuspages/${page_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": "A Status Page in US1" }, "id": "string", "type": "status_pages" } } EOF
// Update status page returns "OK" response

package main

import (
	"context"
	"encoding/json"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV2"
	"github.com/google/uuid"
)

func main() {
	// there is a valid "status_page" in the system
	StatusPageDataID := uuid.MustParse(os.Getenv("STATUS_PAGE_DATA_ID"))

	body := datadogV2.PatchStatusPageRequest{
		Data: &datadogV2.PatchStatusPageRequestData{
			Attributes: datadogV2.PatchStatusPageRequestDataAttributes{
				Name: datadog.PtrString("A Status Page in US1"),
			},
			Id:   StatusPageDataID,
			Type: datadogV2.STATUSPAGEDATATYPE_STATUS_PAGES,
		},
	}
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV2.NewStatusPagesApi(apiClient)
	resp, r, err := api.UpdateStatusPage(ctx, StatusPageDataID, body, *datadogV2.NewUpdateStatusPageOptionalParameters())

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `StatusPagesApi.UpdateStatusPage`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `StatusPagesApi.UpdateStatusPage`:\n%s\n", responseContent)
}

Instructions

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

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" go run "main.go"
// Update status page returns "OK" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.StatusPagesApi;
import com.datadog.api.client.v2.model.PatchStatusPageRequest;
import com.datadog.api.client.v2.model.PatchStatusPageRequestData;
import com.datadog.api.client.v2.model.PatchStatusPageRequestDataAttributes;
import com.datadog.api.client.v2.model.StatusPage;
import com.datadog.api.client.v2.model.StatusPageDataType;
import java.util.UUID;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = ApiClient.getDefaultApiClient();
    StatusPagesApi apiInstance = new StatusPagesApi(defaultClient);

    // there is a valid "status_page" in the system
    UUID STATUS_PAGE_DATA_ID = null;
    try {
      STATUS_PAGE_DATA_ID = UUID.fromString(System.getenv("STATUS_PAGE_DATA_ID"));
    } catch (IllegalArgumentException e) {
      System.err.println("Error parsing UUID: " + e.getMessage());
    }

    PatchStatusPageRequest body =
        new PatchStatusPageRequest()
            .data(
                new PatchStatusPageRequestData()
                    .attributes(
                        new PatchStatusPageRequestDataAttributes().name("A Status Page in US1"))
                    .id(STATUS_PAGE_DATA_ID)
                    .type(StatusPageDataType.STATUS_PAGES));

    try {
      StatusPage result = apiInstance.updateStatusPage(STATUS_PAGE_DATA_ID, body);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling StatusPagesApi#updateStatusPage");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Instructions

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

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" java "Example.java"
"""
Update status page returns "OK" response
"""

from os import environ
from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.status_pages_api import StatusPagesApi
from datadog_api_client.v2.model.patch_status_page_request import PatchStatusPageRequest
from datadog_api_client.v2.model.patch_status_page_request_data import PatchStatusPageRequestData
from datadog_api_client.v2.model.patch_status_page_request_data_attributes import PatchStatusPageRequestDataAttributes
from datadog_api_client.v2.model.status_page_data_type import StatusPageDataType

# there is a valid "status_page" in the system
STATUS_PAGE_DATA_ID = environ["STATUS_PAGE_DATA_ID"]

body = PatchStatusPageRequest(
    data=PatchStatusPageRequestData(
        attributes=PatchStatusPageRequestDataAttributes(
            name="A Status Page in US1",
        ),
        id=STATUS_PAGE_DATA_ID,
        type=StatusPageDataType.STATUS_PAGES,
    ),
)

configuration = Configuration()
with ApiClient(configuration) as api_client:
    api_instance = StatusPagesApi(api_client)
    response = api_instance.update_status_page(page_id=STATUS_PAGE_DATA_ID, body=body)

    print(response)

Instructions

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

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" python3 "example.py"
# Update status page returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::StatusPagesAPI.new

# there is a valid "status_page" in the system
STATUS_PAGE_DATA_ID = ENV["STATUS_PAGE_DATA_ID"]

body = DatadogAPIClient::V2::PatchStatusPageRequest.new({
  data: DatadogAPIClient::V2::PatchStatusPageRequestData.new({
    attributes: DatadogAPIClient::V2::PatchStatusPageRequestDataAttributes.new({
      name: "A Status Page in US1",
    }),
    id: STATUS_PAGE_DATA_ID,
    type: DatadogAPIClient::V2::StatusPageDataType::STATUS_PAGES,
  }),
})
p api_instance.update_status_page(STATUS_PAGE_DATA_ID, body)

Instructions

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

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" rb "example.rb"
// Update status page returns "OK" response
use datadog_api_client::datadog;
use datadog_api_client::datadogV2::api_status_pages::StatusPagesAPI;
use datadog_api_client::datadogV2::api_status_pages::UpdateStatusPageOptionalParams;
use datadog_api_client::datadogV2::model::PatchStatusPageRequest;
use datadog_api_client::datadogV2::model::PatchStatusPageRequestData;
use datadog_api_client::datadogV2::model::PatchStatusPageRequestDataAttributes;
use datadog_api_client::datadogV2::model::StatusPageDataType;

#[tokio::main]
async fn main() {
    // there is a valid "status_page" in the system
    let status_page_data_id = uuid::Uuid::parse_str(&std::env::var("STATUS_PAGE_DATA_ID").unwrap())
        .expect("Invalid UUID");
    let body = PatchStatusPageRequest::new().data(PatchStatusPageRequestData::new(
        PatchStatusPageRequestDataAttributes::new().name("A Status Page in US1".to_string()),
        status_page_data_id.clone(),
        StatusPageDataType::STATUS_PAGES,
    ));
    let configuration = datadog::Configuration::new();
    let api = StatusPagesAPI::with_config(configuration);
    let resp = api
        .update_status_page(
            status_page_data_id.clone(),
            body,
            UpdateStatusPageOptionalParams::default(),
        )
        .await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}

Instructions

First install the library and its dependencies and then save the example to src/main.rs and run following commands:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo run
/**
 * Update status page returns "OK" response
 */

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

const configuration = client.createConfiguration();
const apiInstance = new v2.StatusPagesApi(configuration);

// there is a valid "status_page" in the system
const STATUS_PAGE_DATA_ID = process.env.STATUS_PAGE_DATA_ID as string;

const params: v2.StatusPagesApiUpdateStatusPageRequest = {
  body: {
    data: {
      attributes: {
        name: "A Status Page in US1",
      },
      id: STATUS_PAGE_DATA_ID,
      type: "status_pages",
    },
  },
  pageId: STATUS_PAGE_DATA_ID,
};

apiInstance
  .updateStatusPage(params)
  .then((data: v2.StatusPage) => {
    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.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" tsc "example.ts"

GET https://api.ap1.datadoghq.com/api/v2/statuspageshttps://api.ap2.datadoghq.com/api/v2/statuspageshttps://api.datadoghq.eu/api/v2/statuspageshttps://api.ddog-gov.com/api/v2/statuspageshttps://api.datadoghq.com/api/v2/statuspageshttps://api.us3.datadoghq.com/api/v2/statuspageshttps://api.us5.datadoghq.com/api/v2/statuspages

개요

Lists all status pages for the organization. This endpoint requires the status_pages_settings_read permission.

인수

쿼리 문자열

이름

유형

설명

page[offset]

integer

Offset to use as the start of the page.

page[limit]

integer

The number of status pages to return per page.

include

string

Comma-separated list of resources to include. Supported values: created_by_user, last_modified_by_user.

응답

OK

Response object for a list of status pages.

Expand All

항목

유형

설명

data [required]

[object]

A list of status page data objects.

attributes

object

The attributes of a status page.

company_logo

string

Base64-encoded image data displayed on the status page.

components

[object]

Components displayed on the status page.

components

[object]

If the component is of type group, the components within the group.

id

uuid

The ID of the component.

name

string

The name of the component.

position

int64

The zero-indexed position of the component. Relative to the other components in the group.

status

enum

The status of the component. Allowed enum values: operational,degraded,partial_outage,major_outage,maintenance

type

enum

The type of the component. Allowed enum values: component

id

uuid

The ID of the component.

name

string

The name of the component.

position

int64

The zero-indexed position of the component.

status

enum

The status of the component. Allowed enum values: operational,degraded,partial_outage,major_outage,maintenance

type

enum

The type of the component. Allowed enum values: component,group

created_at

date-time

Timestamp of when the status page was created.

custom_domain

string

If configured, the url that the status page is accessible at.

custom_domain_enabled

boolean

Whether the custom domain is configured.

domain_prefix

string

The subdomain of the status page's url taking the form https://{domain_prefix}.statuspage.datadoghq.com. Globally unique across Datadog Status Pages.

email_header_image

string

Base64-encoded image data included in email notifications sent to status page subscribers.

enabled

boolean

Whether the status page is enabled.

favicon

string

Base64-encoded image data displayed in the browser tab.

modified_at

date-time

Timestamp of when the status page was last modified.

name

string

The name of the status page.

page_url

string

The url that the status page is accessible at.

subscriptions_enabled

boolean

Whether users can subscribe to the status page.

type

enum

The type of the status page controlling how the status page is accessed. Allowed enum values: public,internal

visualization_type

enum

The visualization type of the status page. Allowed enum values: bars_and_uptime_percentage,bars_only,component_name_only

id

uuid

The ID of the status page.

relationships

object

The relationships of a status page.

created_by_user

object

The Datadog user who created the status page.

data [required]

object

The data object identifying the Datadog user who created the status page.

id [required]

string

The ID of the Datadog user who created the status page.

type [required]

enum

Users resource type. Allowed enum values: users

default: users

last_modified_by_user

object

The Datadog user who last modified the status page.

data [required]

object

The data object identifying the Datadog user who last modified the status page.

id [required]

string

The ID of the Datadog user who last modified the status page.

type [required]

enum

Users resource type. Allowed enum values: users

default: users

type [required]

enum

Status pages resource type. Allowed enum values: status_pages

default: status_pages

included

[ <oneOf>]

The included related resources of a status page. Client must explicitly request these resources by name in the include query parameter.

Option 1

object

The included Datadog user resource.

attributes

object

Attributes of the Datadog user.

email

string

The email of the Datadog user.

handle

string

The handle of the Datadog user.

icon

string

The icon of the Datadog user.

name

string

The name of the Datadog user.

uuid

string

The UUID of the Datadog user.

id

uuid

The ID of the Datadog user.

type [required]

enum

Users resource type. Allowed enum values: users

default: users

meta

object

Response metadata.

page

object

Offset-based pagination schema.

first_offset

int64

Integer representing the offset to fetch the first page of results.

last_offset

int64

Integer representing the offset to fetch the last page of results.

limit

int64

Integer representing the number of elements to be returned in the results.

next_offset

int64

Integer representing the index of the first element in the next page of results. Equal to page size added to the current offset.

offset

int64

Integer representing the index of the first element in the results.

prev_offset

int64

Integer representing the index of the first element in the previous page of results.

total

int64

Integer representing the total number of elements available.

type

enum

The pagination type used for offset-based pagination. Allowed enum values: offset_limit

default: offset_limit

{
  "data": [
    {
      "attributes": {
        "company_logo": "string",
        "components": [
          {
            "components": [
              {
                "id": "string",
                "name": "string",
                "position": "integer",
                "status": "string",
                "type": "component"
              }
            ],
            "id": "string",
            "name": "string",
            "position": "integer",
            "status": "string",
            "type": "component"
          }
        ],
        "created_at": "2019-09-19T10:00:00.000Z",
        "custom_domain": "string",
        "custom_domain_enabled": false,
        "domain_prefix": "string",
        "email_header_image": "string",
        "enabled": false,
        "favicon": "string",
        "modified_at": "2019-09-19T10:00:00.000Z",
        "name": "string",
        "page_url": "string",
        "subscriptions_enabled": false,
        "type": "public",
        "visualization_type": "bars_and_uptime_percentage"
      },
      "id": "string",
      "relationships": {
        "created_by_user": {
          "data": {
            "id": "",
            "type": "users"
          }
        },
        "last_modified_by_user": {
          "data": {
            "id": "",
            "type": "users"
          }
        }
      },
      "type": "status_pages"
    }
  ],
  "included": [
    {
      "attributes": {
        "email": "string",
        "handle": "string",
        "icon": "string",
        "name": "string",
        "uuid": "string"
      },
      "id": "string",
      "type": "users"
    }
  ],
  "meta": {
    "page": {
      "first_offset": 0,
      "last_offset": 900,
      "limit": 100,
      "next_offset": 100,
      "offset": 0,
      "prev_offset": 100,
      "total": 1000,
      "type": "offset_limit"
    }
  }
}

Too many requests

API error response.

Expand All

항목

유형

설명

errors [required]

[string]

A list of errors.

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

코드 사례

                  # Curl command
curl -X GET "https://api.ap1.datadoghq.com"https://api.ap2.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/statuspages" \ -H "Accept: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}"
"""
List status pages returns "OK" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.status_pages_api import StatusPagesApi

configuration = Configuration()
with ApiClient(configuration) as api_client:
    api_instance = StatusPagesApi(api_client)
    response = api_instance.list_status_pages()

    print(response)

Instructions

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

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" python3 "example.py"
# List status pages returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::StatusPagesAPI.new
p api_instance.list_status_pages()

Instructions

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

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" rb "example.rb"
// List status pages returns "OK" response

package main

import (
	"context"
	"encoding/json"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV2"
)

func main() {
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV2.NewStatusPagesApi(apiClient)
	resp, r, err := api.ListStatusPages(ctx, *datadogV2.NewListStatusPagesOptionalParameters())

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `StatusPagesApi.ListStatusPages`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `StatusPagesApi.ListStatusPages`:\n%s\n", responseContent)
}

Instructions

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

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" go run "main.go"
// List status pages returns "OK" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.StatusPagesApi;
import com.datadog.api.client.v2.model.StatusPageArray;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = ApiClient.getDefaultApiClient();
    StatusPagesApi apiInstance = new StatusPagesApi(defaultClient);

    try {
      StatusPageArray result = apiInstance.listStatusPages();
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling StatusPagesApi#listStatusPages");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Instructions

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

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" java "Example.java"
// List status pages returns "OK" response
use datadog_api_client::datadog;
use datadog_api_client::datadogV2::api_status_pages::ListStatusPagesOptionalParams;
use datadog_api_client::datadogV2::api_status_pages::StatusPagesAPI;

#[tokio::main]
async fn main() {
    let configuration = datadog::Configuration::new();
    let api = StatusPagesAPI::with_config(configuration);
    let resp = api
        .list_status_pages(ListStatusPagesOptionalParams::default())
        .await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}

Instructions

First install the library and its dependencies and then save the example to src/main.rs and run following commands:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo run
/**
 * List status pages returns "OK" response
 */

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

const configuration = client.createConfiguration();
const apiInstance = new v2.StatusPagesApi(configuration);

apiInstance
  .listStatusPages()
  .then((data: v2.StatusPageArray) => {
    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.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" tsc "example.ts"

GET https://api.ap1.datadoghq.com/api/v2/statuspages/{page_id}https://api.ap2.datadoghq.com/api/v2/statuspages/{page_id}https://api.datadoghq.eu/api/v2/statuspages/{page_id}https://api.ddog-gov.com/api/v2/statuspages/{page_id}https://api.datadoghq.com/api/v2/statuspages/{page_id}https://api.us3.datadoghq.com/api/v2/statuspages/{page_id}https://api.us5.datadoghq.com/api/v2/statuspages/{page_id}

개요

Retrieves a specific status page by its ID. This endpoint requires the status_pages_settings_read permission.

인수

경로 파라미터

이름

유형

설명

page_id [required]

string

The ID of the status page.

쿼리 문자열

이름

유형

설명

include

string

Comma-separated list of resources to include. Supported values: created_by_user, last_modified_by_user.

응답

OK

Response object for a single status page.

Expand All

항목

유형

설명

data

object

The data object for a status page.

attributes

object

The attributes of a status page.

company_logo

string

Base64-encoded image data displayed on the status page.

components

[object]

Components displayed on the status page.

components

[object]

If the component is of type group, the components within the group.

id

uuid

The ID of the component.

name

string

The name of the component.

position

int64

The zero-indexed position of the component. Relative to the other components in the group.

status

enum

The status of the component. Allowed enum values: operational,degraded,partial_outage,major_outage,maintenance

type

enum

The type of the component. Allowed enum values: component

id

uuid

The ID of the component.

name

string

The name of the component.

position

int64

The zero-indexed position of the component.

status

enum

The status of the component. Allowed enum values: operational,degraded,partial_outage,major_outage,maintenance

type

enum

The type of the component. Allowed enum values: component,group

created_at

date-time

Timestamp of when the status page was created.

custom_domain

string

If configured, the url that the status page is accessible at.

custom_domain_enabled

boolean

Whether the custom domain is configured.

domain_prefix

string

The subdomain of the status page's url taking the form https://{domain_prefix}.statuspage.datadoghq.com. Globally unique across Datadog Status Pages.

email_header_image

string

Base64-encoded image data included in email notifications sent to status page subscribers.

enabled

boolean

Whether the status page is enabled.

favicon

string

Base64-encoded image data displayed in the browser tab.

modified_at

date-time

Timestamp of when the status page was last modified.

name

string

The name of the status page.

page_url

string

The url that the status page is accessible at.

subscriptions_enabled

boolean

Whether users can subscribe to the status page.

type

enum

The type of the status page controlling how the status page is accessed. Allowed enum values: public,internal

visualization_type

enum

The visualization type of the status page. Allowed enum values: bars_and_uptime_percentage,bars_only,component_name_only

id

uuid

The ID of the status page.

relationships

object

The relationships of a status page.

created_by_user

object

The Datadog user who created the status page.

data [required]

object

The data object identifying the Datadog user who created the status page.

id [required]

string

The ID of the Datadog user who created the status page.

type [required]

enum

Users resource type. Allowed enum values: users

default: users

last_modified_by_user

object

The Datadog user who last modified the status page.

data [required]

object

The data object identifying the Datadog user who last modified the status page.

id [required]

string

The ID of the Datadog user who last modified the status page.

type [required]

enum

Users resource type. Allowed enum values: users

default: users

type [required]

enum

Status pages resource type. Allowed enum values: status_pages

default: status_pages

included

[ <oneOf>]

The included related resources of a status page. Client must explicitly request these resources by name in the include query parameter.

Option 1

object

The included Datadog user resource.

attributes

object

Attributes of the Datadog user.

email

string

The email of the Datadog user.

handle

string

The handle of the Datadog user.

icon

string

The icon of the Datadog user.

name

string

The name of the Datadog user.

uuid

string

The UUID of the Datadog user.

id

uuid

The ID of the Datadog user.

type [required]

enum

Users resource type. Allowed enum values: users

default: users

{
  "data": {
    "attributes": {
      "company_logo": "string",
      "components": [
        {
          "components": [
            {
              "id": "string",
              "name": "string",
              "position": "integer",
              "status": "string",
              "type": "component"
            }
          ],
          "id": "string",
          "name": "string",
          "position": "integer",
          "status": "string",
          "type": "component"
        }
      ],
      "created_at": "2019-09-19T10:00:00.000Z",
      "custom_domain": "string",
      "custom_domain_enabled": false,
      "domain_prefix": "string",
      "email_header_image": "string",
      "enabled": false,
      "favicon": "string",
      "modified_at": "2019-09-19T10:00:00.000Z",
      "name": "string",
      "page_url": "string",
      "subscriptions_enabled": false,
      "type": "public",
      "visualization_type": "bars_and_uptime_percentage"
    },
    "id": "string",
    "relationships": {
      "created_by_user": {
        "data": {
          "id": "",
          "type": "users"
        }
      },
      "last_modified_by_user": {
        "data": {
          "id": "",
          "type": "users"
        }
      }
    },
    "type": "status_pages"
  },
  "included": [
    {
      "attributes": {
        "email": "string",
        "handle": "string",
        "icon": "string",
        "name": "string",
        "uuid": "string"
      },
      "id": "string",
      "type": "users"
    }
  ]
}

Too many requests

API error response.

Expand All

항목

유형

설명

errors [required]

[string]

A list of errors.

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

코드 사례

                  # Path parameters
export page_id="1234abcd-12ab-34cd-56ef-123456abcdef"
# Curl command
curl -X GET "https://api.ap1.datadoghq.com"https://api.ap2.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/statuspages/${page_id}" \ -H "Accept: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}"
"""
Get status page returns "OK" response
"""

from os import environ
from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.status_pages_api import StatusPagesApi

# there is a valid "status_page" in the system
STATUS_PAGE_DATA_ID = environ["STATUS_PAGE_DATA_ID"]

configuration = Configuration()
with ApiClient(configuration) as api_client:
    api_instance = StatusPagesApi(api_client)
    response = api_instance.get_status_page(
        page_id=STATUS_PAGE_DATA_ID,
    )

    print(response)

Instructions

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

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" python3 "example.py"
# Get status page returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::StatusPagesAPI.new

# there is a valid "status_page" in the system
STATUS_PAGE_DATA_ID = ENV["STATUS_PAGE_DATA_ID"]
p api_instance.get_status_page(STATUS_PAGE_DATA_ID)

Instructions

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

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" rb "example.rb"
// Get status page returns "OK" response

package main

import (
	"context"
	"encoding/json"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV2"
	"github.com/google/uuid"
)

func main() {
	// there is a valid "status_page" in the system
	StatusPageDataID := uuid.MustParse(os.Getenv("STATUS_PAGE_DATA_ID"))

	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV2.NewStatusPagesApi(apiClient)
	resp, r, err := api.GetStatusPage(ctx, StatusPageDataID, *datadogV2.NewGetStatusPageOptionalParameters())

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `StatusPagesApi.GetStatusPage`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `StatusPagesApi.GetStatusPage`:\n%s\n", responseContent)
}

Instructions

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

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" go run "main.go"
// Get status page returns "OK" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.StatusPagesApi;
import com.datadog.api.client.v2.model.StatusPage;
import java.util.UUID;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = ApiClient.getDefaultApiClient();
    StatusPagesApi apiInstance = new StatusPagesApi(defaultClient);

    // there is a valid "status_page" in the system
    UUID STATUS_PAGE_DATA_ID = null;
    try {
      STATUS_PAGE_DATA_ID = UUID.fromString(System.getenv("STATUS_PAGE_DATA_ID"));
    } catch (IllegalArgumentException e) {
      System.err.println("Error parsing UUID: " + e.getMessage());
    }

    try {
      StatusPage result = apiInstance.getStatusPage(STATUS_PAGE_DATA_ID);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling StatusPagesApi#getStatusPage");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Instructions

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

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" java "Example.java"
// Get status page returns "OK" response
use datadog_api_client::datadog;
use datadog_api_client::datadogV2::api_status_pages::GetStatusPageOptionalParams;
use datadog_api_client::datadogV2::api_status_pages::StatusPagesAPI;

#[tokio::main]
async fn main() {
    // there is a valid "status_page" in the system
    let status_page_data_id = uuid::Uuid::parse_str(&std::env::var("STATUS_PAGE_DATA_ID").unwrap())
        .expect("Invalid UUID");
    let configuration = datadog::Configuration::new();
    let api = StatusPagesAPI::with_config(configuration);
    let resp = api
        .get_status_page(
            status_page_data_id.clone(),
            GetStatusPageOptionalParams::default(),
        )
        .await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}

Instructions

First install the library and its dependencies and then save the example to src/main.rs and run following commands:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo run
/**
 * Get status page returns "OK" response
 */

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

const configuration = client.createConfiguration();
const apiInstance = new v2.StatusPagesApi(configuration);

// there is a valid "status_page" in the system
const STATUS_PAGE_DATA_ID = process.env.STATUS_PAGE_DATA_ID as string;

const params: v2.StatusPagesApiGetStatusPageRequest = {
  pageId: STATUS_PAGE_DATA_ID,
};

apiInstance
  .getStatusPage(params)
  .then((data: v2.StatusPage) => {
    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.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" tsc "example.ts"

DELETE https://api.ap1.datadoghq.com/api/v2/statuspages/{page_id}https://api.ap2.datadoghq.com/api/v2/statuspages/{page_id}https://api.datadoghq.eu/api/v2/statuspages/{page_id}https://api.ddog-gov.com/api/v2/statuspages/{page_id}https://api.datadoghq.com/api/v2/statuspages/{page_id}https://api.us3.datadoghq.com/api/v2/statuspages/{page_id}https://api.us5.datadoghq.com/api/v2/statuspages/{page_id}

개요

Deletes a status page by its ID. This endpoint requires the status_pages_settings_write permission.

인수

경로 파라미터

이름

유형

설명

page_id [required]

string

The ID of the status page.

응답

No Content

Too many requests

API error response.

Expand All

항목

유형

설명

errors [required]

[string]

A list of errors.

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

코드 사례

                  # Path parameters
export page_id="1234abcd-12ab-34cd-56ef-123456abcdef"
# Curl command
curl -X DELETE "https://api.ap1.datadoghq.com"https://api.ap2.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/statuspages/${page_id}" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}"
"""
Delete status page returns "No Content" response
"""

from os import environ
from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.status_pages_api import StatusPagesApi

# there is a valid "status_page" in the system
STATUS_PAGE_DATA_ID = environ["STATUS_PAGE_DATA_ID"]

configuration = Configuration()
with ApiClient(configuration) as api_client:
    api_instance = StatusPagesApi(api_client)
    api_instance.delete_status_page(
        page_id=STATUS_PAGE_DATA_ID,
    )

Instructions

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

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" python3 "example.py"
# Delete status page returns "No Content" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::StatusPagesAPI.new

# there is a valid "status_page" in the system
STATUS_PAGE_DATA_ID = ENV["STATUS_PAGE_DATA_ID"]
api_instance.delete_status_page(STATUS_PAGE_DATA_ID)

Instructions

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

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" rb "example.rb"
// Delete status page returns "No Content" response

package main

import (
	"context"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV2"
	"github.com/google/uuid"
)

func main() {
	// there is a valid "status_page" in the system
	StatusPageDataID := uuid.MustParse(os.Getenv("STATUS_PAGE_DATA_ID"))

	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV2.NewStatusPagesApi(apiClient)
	r, err := api.DeleteStatusPage(ctx, StatusPageDataID)

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `StatusPagesApi.DeleteStatusPage`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
}

Instructions

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

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" go run "main.go"
// Delete status page returns "No Content" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.StatusPagesApi;
import java.util.UUID;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = ApiClient.getDefaultApiClient();
    StatusPagesApi apiInstance = new StatusPagesApi(defaultClient);

    // there is a valid "status_page" in the system
    UUID STATUS_PAGE_DATA_ID = null;
    try {
      STATUS_PAGE_DATA_ID = UUID.fromString(System.getenv("STATUS_PAGE_DATA_ID"));
    } catch (IllegalArgumentException e) {
      System.err.println("Error parsing UUID: " + e.getMessage());
    }

    try {
      apiInstance.deleteStatusPage(STATUS_PAGE_DATA_ID);
    } catch (ApiException e) {
      System.err.println("Exception when calling StatusPagesApi#deleteStatusPage");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Instructions

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

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" java "Example.java"
// Delete status page returns "No Content" response
use datadog_api_client::datadog;
use datadog_api_client::datadogV2::api_status_pages::StatusPagesAPI;

#[tokio::main]
async fn main() {
    // there is a valid "status_page" in the system
    let status_page_data_id = uuid::Uuid::parse_str(&std::env::var("STATUS_PAGE_DATA_ID").unwrap())
        .expect("Invalid UUID");
    let configuration = datadog::Configuration::new();
    let api = StatusPagesAPI::with_config(configuration);
    let resp = api.delete_status_page(status_page_data_id.clone()).await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}

Instructions

First install the library and its dependencies and then save the example to src/main.rs and run following commands:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo run
/**
 * Delete status page returns "No Content" response
 */

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

const configuration = client.createConfiguration();
const apiInstance = new v2.StatusPagesApi(configuration);

// there is a valid "status_page" in the system
const STATUS_PAGE_DATA_ID = process.env.STATUS_PAGE_DATA_ID as string;

const params: v2.StatusPagesApiDeleteStatusPageRequest = {
  pageId: STATUS_PAGE_DATA_ID,
};

apiInstance
  .deleteStatusPage(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.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" tsc "example.ts"

POST https://api.ap1.datadoghq.com/api/v2/statuspages/{page_id}/publishhttps://api.ap2.datadoghq.com/api/v2/statuspages/{page_id}/publishhttps://api.datadoghq.eu/api/v2/statuspages/{page_id}/publishhttps://api.ddog-gov.com/api/v2/statuspages/{page_id}/publishhttps://api.datadoghq.com/api/v2/statuspages/{page_id}/publishhttps://api.us3.datadoghq.com/api/v2/statuspages/{page_id}/publishhttps://api.us5.datadoghq.com/api/v2/statuspages/{page_id}/publish

개요

Publishes a status page. For pages of type public, makes the status page available on the public internet and requires the status_pages_public_page_publish permission. For pages of type internal, makes the status page available under the status-pages/$domain_prefix/view route within the Datadog organization and requires the status_pages_internal_page_publish permission. The status_pages_settings_write permission is temporarily honored as we migrate publishing functionality from the update status page endpoint to the publish status page endpoint. This endpoint requires any of the following permissions:

  • status_pages_settings_write
  • status_pages_public_page_publish
  • status_pages_internal_page_publish

  • 인수

    경로 파라미터

    이름

    유형

    설명

    page_id [required]

    string

    The ID of the status page.

    응답

    No Content

    Too many requests

    API error response.

    Expand All

    항목

    유형

    설명

    errors [required]

    [string]

    A list of errors.

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

    코드 사례

                      # Path parameters
    export page_id="CHANGE_ME"
    # Curl command
    curl -X POST "https://api.ap1.datadoghq.com"https://api.ap2.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/statuspages/${page_id}/publish" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}"

    POST https://api.ap1.datadoghq.com/api/v2/statuspages/{page_id}/unpublishhttps://api.ap2.datadoghq.com/api/v2/statuspages/{page_id}/unpublishhttps://api.datadoghq.eu/api/v2/statuspages/{page_id}/unpublishhttps://api.ddog-gov.com/api/v2/statuspages/{page_id}/unpublishhttps://api.datadoghq.com/api/v2/statuspages/{page_id}/unpublishhttps://api.us3.datadoghq.com/api/v2/statuspages/{page_id}/unpublishhttps://api.us5.datadoghq.com/api/v2/statuspages/{page_id}/unpublish

    개요

    Unpublishes a status page. For pages of type public, removes the status page from the public internet and requires the status_pages_public_page_publish permission. For pages of type internal, removes the status-pages/$domain_prefix/view route from the Datadog organization and requires the status_pages_internal_page_publish permission. The status_pages_settings_write permission is temporarily honored as we migrate unpublishing functionality from the update status page endpoint to the unpublish status page endpoint. This endpoint requires any of the following permissions:

  • status_pages_settings_write
  • status_pages_public_page_publish
  • status_pages_internal_page_publish

  • 인수

    경로 파라미터

    이름

    유형

    설명

    page_id [required]

    string

    The ID of the status page.

    응답

    No Content

    Too many requests

    API error response.

    Expand All

    항목

    유형

    설명

    errors [required]

    [string]

    A list of errors.

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

    코드 사례

                      # Path parameters
    export page_id="CHANGE_ME"
    # Curl command
    curl -X POST "https://api.ap1.datadoghq.com"https://api.ap2.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/statuspages/${page_id}/unpublish" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}"

    POST https://api.ap1.datadoghq.com/api/v2/statuspages/{page_id}/componentshttps://api.ap2.datadoghq.com/api/v2/statuspages/{page_id}/componentshttps://api.datadoghq.eu/api/v2/statuspages/{page_id}/componentshttps://api.ddog-gov.com/api/v2/statuspages/{page_id}/componentshttps://api.datadoghq.com/api/v2/statuspages/{page_id}/componentshttps://api.us3.datadoghq.com/api/v2/statuspages/{page_id}/componentshttps://api.us5.datadoghq.com/api/v2/statuspages/{page_id}/components

    개요

    Creates a new component. This endpoint requires the status_pages_settings_write permission.

    인수

    경로 파라미터

    이름

    유형

    설명

    page_id [required]

    string

    The ID of the status page.

    쿼리 문자열

    이름

    유형

    설명

    include

    string

    Comma-separated list of resources to include. Supported values: created_by_user, last_modified_by_user, status_page, group.

    요청

    Body Data (required)

    Expand All

    항목

    유형

    설명

    data

    object

    The data object for creating a component.

    attributes [required]

    object

    The supported attributes for creating a component.

    components

    [object]

    If creating a component of type group, the components to create within the group.

    name [required]

    string

    The name of the grouped component.

    position [required]

    int64

    The zero-indexed position of the grouped component relative to the other components in the group.

    type [required]

    enum

    The type of the component. Allowed enum values: component

    name [required]

    string

    The name of the component.

    position [required]

    int64

    The zero-indexed position of the component.

    type [required]

    enum

    The type of the component. Allowed enum values: component,group

    relationships

    object

    The supported relationships for creating a component.

    group

    object

    The group to create the component within.

    data [required]

    object

    The data object identifying the group to create the component within.

    id [required]

    uuid

    The ID of the group.

    type [required]

    enum

    Components resource type. Allowed enum values: components

    default: components

    type [required]

    enum

    Components resource type. Allowed enum values: components

    default: components

    {
      "data": {
        "attributes": {
          "name": "Logs",
          "position": 0,
          "type": "component"
        },
        "type": "components"
      }
    }

    응답

    Created

    Response object for a single component.

    Expand All

    항목

    유형

    설명

    data

    object

    The data object for a component.

    attributes

    object

    The attributes of a component.

    components

    [object]

    If the component is of type group, the components within the group.

    id

    uuid

    The ID of the component within the group.

    name

    string

    The name of the component within the group.

    position

    int64

    The zero-indexed position of the component within the group.

    status

    enum

    The status of the component. Allowed enum values: operational,degraded,partial_outage,major_outage,maintenance

    type

    enum

    The type of the component. Allowed enum values: component

    created_at

    date-time

    Timestamp of when the component was created.

    modified_at

    date-time

    Timestamp of when the component was last modified.

    name

    string

    The name of the component.

    position

    int64

    The zero-indexed position of the component.

    status

    enum

    The status of the component. Allowed enum values: operational,degraded,partial_outage,major_outage,maintenance

    type [required]

    enum

    The type of the component. Allowed enum values: component,group

    id

    uuid

    The ID of the component.

    relationships

    object

    The relationships of a component.

    created_by_user

    object

    The Datadog user who created the component.

    data [required]

    object

    The data object identifying the Datadog user who created the component.

    id [required]

    string

    The ID of the Datadog user who created the component.

    type [required]

    enum

    Users resource type. Allowed enum values: users

    default: users

    group

    object

    The group the component belongs to.

    data [required]

    object

    The data object identifying the group the component belongs to.

    id [required]

    uuid

    The ID of the group the component belongs to.

    type [required]

    enum

    Components resource type. Allowed enum values: components

    default: components

    last_modified_by_user

    object

    The Datadog user who last modified the component.

    data [required]

    object

    The data object identifying the Datadog user who last modified the component.

    id [required]

    string

    The ID of the Datadog user who last modified the component.

    type [required]

    enum

    Users resource type. Allowed enum values: users

    default: users

    status_page

    object

    The status page the component belongs to.

    data [required]

    object

    The data object identifying the status page the component belongs to.

    id [required]

    uuid

    The ID of the status page the component belongs to.

    type [required]

    enum

    Status pages resource type. Allowed enum values: status_pages

    default: status_pages

    type [required]

    enum

    Components resource type. Allowed enum values: components

    default: components

    included

    [ <oneOf>]

    The included related resources of a component. Client must explicitly request these resources by name in the include query parameter.

    Option 1

    object

    The included Datadog user resource.

    attributes

    object

    Attributes of the Datadog user.

    email

    string

    The email of the Datadog user.

    handle

    string

    The handle of the Datadog user.

    icon

    string

    The icon of the Datadog user.

    name

    string

    The name of the Datadog user.

    uuid

    string

    The UUID of the Datadog user.

    id

    uuid

    The ID of the Datadog user.

    type [required]

    enum

    Users resource type. Allowed enum values: users

    default: users

    Option 2

    object

    The included status page resource.

    attributes

    object

    The attributes of a status page.

    company_logo

    string

    The base64-encoded image data displayed in the company logo.

    components

    [object]

    Components displayed on the status page.

    components

    [object]

    If the component is of type group, the components within the group.

    id

    uuid

    The ID of the grouped component.

    name

    string

    The name of the grouped component.

    position

    int64

    The zero-indexed position of the grouped component. Relative to the other components in the group.

    status

    enum

    The status of the component. Allowed enum values: operational,degraded,partial_outage,major_outage,maintenance

    type

    enum

    The type of the component. Allowed enum values: component

    id

    uuid

    The ID of the component.

    name

    string

    The name of the component.

    position

    int64

    The zero-indexed position of the component.

    status

    enum

    The status of the component. Allowed enum values: operational,degraded,partial_outage,major_outage,maintenance

    type

    enum

    The type of the component. Allowed enum values: component,group

    created_at

    date-time

    Timestamp of when the status page was created.

    custom_domain

    string

    If configured, the url that the status page is accessible at.

    custom_domain_enabled

    boolean

    Whether the custom domain is configured.

    domain_prefix

    string

    The subdomain of the status page's url taking the form https://{domain_prefix}.statuspage.datadoghq.com. Globally unique across Datadog Status Pages.

    email_header_image

    string

    Base64-encoded image data included in email notifications sent to status page subscribers.

    enabled

    boolean

    Whether the status page is enabled.

    favicon

    string

    Base64-encoded image data displayed in the browser tab.

    modified_at

    date-time

    Timestamp of when the status page was last modified.

    name

    string

    The name of the status page.

    page_url

    string

    The url that the status page is accessible at.

    subscriptions_enabled

    boolean

    Whether users can subscribe to the status page.

    type

    enum

    The type of the status page controlling how the status page is accessed. Allowed enum values: public,internal

    visualization_type

    enum

    The visualization type of the status page. Allowed enum values: bars_and_uptime_percentage,bars_only,component_name_only

    id

    uuid

    The ID of the status page.

    relationships

    object

    The relationships of a status page.

    created_by_user

    object

    The Datadog user who created the status page.

    data [required]

    object

    The data object identifying the Datadog user who created the status page.

    id [required]

    string

    The ID of the Datadog user who created the status page.

    type [required]

    enum

    Users resource type. Allowed enum values: users

    default: users

    last_modified_by_user

    object

    The Datadog user who last modified the status page.

    data [required]

    object

    The data object identifying the Datadog user who last modified the status page.

    id [required]

    string

    The ID of the Datadog user who last modified the status page.

    type [required]

    enum

    Users resource type. Allowed enum values: users

    default: users

    type [required]

    enum

    Status pages resource type. Allowed enum values: status_pages

    default: status_pages

    Option 3

    object

    The included component group resource.

    attributes

    object

    The attributes of a component group.

    components

    [object]

    If the component is of type group, the components within the group.

    id

    uuid

    The ID of the grouped component.

    name

    string

    The name of the grouped component.

    position

    int64

    The zero-indexed position of the grouped component. Relative to the other components in the group.

    status

    enum

    The status of the component. Allowed enum values: operational,degraded,partial_outage,major_outage,maintenance

    type

    enum

    The type of the component. Allowed enum values: component

    created_at

    date-time

    Timestamp of when the component was created.

    modified_at

    date-time

    Timestamp of when the component was last modified.

    name

    string

    The name of the component.

    position

    int64

    The zero-indexed position of the component.

    status

    enum

    The status of the component. Allowed enum values: operational,degraded,partial_outage,major_outage,maintenance

    type [required]

    enum

    The type of the component. Allowed enum values: component,group

    id

    uuid

    The ID of the component.

    relationships

    object

    The relationships of a component group.

    created_by_user

    object

    The Datadog user who created the component group.

    data [required]

    object

    The data object identifying the Datadog user who created the component group.

    id [required]

    string

    The ID of the Datadog user who created the component group.

    type [required]

    enum

    Users resource type. Allowed enum values: users

    default: users

    group

    object

    The group the component group belongs to.

    data [required]

    object

    The data object identifying the parent group of a component group.

    id [required]

    uuid

    The ID of the parent group.

    type [required]

    enum

    Components resource type. Allowed enum values: components

    default: components

    last_modified_by_user

    object

    The Datadog user who last modified the component group.

    data [required]

    object

    The data object identifying the Datadog user who last modified the component group.

    id [required]

    string

    The ID of the Datadog user who last modified the component group.

    type [required]

    enum

    Users resource type. Allowed enum values: users

    default: users

    status_page

    object

    The status page the component group belongs to.

    data [required]

    object

    The data object identifying the status page the component group belongs to.

    id [required]

    uuid

    The ID of the status page.

    type [required]

    enum

    Status pages resource type. Allowed enum values: status_pages

    default: status_pages

    type [required]

    enum

    Components resource type. Allowed enum values: components

    default: components

    {
      "data": {
        "attributes": {
          "components": [
            {
              "id": "string",
              "name": "string",
              "position": "integer",
              "status": "string",
              "type": "component"
            }
          ],
          "created_at": "2019-09-19T10:00:00.000Z",
          "modified_at": "2019-09-19T10:00:00.000Z",
          "name": "string",
          "position": "integer",
          "status": "operational",
          "type": "component"
        },
        "id": "string",
        "relationships": {
          "created_by_user": {
            "data": {
              "id": "",
              "type": "users"
            }
          },
          "group": {
            "data": {
              "id": "1234abcd-12ab-34cd-56ef-123456abcdef",
              "type": "components"
            }
          },
          "last_modified_by_user": {
            "data": {
              "id": "",
              "type": "users"
            }
          },
          "status_page": {
            "data": {
              "id": "1234abcd-12ab-34cd-56ef-123456abcdef",
              "type": "status_pages"
            }
          }
        },
        "type": "components"
      },
      "included": [
        {
          "attributes": {
            "email": "string",
            "handle": "string",
            "icon": "string",
            "name": "string",
            "uuid": "string"
          },
          "id": "string",
          "type": "users"
        }
      ]
    }

    Too many requests

    API error response.

    Expand All

    항목

    유형

    설명

    errors [required]

    [string]

    A list of errors.

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

    코드 사례

                              # Path parameters
    export page_id="1234abcd-12ab-34cd-56ef-123456abcdef"
    # Curl command
    curl -X POST "https://api.ap1.datadoghq.com"https://api.ap2.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/statuspages/${page_id}/components" \ -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": "Logs", "position": 0, "type": "component" }, "type": "components" } } EOF
    // Create component returns "Created" response
    
    package main
    
    import (
    	"context"
    	"encoding/json"
    	"fmt"
    	"os"
    
    	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
    	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV2"
    	"github.com/google/uuid"
    )
    
    func main() {
    	// there is a valid "status_page" in the system
    	StatusPageDataID := uuid.MustParse(os.Getenv("STATUS_PAGE_DATA_ID"))
    
    	body := datadogV2.CreateComponentRequest{
    		Data: &datadogV2.CreateComponentRequestData{
    			Attributes: datadogV2.CreateComponentRequestDataAttributes{
    				Name:     "Logs",
    				Position: 0,
    				Type:     datadogV2.CREATECOMPONENTREQUESTDATAATTRIBUTESTYPE_COMPONENT,
    			},
    			Type: datadogV2.STATUSPAGESCOMPONENTGROUPTYPE_COMPONENTS,
    		},
    	}
    	ctx := datadog.NewDefaultContext(context.Background())
    	configuration := datadog.NewConfiguration()
    	apiClient := datadog.NewAPIClient(configuration)
    	api := datadogV2.NewStatusPagesApi(apiClient)
    	resp, r, err := api.CreateComponent(ctx, StatusPageDataID, body, *datadogV2.NewCreateComponentOptionalParameters())
    
    	if err != nil {
    		fmt.Fprintf(os.Stderr, "Error when calling `StatusPagesApi.CreateComponent`: %v\n", err)
    		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    	}
    
    	responseContent, _ := json.MarshalIndent(resp, "", "  ")
    	fmt.Fprintf(os.Stdout, "Response from `StatusPagesApi.CreateComponent`:\n%s\n", responseContent)
    }
    

    Instructions

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

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" go run "main.go"
    // Create component returns "Created" response
    
    import com.datadog.api.client.ApiClient;
    import com.datadog.api.client.ApiException;
    import com.datadog.api.client.v2.api.StatusPagesApi;
    import com.datadog.api.client.v2.model.CreateComponentRequest;
    import com.datadog.api.client.v2.model.CreateComponentRequestData;
    import com.datadog.api.client.v2.model.CreateComponentRequestDataAttributes;
    import com.datadog.api.client.v2.model.CreateComponentRequestDataAttributesType;
    import com.datadog.api.client.v2.model.StatusPagesComponent;
    import com.datadog.api.client.v2.model.StatusPagesComponentGroupType;
    import java.util.UUID;
    
    public class Example {
      public static void main(String[] args) {
        ApiClient defaultClient = ApiClient.getDefaultApiClient();
        StatusPagesApi apiInstance = new StatusPagesApi(defaultClient);
    
        // there is a valid "status_page" in the system
        UUID STATUS_PAGE_DATA_ID = null;
        try {
          STATUS_PAGE_DATA_ID = UUID.fromString(System.getenv("STATUS_PAGE_DATA_ID"));
        } catch (IllegalArgumentException e) {
          System.err.println("Error parsing UUID: " + e.getMessage());
        }
    
        CreateComponentRequest body =
            new CreateComponentRequest()
                .data(
                    new CreateComponentRequestData()
                        .attributes(
                            new CreateComponentRequestDataAttributes()
                                .name("Logs")
                                .position(0L)
                                .type(CreateComponentRequestDataAttributesType.COMPONENT))
                        .type(StatusPagesComponentGroupType.COMPONENTS));
    
        try {
          StatusPagesComponent result = apiInstance.createComponent(STATUS_PAGE_DATA_ID, body);
          System.out.println(result);
        } catch (ApiException e) {
          System.err.println("Exception when calling StatusPagesApi#createComponent");
          System.err.println("Status code: " + e.getCode());
          System.err.println("Reason: " + e.getResponseBody());
          System.err.println("Response headers: " + e.getResponseHeaders());
          e.printStackTrace();
        }
      }
    }
    

    Instructions

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

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" java "Example.java"
    """
    Create component returns "Created" response
    """
    
    from os import environ
    from datadog_api_client import ApiClient, Configuration
    from datadog_api_client.v2.api.status_pages_api import StatusPagesApi
    from datadog_api_client.v2.model.create_component_request import CreateComponentRequest
    from datadog_api_client.v2.model.create_component_request_data import CreateComponentRequestData
    from datadog_api_client.v2.model.create_component_request_data_attributes import CreateComponentRequestDataAttributes
    from datadog_api_client.v2.model.create_component_request_data_attributes_type import (
        CreateComponentRequestDataAttributesType,
    )
    from datadog_api_client.v2.model.status_pages_component_group_type import StatusPagesComponentGroupType
    
    # there is a valid "status_page" in the system
    STATUS_PAGE_DATA_ID = environ["STATUS_PAGE_DATA_ID"]
    
    body = CreateComponentRequest(
        data=CreateComponentRequestData(
            attributes=CreateComponentRequestDataAttributes(
                name="Logs",
                position=0,
                type=CreateComponentRequestDataAttributesType.COMPONENT,
            ),
            type=StatusPagesComponentGroupType.COMPONENTS,
        ),
    )
    
    configuration = Configuration()
    with ApiClient(configuration) as api_client:
        api_instance = StatusPagesApi(api_client)
        response = api_instance.create_component(page_id=STATUS_PAGE_DATA_ID, body=body)
    
        print(response)
    

    Instructions

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

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" python3 "example.py"
    # Create component returns "Created" response
    
    require "datadog_api_client"
    api_instance = DatadogAPIClient::V2::StatusPagesAPI.new
    
    # there is a valid "status_page" in the system
    STATUS_PAGE_DATA_ID = ENV["STATUS_PAGE_DATA_ID"]
    
    body = DatadogAPIClient::V2::CreateComponentRequest.new({
      data: DatadogAPIClient::V2::CreateComponentRequestData.new({
        attributes: DatadogAPIClient::V2::CreateComponentRequestDataAttributes.new({
          name: "Logs",
          position: 0,
          type: DatadogAPIClient::V2::CreateComponentRequestDataAttributesType::COMPONENT,
        }),
        type: DatadogAPIClient::V2::StatusPagesComponentGroupType::COMPONENTS,
      }),
    })
    p api_instance.create_component(STATUS_PAGE_DATA_ID, body)
    

    Instructions

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

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" rb "example.rb"
    // Create component returns "Created" response
    use datadog_api_client::datadog;
    use datadog_api_client::datadogV2::api_status_pages::CreateComponentOptionalParams;
    use datadog_api_client::datadogV2::api_status_pages::StatusPagesAPI;
    use datadog_api_client::datadogV2::model::CreateComponentRequest;
    use datadog_api_client::datadogV2::model::CreateComponentRequestData;
    use datadog_api_client::datadogV2::model::CreateComponentRequestDataAttributes;
    use datadog_api_client::datadogV2::model::CreateComponentRequestDataAttributesType;
    use datadog_api_client::datadogV2::model::StatusPagesComponentGroupType;
    
    #[tokio::main]
    async fn main() {
        // there is a valid "status_page" in the system
        let status_page_data_id = uuid::Uuid::parse_str(&std::env::var("STATUS_PAGE_DATA_ID").unwrap())
            .expect("Invalid UUID");
        let body = CreateComponentRequest::new().data(CreateComponentRequestData::new(
            CreateComponentRequestDataAttributes::new(
                "Logs".to_string(),
                0,
                CreateComponentRequestDataAttributesType::COMPONENT,
            ),
            StatusPagesComponentGroupType::COMPONENTS,
        ));
        let configuration = datadog::Configuration::new();
        let api = StatusPagesAPI::with_config(configuration);
        let resp = api
            .create_component(
                status_page_data_id.clone(),
                body,
                CreateComponentOptionalParams::default(),
            )
            .await;
        if let Ok(value) = resp {
            println!("{:#?}", value);
        } else {
            println!("{:#?}", resp.unwrap_err());
        }
    }
    

    Instructions

    First install the library and its dependencies and then save the example to src/main.rs and run following commands:

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo run
    /**
     * Create component returns "Created" response
     */
    
    import { client, v2 } from "@datadog/datadog-api-client";
    
    const configuration = client.createConfiguration();
    const apiInstance = new v2.StatusPagesApi(configuration);
    
    // there is a valid "status_page" in the system
    const STATUS_PAGE_DATA_ID = process.env.STATUS_PAGE_DATA_ID as string;
    
    const params: v2.StatusPagesApiCreateComponentRequest = {
      body: {
        data: {
          attributes: {
            name: "Logs",
            position: 0,
            type: "component",
          },
          type: "components",
        },
      },
      pageId: STATUS_PAGE_DATA_ID,
    };
    
    apiInstance
      .createComponent(params)
      .then((data: v2.StatusPagesComponent) => {
        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.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" tsc "example.ts"

    PATCH https://api.ap1.datadoghq.com/api/v2/statuspages/{page_id}/components/{component_id}https://api.ap2.datadoghq.com/api/v2/statuspages/{page_id}/components/{component_id}https://api.datadoghq.eu/api/v2/statuspages/{page_id}/components/{component_id}https://api.ddog-gov.com/api/v2/statuspages/{page_id}/components/{component_id}https://api.datadoghq.com/api/v2/statuspages/{page_id}/components/{component_id}https://api.us3.datadoghq.com/api/v2/statuspages/{page_id}/components/{component_id}https://api.us5.datadoghq.com/api/v2/statuspages/{page_id}/components/{component_id}

    개요

    Updates an existing component’s attributes. This endpoint requires the status_pages_settings_write permission.

    인수

    경로 파라미터

    이름

    유형

    설명

    page_id [required]

    string

    The ID of the status page.

    component_id [required]

    string

    The ID of the component.

    쿼리 문자열

    이름

    유형

    설명

    include

    string

    Comma-separated list of resources to include. Supported values: created_by_user, last_modified_by_user, status_page, group.

    요청

    Body Data (required)

    Expand All

    항목

    유형

    설명

    data

    object

    The data object for updating a component.

    attributes [required]

    object

    The supported attributes for updating a component.

    name

    string

    The name of the component.

    position

    int64

    The position of the component. If the component belongs to a group, the position is relative to the other components in the group.

    id [required]

    uuid

    The ID of the component.

    type [required]

    enum

    Components resource type. Allowed enum values: components

    default: components

    {
      "data": {
        "attributes": {
          "name": "Logs Indexing"
        },
        "id": "c34e5b83-90fe-4de2-087b-ea1f64387277",
        "type": "components"
      }
    }

    응답

    OK

    Response object for a single component.

    Expand All

    항목

    유형

    설명

    data

    object

    The data object for a component.

    attributes

    object

    The attributes of a component.

    components

    [object]

    If the component is of type group, the components within the group.

    id

    uuid

    The ID of the component within the group.

    name

    string

    The name of the component within the group.

    position

    int64

    The zero-indexed position of the component within the group.

    status

    enum

    The status of the component. Allowed enum values: operational,degraded,partial_outage,major_outage,maintenance

    type

    enum

    The type of the component. Allowed enum values: component

    created_at

    date-time

    Timestamp of when the component was created.

    modified_at

    date-time

    Timestamp of when the component was last modified.

    name

    string

    The name of the component.

    position

    int64

    The zero-indexed position of the component.

    status

    enum

    The status of the component. Allowed enum values: operational,degraded,partial_outage,major_outage,maintenance

    type [required]

    enum

    The type of the component. Allowed enum values: component,group

    id

    uuid

    The ID of the component.

    relationships

    object

    The relationships of a component.

    created_by_user

    object

    The Datadog user who created the component.

    data [required]

    object

    The data object identifying the Datadog user who created the component.

    id [required]

    string

    The ID of the Datadog user who created the component.

    type [required]

    enum

    Users resource type. Allowed enum values: users

    default: users

    group

    object

    The group the component belongs to.

    data [required]

    object

    The data object identifying the group the component belongs to.

    id [required]

    uuid

    The ID of the group the component belongs to.

    type [required]

    enum

    Components resource type. Allowed enum values: components

    default: components

    last_modified_by_user

    object

    The Datadog user who last modified the component.

    data [required]

    object

    The data object identifying the Datadog user who last modified the component.

    id [required]

    string

    The ID of the Datadog user who last modified the component.

    type [required]

    enum

    Users resource type. Allowed enum values: users

    default: users

    status_page

    object

    The status page the component belongs to.

    data [required]

    object

    The data object identifying the status page the component belongs to.

    id [required]

    uuid

    The ID of the status page the component belongs to.

    type [required]

    enum

    Status pages resource type. Allowed enum values: status_pages

    default: status_pages

    type [required]

    enum

    Components resource type. Allowed enum values: components

    default: components

    included

    [ <oneOf>]

    The included related resources of a component. Client must explicitly request these resources by name in the include query parameter.

    Option 1

    object

    The included Datadog user resource.

    attributes

    object

    Attributes of the Datadog user.

    email

    string

    The email of the Datadog user.

    handle

    string

    The handle of the Datadog user.

    icon

    string

    The icon of the Datadog user.

    name

    string

    The name of the Datadog user.

    uuid

    string

    The UUID of the Datadog user.

    id

    uuid

    The ID of the Datadog user.

    type [required]

    enum

    Users resource type. Allowed enum values: users

    default: users

    Option 2

    object

    The included status page resource.

    attributes

    object

    The attributes of a status page.

    company_logo

    string

    The base64-encoded image data displayed in the company logo.

    components

    [object]

    Components displayed on the status page.

    components

    [object]

    If the component is of type group, the components within the group.

    id

    uuid

    The ID of the grouped component.

    name

    string

    The name of the grouped component.

    position

    int64

    The zero-indexed position of the grouped component. Relative to the other components in the group.

    status

    enum

    The status of the component. Allowed enum values: operational,degraded,partial_outage,major_outage,maintenance

    type

    enum

    The type of the component. Allowed enum values: component

    id

    uuid

    The ID of the component.

    name

    string

    The name of the component.

    position

    int64

    The zero-indexed position of the component.

    status

    enum

    The status of the component. Allowed enum values: operational,degraded,partial_outage,major_outage,maintenance

    type

    enum

    The type of the component. Allowed enum values: component,group

    created_at

    date-time

    Timestamp of when the status page was created.

    custom_domain

    string

    If configured, the url that the status page is accessible at.

    custom_domain_enabled

    boolean

    Whether the custom domain is configured.

    domain_prefix

    string

    The subdomain of the status page's url taking the form https://{domain_prefix}.statuspage.datadoghq.com. Globally unique across Datadog Status Pages.

    email_header_image

    string

    Base64-encoded image data included in email notifications sent to status page subscribers.

    enabled

    boolean

    Whether the status page is enabled.

    favicon

    string

    Base64-encoded image data displayed in the browser tab.

    modified_at

    date-time

    Timestamp of when the status page was last modified.

    name

    string

    The name of the status page.

    page_url

    string

    The url that the status page is accessible at.

    subscriptions_enabled

    boolean

    Whether users can subscribe to the status page.

    type

    enum

    The type of the status page controlling how the status page is accessed. Allowed enum values: public,internal

    visualization_type

    enum

    The visualization type of the status page. Allowed enum values: bars_and_uptime_percentage,bars_only,component_name_only

    id

    uuid

    The ID of the status page.

    relationships

    object

    The relationships of a status page.

    created_by_user

    object

    The Datadog user who created the status page.

    data [required]

    object

    The data object identifying the Datadog user who created the status page.

    id [required]

    string

    The ID of the Datadog user who created the status page.

    type [required]

    enum

    Users resource type. Allowed enum values: users

    default: users

    last_modified_by_user

    object

    The Datadog user who last modified the status page.

    data [required]

    object

    The data object identifying the Datadog user who last modified the status page.

    id [required]

    string

    The ID of the Datadog user who last modified the status page.

    type [required]

    enum

    Users resource type. Allowed enum values: users

    default: users

    type [required]

    enum

    Status pages resource type. Allowed enum values: status_pages

    default: status_pages

    Option 3

    object

    The included component group resource.

    attributes

    object

    The attributes of a component group.

    components

    [object]

    If the component is of type group, the components within the group.

    id

    uuid

    The ID of the grouped component.

    name

    string

    The name of the grouped component.

    position

    int64

    The zero-indexed position of the grouped component. Relative to the other components in the group.

    status

    enum

    The status of the component. Allowed enum values: operational,degraded,partial_outage,major_outage,maintenance

    type

    enum

    The type of the component. Allowed enum values: component

    created_at

    date-time

    Timestamp of when the component was created.

    modified_at

    date-time

    Timestamp of when the component was last modified.

    name

    string

    The name of the component.

    position

    int64

    The zero-indexed position of the component.

    status

    enum

    The status of the component. Allowed enum values: operational,degraded,partial_outage,major_outage,maintenance

    type [required]

    enum

    The type of the component. Allowed enum values: component,group

    id

    uuid

    The ID of the component.

    relationships

    object

    The relationships of a component group.

    created_by_user

    object

    The Datadog user who created the component group.

    data [required]

    object

    The data object identifying the Datadog user who created the component group.

    id [required]

    string

    The ID of the Datadog user who created the component group.

    type [required]

    enum

    Users resource type. Allowed enum values: users

    default: users

    group

    object

    The group the component group belongs to.

    data [required]

    object

    The data object identifying the parent group of a component group.

    id [required]

    uuid

    The ID of the parent group.

    type [required]

    enum

    Components resource type. Allowed enum values: components

    default: components

    last_modified_by_user

    object

    The Datadog user who last modified the component group.

    data [required]

    object

    The data object identifying the Datadog user who last modified the component group.

    id [required]

    string

    The ID of the Datadog user who last modified the component group.

    type [required]

    enum

    Users resource type. Allowed enum values: users

    default: users

    status_page

    object

    The status page the component group belongs to.

    data [required]

    object

    The data object identifying the status page the component group belongs to.

    id [required]

    uuid

    The ID of the status page.

    type [required]

    enum

    Status pages resource type. Allowed enum values: status_pages

    default: status_pages

    type [required]

    enum

    Components resource type. Allowed enum values: components

    default: components

    {
      "data": {
        "attributes": {
          "components": [
            {
              "id": "string",
              "name": "string",
              "position": "integer",
              "status": "string",
              "type": "component"
            }
          ],
          "created_at": "2019-09-19T10:00:00.000Z",
          "modified_at": "2019-09-19T10:00:00.000Z",
          "name": "string",
          "position": "integer",
          "status": "operational",
          "type": "component"
        },
        "id": "string",
        "relationships": {
          "created_by_user": {
            "data": {
              "id": "",
              "type": "users"
            }
          },
          "group": {
            "data": {
              "id": "1234abcd-12ab-34cd-56ef-123456abcdef",
              "type": "components"
            }
          },
          "last_modified_by_user": {
            "data": {
              "id": "",
              "type": "users"
            }
          },
          "status_page": {
            "data": {
              "id": "1234abcd-12ab-34cd-56ef-123456abcdef",
              "type": "status_pages"
            }
          }
        },
        "type": "components"
      },
      "included": [
        {
          "attributes": {
            "email": "string",
            "handle": "string",
            "icon": "string",
            "name": "string",
            "uuid": "string"
          },
          "id": "string",
          "type": "users"
        }
      ]
    }

    Too many requests

    API error response.

    Expand All

    항목

    유형

    설명

    errors [required]

    [string]

    A list of errors.

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

    코드 사례

                              # Path parameters
    export page_id="1234abcd-12ab-34cd-56ef-123456abcdef"
    export component_id="1234abcd-12ab-34cd-56ef-123456abcdef"
    # Curl command
    curl -X PATCH "https://api.ap1.datadoghq.com"https://api.ap2.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/statuspages/${page_id}/components/${component_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": "Logs Indexing" }, "id": "c34e5b83-90fe-4de2-087b-ea1f64387277", "type": "components" } } EOF
    // Update component returns "OK" response
    
    package main
    
    import (
    	"context"
    	"encoding/json"
    	"fmt"
    	"os"
    
    	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
    	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV2"
    	"github.com/google/uuid"
    )
    
    func main() {
    	// there is a valid "status_page" in the system
    	StatusPageDataAttributesComponents0ID := uuid.MustParse(os.Getenv("STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID"))
    	StatusPageDataID := uuid.MustParse(os.Getenv("STATUS_PAGE_DATA_ID"))
    
    	body := datadogV2.PatchComponentRequest{
    		Data: &datadogV2.PatchComponentRequestData{
    			Attributes: datadogV2.PatchComponentRequestDataAttributes{
    				Name: datadog.PtrString("Logs Indexing"),
    			},
    			Id:   StatusPageDataAttributesComponents0ID,
    			Type: datadogV2.STATUSPAGESCOMPONENTGROUPTYPE_COMPONENTS,
    		},
    	}
    	ctx := datadog.NewDefaultContext(context.Background())
    	configuration := datadog.NewConfiguration()
    	apiClient := datadog.NewAPIClient(configuration)
    	api := datadogV2.NewStatusPagesApi(apiClient)
    	resp, r, err := api.UpdateComponent(ctx, StatusPageDataID, StatusPageDataAttributesComponents0ID, body, *datadogV2.NewUpdateComponentOptionalParameters())
    
    	if err != nil {
    		fmt.Fprintf(os.Stderr, "Error when calling `StatusPagesApi.UpdateComponent`: %v\n", err)
    		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    	}
    
    	responseContent, _ := json.MarshalIndent(resp, "", "  ")
    	fmt.Fprintf(os.Stdout, "Response from `StatusPagesApi.UpdateComponent`:\n%s\n", responseContent)
    }
    

    Instructions

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

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" go run "main.go"
    // Update component returns "OK" response
    
    import com.datadog.api.client.ApiClient;
    import com.datadog.api.client.ApiException;
    import com.datadog.api.client.v2.api.StatusPagesApi;
    import com.datadog.api.client.v2.model.PatchComponentRequest;
    import com.datadog.api.client.v2.model.PatchComponentRequestData;
    import com.datadog.api.client.v2.model.PatchComponentRequestDataAttributes;
    import com.datadog.api.client.v2.model.StatusPagesComponent;
    import com.datadog.api.client.v2.model.StatusPagesComponentGroupType;
    import java.util.UUID;
    
    public class Example {
      public static void main(String[] args) {
        ApiClient defaultClient = ApiClient.getDefaultApiClient();
        StatusPagesApi apiInstance = new StatusPagesApi(defaultClient);
    
        // there is a valid "status_page" in the system
        UUID STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID = null;
        try {
          STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID =
              UUID.fromString(System.getenv("STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID"));
        } catch (IllegalArgumentException e) {
          System.err.println("Error parsing UUID: " + e.getMessage());
        }
        UUID STATUS_PAGE_DATA_ID = null;
        try {
          STATUS_PAGE_DATA_ID = UUID.fromString(System.getenv("STATUS_PAGE_DATA_ID"));
        } catch (IllegalArgumentException e) {
          System.err.println("Error parsing UUID: " + e.getMessage());
        }
    
        PatchComponentRequest body =
            new PatchComponentRequest()
                .data(
                    new PatchComponentRequestData()
                        .attributes(new PatchComponentRequestDataAttributes().name("Logs Indexing"))
                        .id(STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID)
                        .type(StatusPagesComponentGroupType.COMPONENTS));
    
        try {
          StatusPagesComponent result =
              apiInstance.updateComponent(
                  STATUS_PAGE_DATA_ID, STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID, body);
          System.out.println(result);
        } catch (ApiException e) {
          System.err.println("Exception when calling StatusPagesApi#updateComponent");
          System.err.println("Status code: " + e.getCode());
          System.err.println("Reason: " + e.getResponseBody());
          System.err.println("Response headers: " + e.getResponseHeaders());
          e.printStackTrace();
        }
      }
    }
    

    Instructions

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

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" java "Example.java"
    """
    Update component returns "OK" response
    """
    
    from os import environ
    from datadog_api_client import ApiClient, Configuration
    from datadog_api_client.v2.api.status_pages_api import StatusPagesApi
    from datadog_api_client.v2.model.patch_component_request import PatchComponentRequest
    from datadog_api_client.v2.model.patch_component_request_data import PatchComponentRequestData
    from datadog_api_client.v2.model.patch_component_request_data_attributes import PatchComponentRequestDataAttributes
    from datadog_api_client.v2.model.status_pages_component_group_type import StatusPagesComponentGroupType
    
    # there is a valid "status_page" in the system
    STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID = environ["STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID"]
    STATUS_PAGE_DATA_ID = environ["STATUS_PAGE_DATA_ID"]
    
    body = PatchComponentRequest(
        data=PatchComponentRequestData(
            attributes=PatchComponentRequestDataAttributes(
                name="Logs Indexing",
            ),
            id=STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID,
            type=StatusPagesComponentGroupType.COMPONENTS,
        ),
    )
    
    configuration = Configuration()
    with ApiClient(configuration) as api_client:
        api_instance = StatusPagesApi(api_client)
        response = api_instance.update_component(
            page_id=STATUS_PAGE_DATA_ID, component_id=STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID, body=body
        )
    
        print(response)
    

    Instructions

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

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" python3 "example.py"
    # Update component returns "OK" response
    
    require "datadog_api_client"
    api_instance = DatadogAPIClient::V2::StatusPagesAPI.new
    
    # there is a valid "status_page" in the system
    STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID = ENV["STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID"]
    STATUS_PAGE_DATA_ID = ENV["STATUS_PAGE_DATA_ID"]
    
    body = DatadogAPIClient::V2::PatchComponentRequest.new({
      data: DatadogAPIClient::V2::PatchComponentRequestData.new({
        attributes: DatadogAPIClient::V2::PatchComponentRequestDataAttributes.new({
          name: "Logs Indexing",
        }),
        id: STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID,
        type: DatadogAPIClient::V2::StatusPagesComponentGroupType::COMPONENTS,
      }),
    })
    p api_instance.update_component(STATUS_PAGE_DATA_ID, STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID, body)
    

    Instructions

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

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" rb "example.rb"
    // Update component returns "OK" response
    use datadog_api_client::datadog;
    use datadog_api_client::datadogV2::api_status_pages::StatusPagesAPI;
    use datadog_api_client::datadogV2::api_status_pages::UpdateComponentOptionalParams;
    use datadog_api_client::datadogV2::model::PatchComponentRequest;
    use datadog_api_client::datadogV2::model::PatchComponentRequestData;
    use datadog_api_client::datadogV2::model::PatchComponentRequestDataAttributes;
    use datadog_api_client::datadogV2::model::StatusPagesComponentGroupType;
    
    #[tokio::main]
    async fn main() {
        // there is a valid "status_page" in the system
        let status_page_data_attributes_components_0_id = uuid::Uuid::parse_str(
            &std::env::var("STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID").unwrap(),
        )
        .expect("Invalid UUID");
        let status_page_data_id = uuid::Uuid::parse_str(&std::env::var("STATUS_PAGE_DATA_ID").unwrap())
            .expect("Invalid UUID");
        let body = PatchComponentRequest::new().data(PatchComponentRequestData::new(
            PatchComponentRequestDataAttributes::new().name("Logs Indexing".to_string()),
            status_page_data_attributes_components_0_id.clone(),
            StatusPagesComponentGroupType::COMPONENTS,
        ));
        let configuration = datadog::Configuration::new();
        let api = StatusPagesAPI::with_config(configuration);
        let resp = api
            .update_component(
                status_page_data_id.clone(),
                status_page_data_attributes_components_0_id.clone(),
                body,
                UpdateComponentOptionalParams::default(),
            )
            .await;
        if let Ok(value) = resp {
            println!("{:#?}", value);
        } else {
            println!("{:#?}", resp.unwrap_err());
        }
    }
    

    Instructions

    First install the library and its dependencies and then save the example to src/main.rs and run following commands:

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo run
    /**
     * Update component returns "OK" response
     */
    
    import { client, v2 } from "@datadog/datadog-api-client";
    
    const configuration = client.createConfiguration();
    const apiInstance = new v2.StatusPagesApi(configuration);
    
    // there is a valid "status_page" in the system
    const STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID = process.env
      .STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID as string;
    const STATUS_PAGE_DATA_ID = process.env.STATUS_PAGE_DATA_ID as string;
    
    const params: v2.StatusPagesApiUpdateComponentRequest = {
      body: {
        data: {
          attributes: {
            name: "Logs Indexing",
          },
          id: STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID,
          type: "components",
        },
      },
      pageId: STATUS_PAGE_DATA_ID,
      componentId: STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID,
    };
    
    apiInstance
      .updateComponent(params)
      .then((data: v2.StatusPagesComponent) => {
        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.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" tsc "example.ts"

    GET https://api.ap1.datadoghq.com/api/v2/statuspages/{page_id}/componentshttps://api.ap2.datadoghq.com/api/v2/statuspages/{page_id}/componentshttps://api.datadoghq.eu/api/v2/statuspages/{page_id}/componentshttps://api.ddog-gov.com/api/v2/statuspages/{page_id}/componentshttps://api.datadoghq.com/api/v2/statuspages/{page_id}/componentshttps://api.us3.datadoghq.com/api/v2/statuspages/{page_id}/componentshttps://api.us5.datadoghq.com/api/v2/statuspages/{page_id}/components

    개요

    Lists all components for a status page. This endpoint requires the status_pages_settings_read permission.

    인수

    경로 파라미터

    이름

    유형

    설명

    page_id [required]

    string

    The ID of the status page.

    쿼리 문자열

    이름

    유형

    설명

    include

    string

    Comma-separated list of resources to include. Supported values: created_by_user, last_modified_by_user, status_page, group.

    응답

    OK

    Response object for a list of components.

    Expand All

    항목

    유형

    설명

    data [required]

    [object]

    A list of component data objects.

    attributes

    object

    The attributes of a component.

    components

    [object]

    If the component is of type group, the components within the group.

    id

    uuid

    The ID of the component within the group.

    name

    string

    The name of the component within the group.

    position

    int64

    The zero-indexed position of the component within the group.

    status

    enum

    The status of the component. Allowed enum values: operational,degraded,partial_outage,major_outage,maintenance

    type

    enum

    The type of the component. Allowed enum values: component

    created_at

    date-time

    Timestamp of when the component was created.

    modified_at

    date-time

    Timestamp of when the component was last modified.

    name

    string

    The name of the component.

    position

    int64

    The zero-indexed position of the component.

    status

    enum

    The status of the component. Allowed enum values: operational,degraded,partial_outage,major_outage,maintenance

    type [required]

    enum

    The type of the component. Allowed enum values: component,group

    id

    uuid

    The ID of the component.

    relationships

    object

    The relationships of a component.

    created_by_user

    object

    The Datadog user who created the component.

    data [required]

    object

    The data object identifying the Datadog user who created the component.

    id [required]

    string

    The ID of the Datadog user who created the component.

    type [required]

    enum

    Users resource type. Allowed enum values: users

    default: users

    group

    object

    The group the component belongs to.

    data [required]

    object

    The data object identifying the group the component belongs to.

    id [required]

    uuid

    The ID of the group the component belongs to.

    type [required]

    enum

    Components resource type. Allowed enum values: components

    default: components

    last_modified_by_user

    object

    The Datadog user who last modified the component.

    data [required]

    object

    The data object identifying the Datadog user who last modified the component.

    id [required]

    string

    The ID of the Datadog user who last modified the component.

    type [required]

    enum

    Users resource type. Allowed enum values: users

    default: users

    status_page

    object

    The status page the component belongs to.

    data [required]

    object

    The data object identifying the status page the component belongs to.

    id [required]

    uuid

    The ID of the status page the component belongs to.

    type [required]

    enum

    Status pages resource type. Allowed enum values: status_pages

    default: status_pages

    type [required]

    enum

    Components resource type. Allowed enum values: components

    default: components

    included

    [ <oneOf>]

    The included related resources of a component. Client must explicitly request these resources by name in the include query parameter.

    Option 1

    object

    The included Datadog user resource.

    attributes

    object

    Attributes of the Datadog user.

    email

    string

    The email of the Datadog user.

    handle

    string

    The handle of the Datadog user.

    icon

    string

    The icon of the Datadog user.

    name

    string

    The name of the Datadog user.

    uuid

    string

    The UUID of the Datadog user.

    id

    uuid

    The ID of the Datadog user.

    type [required]

    enum

    Users resource type. Allowed enum values: users

    default: users

    Option 2

    object

    The included status page resource.

    attributes

    object

    The attributes of a status page.

    company_logo

    string

    The base64-encoded image data displayed in the company logo.

    components

    [object]

    Components displayed on the status page.

    components

    [object]

    If the component is of type group, the components within the group.

    id

    uuid

    The ID of the grouped component.

    name

    string

    The name of the grouped component.

    position

    int64

    The zero-indexed position of the grouped component. Relative to the other components in the group.

    status

    enum

    The status of the component. Allowed enum values: operational,degraded,partial_outage,major_outage,maintenance

    type

    enum

    The type of the component. Allowed enum values: component

    id

    uuid

    The ID of the component.

    name

    string

    The name of the component.

    position

    int64

    The zero-indexed position of the component.

    status

    enum

    The status of the component. Allowed enum values: operational,degraded,partial_outage,major_outage,maintenance

    type

    enum

    The type of the component. Allowed enum values: component,group

    created_at

    date-time

    Timestamp of when the status page was created.

    custom_domain

    string

    If configured, the url that the status page is accessible at.

    custom_domain_enabled

    boolean

    Whether the custom domain is configured.

    domain_prefix

    string

    The subdomain of the status page's url taking the form https://{domain_prefix}.statuspage.datadoghq.com. Globally unique across Datadog Status Pages.

    email_header_image

    string

    Base64-encoded image data included in email notifications sent to status page subscribers.

    enabled

    boolean

    Whether the status page is enabled.

    favicon

    string

    Base64-encoded image data displayed in the browser tab.

    modified_at

    date-time

    Timestamp of when the status page was last modified.

    name

    string

    The name of the status page.

    page_url

    string

    The url that the status page is accessible at.

    subscriptions_enabled

    boolean

    Whether users can subscribe to the status page.

    type

    enum

    The type of the status page controlling how the status page is accessed. Allowed enum values: public,internal

    visualization_type

    enum

    The visualization type of the status page. Allowed enum values: bars_and_uptime_percentage,bars_only,component_name_only

    id

    uuid

    The ID of the status page.

    relationships

    object

    The relationships of a status page.

    created_by_user

    object

    The Datadog user who created the status page.

    data [required]

    object

    The data object identifying the Datadog user who created the status page.

    id [required]

    string

    The ID of the Datadog user who created the status page.

    type [required]

    enum

    Users resource type. Allowed enum values: users

    default: users

    last_modified_by_user

    object

    The Datadog user who last modified the status page.

    data [required]

    object

    The data object identifying the Datadog user who last modified the status page.

    id [required]

    string

    The ID of the Datadog user who last modified the status page.

    type [required]

    enum

    Users resource type. Allowed enum values: users

    default: users

    type [required]

    enum

    Status pages resource type. Allowed enum values: status_pages

    default: status_pages

    Option 3

    object

    The included component group resource.

    attributes

    object

    The attributes of a component group.

    components

    [object]

    If the component is of type group, the components within the group.

    id

    uuid

    The ID of the grouped component.

    name

    string

    The name of the grouped component.

    position

    int64

    The zero-indexed position of the grouped component. Relative to the other components in the group.

    status

    enum

    The status of the component. Allowed enum values: operational,degraded,partial_outage,major_outage,maintenance

    type

    enum

    The type of the component. Allowed enum values: component

    created_at

    date-time

    Timestamp of when the component was created.

    modified_at

    date-time

    Timestamp of when the component was last modified.

    name

    string

    The name of the component.

    position

    int64

    The zero-indexed position of the component.

    status

    enum

    The status of the component. Allowed enum values: operational,degraded,partial_outage,major_outage,maintenance

    type [required]

    enum

    The type of the component. Allowed enum values: component,group

    id

    uuid

    The ID of the component.

    relationships

    object

    The relationships of a component group.

    created_by_user

    object

    The Datadog user who created the component group.

    data [required]

    object

    The data object identifying the Datadog user who created the component group.

    id [required]

    string

    The ID of the Datadog user who created the component group.

    type [required]

    enum

    Users resource type. Allowed enum values: users

    default: users

    group

    object

    The group the component group belongs to.

    data [required]

    object

    The data object identifying the parent group of a component group.

    id [required]

    uuid

    The ID of the parent group.

    type [required]

    enum

    Components resource type. Allowed enum values: components

    default: components

    last_modified_by_user

    object

    The Datadog user who last modified the component group.

    data [required]

    object

    The data object identifying the Datadog user who last modified the component group.

    id [required]

    string

    The ID of the Datadog user who last modified the component group.

    type [required]

    enum

    Users resource type. Allowed enum values: users

    default: users

    status_page

    object

    The status page the component group belongs to.

    data [required]

    object

    The data object identifying the status page the component group belongs to.

    id [required]

    uuid

    The ID of the status page.

    type [required]

    enum

    Status pages resource type. Allowed enum values: status_pages

    default: status_pages

    type [required]

    enum

    Components resource type. Allowed enum values: components

    default: components

    {
      "data": [
        {
          "attributes": {
            "components": [
              {
                "id": "string",
                "name": "string",
                "position": "integer",
                "status": "string",
                "type": "component"
              }
            ],
            "created_at": "2019-09-19T10:00:00.000Z",
            "modified_at": "2019-09-19T10:00:00.000Z",
            "name": "string",
            "position": "integer",
            "status": "operational",
            "type": "component"
          },
          "id": "string",
          "relationships": {
            "created_by_user": {
              "data": {
                "id": "",
                "type": "users"
              }
            },
            "group": {
              "data": {
                "id": "1234abcd-12ab-34cd-56ef-123456abcdef",
                "type": "components"
              }
            },
            "last_modified_by_user": {
              "data": {
                "id": "",
                "type": "users"
              }
            },
            "status_page": {
              "data": {
                "id": "1234abcd-12ab-34cd-56ef-123456abcdef",
                "type": "status_pages"
              }
            }
          },
          "type": "components"
        }
      ],
      "included": [
        {
          "attributes": {
            "email": "string",
            "handle": "string",
            "icon": "string",
            "name": "string",
            "uuid": "string"
          },
          "id": "string",
          "type": "users"
        }
      ]
    }

    Too many requests

    API error response.

    Expand All

    항목

    유형

    설명

    errors [required]

    [string]

    A list of errors.

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

    코드 사례

                      # Path parameters
    export page_id="1234abcd-12ab-34cd-56ef-123456abcdef"
    # Curl command
    curl -X GET "https://api.ap1.datadoghq.com"https://api.ap2.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/statuspages/${page_id}/components" \ -H "Accept: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}"
    """
    List components returns "OK" response
    """
    
    from os import environ
    from datadog_api_client import ApiClient, Configuration
    from datadog_api_client.v2.api.status_pages_api import StatusPagesApi
    
    # there is a valid "status_page" in the system
    STATUS_PAGE_DATA_ID = environ["STATUS_PAGE_DATA_ID"]
    
    configuration = Configuration()
    with ApiClient(configuration) as api_client:
        api_instance = StatusPagesApi(api_client)
        response = api_instance.list_components(
            page_id=STATUS_PAGE_DATA_ID,
        )
    
        print(response)
    

    Instructions

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

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" python3 "example.py"
    # List components returns "OK" response
    
    require "datadog_api_client"
    api_instance = DatadogAPIClient::V2::StatusPagesAPI.new
    
    # there is a valid "status_page" in the system
    STATUS_PAGE_DATA_ID = ENV["STATUS_PAGE_DATA_ID"]
    p api_instance.list_components(STATUS_PAGE_DATA_ID)
    

    Instructions

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

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" rb "example.rb"
    // List components returns "OK" response
    
    package main
    
    import (
    	"context"
    	"encoding/json"
    	"fmt"
    	"os"
    
    	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
    	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV2"
    	"github.com/google/uuid"
    )
    
    func main() {
    	// there is a valid "status_page" in the system
    	StatusPageDataID := uuid.MustParse(os.Getenv("STATUS_PAGE_DATA_ID"))
    
    	ctx := datadog.NewDefaultContext(context.Background())
    	configuration := datadog.NewConfiguration()
    	apiClient := datadog.NewAPIClient(configuration)
    	api := datadogV2.NewStatusPagesApi(apiClient)
    	resp, r, err := api.ListComponents(ctx, StatusPageDataID, *datadogV2.NewListComponentsOptionalParameters())
    
    	if err != nil {
    		fmt.Fprintf(os.Stderr, "Error when calling `StatusPagesApi.ListComponents`: %v\n", err)
    		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    	}
    
    	responseContent, _ := json.MarshalIndent(resp, "", "  ")
    	fmt.Fprintf(os.Stdout, "Response from `StatusPagesApi.ListComponents`:\n%s\n", responseContent)
    }
    

    Instructions

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

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" go run "main.go"
    // List components returns "OK" response
    
    import com.datadog.api.client.ApiClient;
    import com.datadog.api.client.ApiException;
    import com.datadog.api.client.v2.api.StatusPagesApi;
    import com.datadog.api.client.v2.model.StatusPagesComponentArray;
    import java.util.UUID;
    
    public class Example {
      public static void main(String[] args) {
        ApiClient defaultClient = ApiClient.getDefaultApiClient();
        StatusPagesApi apiInstance = new StatusPagesApi(defaultClient);
    
        // there is a valid "status_page" in the system
        UUID STATUS_PAGE_DATA_ID = null;
        try {
          STATUS_PAGE_DATA_ID = UUID.fromString(System.getenv("STATUS_PAGE_DATA_ID"));
        } catch (IllegalArgumentException e) {
          System.err.println("Error parsing UUID: " + e.getMessage());
        }
    
        try {
          StatusPagesComponentArray result = apiInstance.listComponents(STATUS_PAGE_DATA_ID);
          System.out.println(result);
        } catch (ApiException e) {
          System.err.println("Exception when calling StatusPagesApi#listComponents");
          System.err.println("Status code: " + e.getCode());
          System.err.println("Reason: " + e.getResponseBody());
          System.err.println("Response headers: " + e.getResponseHeaders());
          e.printStackTrace();
        }
      }
    }
    

    Instructions

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

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" java "Example.java"
    // List components returns "OK" response
    use datadog_api_client::datadog;
    use datadog_api_client::datadogV2::api_status_pages::ListComponentsOptionalParams;
    use datadog_api_client::datadogV2::api_status_pages::StatusPagesAPI;
    
    #[tokio::main]
    async fn main() {
        // there is a valid "status_page" in the system
        let status_page_data_id = uuid::Uuid::parse_str(&std::env::var("STATUS_PAGE_DATA_ID").unwrap())
            .expect("Invalid UUID");
        let configuration = datadog::Configuration::new();
        let api = StatusPagesAPI::with_config(configuration);
        let resp = api
            .list_components(
                status_page_data_id.clone(),
                ListComponentsOptionalParams::default(),
            )
            .await;
        if let Ok(value) = resp {
            println!("{:#?}", value);
        } else {
            println!("{:#?}", resp.unwrap_err());
        }
    }
    

    Instructions

    First install the library and its dependencies and then save the example to src/main.rs and run following commands:

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo run
    /**
     * List components returns "OK" response
     */
    
    import { client, v2 } from "@datadog/datadog-api-client";
    
    const configuration = client.createConfiguration();
    const apiInstance = new v2.StatusPagesApi(configuration);
    
    // there is a valid "status_page" in the system
    const STATUS_PAGE_DATA_ID = process.env.STATUS_PAGE_DATA_ID as string;
    
    const params: v2.StatusPagesApiListComponentsRequest = {
      pageId: STATUS_PAGE_DATA_ID,
    };
    
    apiInstance
      .listComponents(params)
      .then((data: v2.StatusPagesComponentArray) => {
        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.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" tsc "example.ts"

    GET https://api.ap1.datadoghq.com/api/v2/statuspages/{page_id}/components/{component_id}https://api.ap2.datadoghq.com/api/v2/statuspages/{page_id}/components/{component_id}https://api.datadoghq.eu/api/v2/statuspages/{page_id}/components/{component_id}https://api.ddog-gov.com/api/v2/statuspages/{page_id}/components/{component_id}https://api.datadoghq.com/api/v2/statuspages/{page_id}/components/{component_id}https://api.us3.datadoghq.com/api/v2/statuspages/{page_id}/components/{component_id}https://api.us5.datadoghq.com/api/v2/statuspages/{page_id}/components/{component_id}

    개요

    Retrieves a specific component by its ID. This endpoint requires the status_pages_settings_read permission.

    인수

    경로 파라미터

    이름

    유형

    설명

    page_id [required]

    string

    The ID of the status page.

    component_id [required]

    string

    The ID of the component.

    쿼리 문자열

    이름

    유형

    설명

    include

    string

    Comma-separated list of resources to include. Supported values: created_by_user, last_modified_by_user, status_page, group.

    응답

    OK

    Response object for a single component.

    Expand All

    항목

    유형

    설명

    data

    object

    The data object for a component.

    attributes

    object

    The attributes of a component.

    components

    [object]

    If the component is of type group, the components within the group.

    id

    uuid

    The ID of the component within the group.

    name

    string

    The name of the component within the group.

    position

    int64

    The zero-indexed position of the component within the group.

    status

    enum

    The status of the component. Allowed enum values: operational,degraded,partial_outage,major_outage,maintenance

    type

    enum

    The type of the component. Allowed enum values: component

    created_at

    date-time

    Timestamp of when the component was created.

    modified_at

    date-time

    Timestamp of when the component was last modified.

    name

    string

    The name of the component.

    position

    int64

    The zero-indexed position of the component.

    status

    enum

    The status of the component. Allowed enum values: operational,degraded,partial_outage,major_outage,maintenance

    type [required]

    enum

    The type of the component. Allowed enum values: component,group

    id

    uuid

    The ID of the component.

    relationships

    object

    The relationships of a component.

    created_by_user

    object

    The Datadog user who created the component.

    data [required]

    object

    The data object identifying the Datadog user who created the component.

    id [required]

    string

    The ID of the Datadog user who created the component.

    type [required]

    enum

    Users resource type. Allowed enum values: users

    default: users

    group

    object

    The group the component belongs to.

    data [required]

    object

    The data object identifying the group the component belongs to.

    id [required]

    uuid

    The ID of the group the component belongs to.

    type [required]

    enum

    Components resource type. Allowed enum values: components

    default: components

    last_modified_by_user

    object

    The Datadog user who last modified the component.

    data [required]

    object

    The data object identifying the Datadog user who last modified the component.

    id [required]

    string

    The ID of the Datadog user who last modified the component.

    type [required]

    enum

    Users resource type. Allowed enum values: users

    default: users

    status_page

    object

    The status page the component belongs to.

    data [required]

    object

    The data object identifying the status page the component belongs to.

    id [required]

    uuid

    The ID of the status page the component belongs to.

    type [required]

    enum

    Status pages resource type. Allowed enum values: status_pages

    default: status_pages

    type [required]

    enum

    Components resource type. Allowed enum values: components

    default: components

    included

    [ <oneOf>]

    The included related resources of a component. Client must explicitly request these resources by name in the include query parameter.

    Option 1

    object

    The included Datadog user resource.

    attributes

    object

    Attributes of the Datadog user.

    email

    string

    The email of the Datadog user.

    handle

    string

    The handle of the Datadog user.

    icon

    string

    The icon of the Datadog user.

    name

    string

    The name of the Datadog user.

    uuid

    string

    The UUID of the Datadog user.

    id

    uuid

    The ID of the Datadog user.

    type [required]

    enum

    Users resource type. Allowed enum values: users

    default: users

    Option 2

    object

    The included status page resource.

    attributes

    object

    The attributes of a status page.

    company_logo

    string

    The base64-encoded image data displayed in the company logo.

    components

    [object]

    Components displayed on the status page.

    components

    [object]

    If the component is of type group, the components within the group.

    id

    uuid

    The ID of the grouped component.

    name

    string

    The name of the grouped component.

    position

    int64

    The zero-indexed position of the grouped component. Relative to the other components in the group.

    status

    enum

    The status of the component. Allowed enum values: operational,degraded,partial_outage,major_outage,maintenance

    type

    enum

    The type of the component. Allowed enum values: component

    id

    uuid

    The ID of the component.

    name

    string

    The name of the component.

    position

    int64

    The zero-indexed position of the component.

    status

    enum

    The status of the component. Allowed enum values: operational,degraded,partial_outage,major_outage,maintenance

    type

    enum

    The type of the component. Allowed enum values: component,group

    created_at

    date-time

    Timestamp of when the status page was created.

    custom_domain

    string

    If configured, the url that the status page is accessible at.

    custom_domain_enabled

    boolean

    Whether the custom domain is configured.

    domain_prefix

    string

    The subdomain of the status page's url taking the form https://{domain_prefix}.statuspage.datadoghq.com. Globally unique across Datadog Status Pages.

    email_header_image

    string

    Base64-encoded image data included in email notifications sent to status page subscribers.

    enabled

    boolean

    Whether the status page is enabled.

    favicon

    string

    Base64-encoded image data displayed in the browser tab.

    modified_at

    date-time

    Timestamp of when the status page was last modified.

    name

    string

    The name of the status page.

    page_url

    string

    The url that the status page is accessible at.

    subscriptions_enabled

    boolean

    Whether users can subscribe to the status page.

    type

    enum

    The type of the status page controlling how the status page is accessed. Allowed enum values: public,internal

    visualization_type

    enum

    The visualization type of the status page. Allowed enum values: bars_and_uptime_percentage,bars_only,component_name_only

    id

    uuid

    The ID of the status page.

    relationships

    object

    The relationships of a status page.

    created_by_user

    object

    The Datadog user who created the status page.

    data [required]

    object

    The data object identifying the Datadog user who created the status page.

    id [required]

    string

    The ID of the Datadog user who created the status page.

    type [required]

    enum

    Users resource type. Allowed enum values: users

    default: users

    last_modified_by_user

    object

    The Datadog user who last modified the status page.

    data [required]

    object

    The data object identifying the Datadog user who last modified the status page.

    id [required]

    string

    The ID of the Datadog user who last modified the status page.

    type [required]

    enum

    Users resource type. Allowed enum values: users

    default: users

    type [required]

    enum

    Status pages resource type. Allowed enum values: status_pages

    default: status_pages

    Option 3

    object

    The included component group resource.

    attributes

    object

    The attributes of a component group.

    components

    [object]

    If the component is of type group, the components within the group.

    id

    uuid

    The ID of the grouped component.

    name

    string

    The name of the grouped component.

    position

    int64

    The zero-indexed position of the grouped component. Relative to the other components in the group.

    status

    enum

    The status of the component. Allowed enum values: operational,degraded,partial_outage,major_outage,maintenance

    type

    enum

    The type of the component. Allowed enum values: component

    created_at

    date-time

    Timestamp of when the component was created.

    modified_at

    date-time

    Timestamp of when the component was last modified.

    name

    string

    The name of the component.

    position

    int64

    The zero-indexed position of the component.

    status

    enum

    The status of the component. Allowed enum values: operational,degraded,partial_outage,major_outage,maintenance

    type [required]

    enum

    The type of the component. Allowed enum values: component,group

    id

    uuid

    The ID of the component.

    relationships

    object

    The relationships of a component group.

    created_by_user

    object

    The Datadog user who created the component group.

    data [required]

    object

    The data object identifying the Datadog user who created the component group.

    id [required]

    string

    The ID of the Datadog user who created the component group.

    type [required]

    enum

    Users resource type. Allowed enum values: users

    default: users

    group

    object

    The group the component group belongs to.

    data [required]

    object

    The data object identifying the parent group of a component group.

    id [required]

    uuid

    The ID of the parent group.

    type [required]

    enum

    Components resource type. Allowed enum values: components

    default: components

    last_modified_by_user

    object

    The Datadog user who last modified the component group.

    data [required]

    object

    The data object identifying the Datadog user who last modified the component group.

    id [required]

    string

    The ID of the Datadog user who last modified the component group.

    type [required]

    enum

    Users resource type. Allowed enum values: users

    default: users

    status_page

    object

    The status page the component group belongs to.

    data [required]

    object

    The data object identifying the status page the component group belongs to.

    id [required]

    uuid

    The ID of the status page.

    type [required]

    enum

    Status pages resource type. Allowed enum values: status_pages

    default: status_pages

    type [required]

    enum

    Components resource type. Allowed enum values: components

    default: components

    {
      "data": {
        "attributes": {
          "components": [
            {
              "id": "string",
              "name": "string",
              "position": "integer",
              "status": "string",
              "type": "component"
            }
          ],
          "created_at": "2019-09-19T10:00:00.000Z",
          "modified_at": "2019-09-19T10:00:00.000Z",
          "name": "string",
          "position": "integer",
          "status": "operational",
          "type": "component"
        },
        "id": "string",
        "relationships": {
          "created_by_user": {
            "data": {
              "id": "",
              "type": "users"
            }
          },
          "group": {
            "data": {
              "id": "1234abcd-12ab-34cd-56ef-123456abcdef",
              "type": "components"
            }
          },
          "last_modified_by_user": {
            "data": {
              "id": "",
              "type": "users"
            }
          },
          "status_page": {
            "data": {
              "id": "1234abcd-12ab-34cd-56ef-123456abcdef",
              "type": "status_pages"
            }
          }
        },
        "type": "components"
      },
      "included": [
        {
          "attributes": {
            "email": "string",
            "handle": "string",
            "icon": "string",
            "name": "string",
            "uuid": "string"
          },
          "id": "string",
          "type": "users"
        }
      ]
    }

    Too many requests

    API error response.

    Expand All

    항목

    유형

    설명

    errors [required]

    [string]

    A list of errors.

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

    코드 사례

                      # Path parameters
    export page_id="1234abcd-12ab-34cd-56ef-123456abcdef"
    export component_id="1234abcd-12ab-34cd-56ef-123456abcdef"
    # Curl command
    curl -X GET "https://api.ap1.datadoghq.com"https://api.ap2.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/statuspages/${page_id}/components/${component_id}" \ -H "Accept: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}"
    """
    Get component returns "OK" response
    """
    
    from os import environ
    from datadog_api_client import ApiClient, Configuration
    from datadog_api_client.v2.api.status_pages_api import StatusPagesApi
    
    # there is a valid "status_page" in the system
    STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID = environ["STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID"]
    STATUS_PAGE_DATA_ID = environ["STATUS_PAGE_DATA_ID"]
    
    configuration = Configuration()
    with ApiClient(configuration) as api_client:
        api_instance = StatusPagesApi(api_client)
        response = api_instance.get_component(
            page_id=STATUS_PAGE_DATA_ID,
            component_id=STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID,
        )
    
        print(response)
    

    Instructions

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

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" python3 "example.py"
    # Get component returns "OK" response
    
    require "datadog_api_client"
    api_instance = DatadogAPIClient::V2::StatusPagesAPI.new
    
    # there is a valid "status_page" in the system
    STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID = ENV["STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID"]
    STATUS_PAGE_DATA_ID = ENV["STATUS_PAGE_DATA_ID"]
    p api_instance.get_component(STATUS_PAGE_DATA_ID, STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID)
    

    Instructions

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

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" rb "example.rb"
    // Get component returns "OK" response
    
    package main
    
    import (
    	"context"
    	"encoding/json"
    	"fmt"
    	"os"
    
    	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
    	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV2"
    	"github.com/google/uuid"
    )
    
    func main() {
    	// there is a valid "status_page" in the system
    	StatusPageDataAttributesComponents0ID := uuid.MustParse(os.Getenv("STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID"))
    	StatusPageDataID := uuid.MustParse(os.Getenv("STATUS_PAGE_DATA_ID"))
    
    	ctx := datadog.NewDefaultContext(context.Background())
    	configuration := datadog.NewConfiguration()
    	apiClient := datadog.NewAPIClient(configuration)
    	api := datadogV2.NewStatusPagesApi(apiClient)
    	resp, r, err := api.GetComponent(ctx, StatusPageDataID, StatusPageDataAttributesComponents0ID, *datadogV2.NewGetComponentOptionalParameters())
    
    	if err != nil {
    		fmt.Fprintf(os.Stderr, "Error when calling `StatusPagesApi.GetComponent`: %v\n", err)
    		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    	}
    
    	responseContent, _ := json.MarshalIndent(resp, "", "  ")
    	fmt.Fprintf(os.Stdout, "Response from `StatusPagesApi.GetComponent`:\n%s\n", responseContent)
    }
    

    Instructions

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

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" go run "main.go"
    // Get component returns "OK" response
    
    import com.datadog.api.client.ApiClient;
    import com.datadog.api.client.ApiException;
    import com.datadog.api.client.v2.api.StatusPagesApi;
    import com.datadog.api.client.v2.model.StatusPagesComponent;
    import java.util.UUID;
    
    public class Example {
      public static void main(String[] args) {
        ApiClient defaultClient = ApiClient.getDefaultApiClient();
        StatusPagesApi apiInstance = new StatusPagesApi(defaultClient);
    
        // there is a valid "status_page" in the system
        UUID STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID = null;
        try {
          STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID =
              UUID.fromString(System.getenv("STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID"));
        } catch (IllegalArgumentException e) {
          System.err.println("Error parsing UUID: " + e.getMessage());
        }
        UUID STATUS_PAGE_DATA_ID = null;
        try {
          STATUS_PAGE_DATA_ID = UUID.fromString(System.getenv("STATUS_PAGE_DATA_ID"));
        } catch (IllegalArgumentException e) {
          System.err.println("Error parsing UUID: " + e.getMessage());
        }
    
        try {
          StatusPagesComponent result =
              apiInstance.getComponent(
                  STATUS_PAGE_DATA_ID, STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID);
          System.out.println(result);
        } catch (ApiException e) {
          System.err.println("Exception when calling StatusPagesApi#getComponent");
          System.err.println("Status code: " + e.getCode());
          System.err.println("Reason: " + e.getResponseBody());
          System.err.println("Response headers: " + e.getResponseHeaders());
          e.printStackTrace();
        }
      }
    }
    

    Instructions

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

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" java "Example.java"
    // Get component returns "OK" response
    use datadog_api_client::datadog;
    use datadog_api_client::datadogV2::api_status_pages::GetComponentOptionalParams;
    use datadog_api_client::datadogV2::api_status_pages::StatusPagesAPI;
    
    #[tokio::main]
    async fn main() {
        // there is a valid "status_page" in the system
        let status_page_data_attributes_components_0_id = uuid::Uuid::parse_str(
            &std::env::var("STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID").unwrap(),
        )
        .expect("Invalid UUID");
        let status_page_data_id = uuid::Uuid::parse_str(&std::env::var("STATUS_PAGE_DATA_ID").unwrap())
            .expect("Invalid UUID");
        let configuration = datadog::Configuration::new();
        let api = StatusPagesAPI::with_config(configuration);
        let resp = api
            .get_component(
                status_page_data_id.clone(),
                status_page_data_attributes_components_0_id.clone(),
                GetComponentOptionalParams::default(),
            )
            .await;
        if let Ok(value) = resp {
            println!("{:#?}", value);
        } else {
            println!("{:#?}", resp.unwrap_err());
        }
    }
    

    Instructions

    First install the library and its dependencies and then save the example to src/main.rs and run following commands:

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo run
    /**
     * Get component returns "OK" response
     */
    
    import { client, v2 } from "@datadog/datadog-api-client";
    
    const configuration = client.createConfiguration();
    const apiInstance = new v2.StatusPagesApi(configuration);
    
    // there is a valid "status_page" in the system
    const STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID = process.env
      .STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID as string;
    const STATUS_PAGE_DATA_ID = process.env.STATUS_PAGE_DATA_ID as string;
    
    const params: v2.StatusPagesApiGetComponentRequest = {
      pageId: STATUS_PAGE_DATA_ID,
      componentId: STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID,
    };
    
    apiInstance
      .getComponent(params)
      .then((data: v2.StatusPagesComponent) => {
        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.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" tsc "example.ts"

    DELETE https://api.ap1.datadoghq.com/api/v2/statuspages/{page_id}/components/{component_id}https://api.ap2.datadoghq.com/api/v2/statuspages/{page_id}/components/{component_id}https://api.datadoghq.eu/api/v2/statuspages/{page_id}/components/{component_id}https://api.ddog-gov.com/api/v2/statuspages/{page_id}/components/{component_id}https://api.datadoghq.com/api/v2/statuspages/{page_id}/components/{component_id}https://api.us3.datadoghq.com/api/v2/statuspages/{page_id}/components/{component_id}https://api.us5.datadoghq.com/api/v2/statuspages/{page_id}/components/{component_id}

    개요

    Deletes a component by its ID. This endpoint requires the status_pages_settings_write permission.

    인수

    경로 파라미터

    이름

    유형

    설명

    page_id [required]

    string

    The ID of the status page.

    component_id [required]

    string

    The ID of the component.

    응답

    No Content

    Too many requests

    API error response.

    Expand All

    항목

    유형

    설명

    errors [required]

    [string]

    A list of errors.

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

    코드 사례

                      # Path parameters
    export page_id="1234abcd-12ab-34cd-56ef-123456abcdef"
    export component_id="1234abcd-12ab-34cd-56ef-123456abcdef"
    # Curl command
    curl -X DELETE "https://api.ap1.datadoghq.com"https://api.ap2.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/statuspages/${page_id}/components/${component_id}" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}"
    """
    Delete component returns "No Content" response
    """
    
    from os import environ
    from datadog_api_client import ApiClient, Configuration
    from datadog_api_client.v2.api.status_pages_api import StatusPagesApi
    
    # there is a valid "status_page" in the system
    STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID = environ["STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID"]
    STATUS_PAGE_DATA_ID = environ["STATUS_PAGE_DATA_ID"]
    
    configuration = Configuration()
    with ApiClient(configuration) as api_client:
        api_instance = StatusPagesApi(api_client)
        api_instance.delete_component(
            page_id=STATUS_PAGE_DATA_ID,
            component_id=STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID,
        )
    

    Instructions

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

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" python3 "example.py"
    # Delete component returns "No Content" response
    
    require "datadog_api_client"
    api_instance = DatadogAPIClient::V2::StatusPagesAPI.new
    
    # there is a valid "status_page" in the system
    STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID = ENV["STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID"]
    STATUS_PAGE_DATA_ID = ENV["STATUS_PAGE_DATA_ID"]
    api_instance.delete_component(STATUS_PAGE_DATA_ID, STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID)
    

    Instructions

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

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" rb "example.rb"
    // Delete component returns "No Content" response
    
    package main
    
    import (
    	"context"
    	"fmt"
    	"os"
    
    	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
    	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV2"
    	"github.com/google/uuid"
    )
    
    func main() {
    	// there is a valid "status_page" in the system
    	StatusPageDataAttributesComponents0ID := uuid.MustParse(os.Getenv("STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID"))
    	StatusPageDataID := uuid.MustParse(os.Getenv("STATUS_PAGE_DATA_ID"))
    
    	ctx := datadog.NewDefaultContext(context.Background())
    	configuration := datadog.NewConfiguration()
    	apiClient := datadog.NewAPIClient(configuration)
    	api := datadogV2.NewStatusPagesApi(apiClient)
    	r, err := api.DeleteComponent(ctx, StatusPageDataID, StatusPageDataAttributesComponents0ID)
    
    	if err != nil {
    		fmt.Fprintf(os.Stderr, "Error when calling `StatusPagesApi.DeleteComponent`: %v\n", err)
    		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    	}
    }
    

    Instructions

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

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" go run "main.go"
    // Delete component returns "No Content" response
    
    import com.datadog.api.client.ApiClient;
    import com.datadog.api.client.ApiException;
    import com.datadog.api.client.v2.api.StatusPagesApi;
    import java.util.UUID;
    
    public class Example {
      public static void main(String[] args) {
        ApiClient defaultClient = ApiClient.getDefaultApiClient();
        StatusPagesApi apiInstance = new StatusPagesApi(defaultClient);
    
        // there is a valid "status_page" in the system
        UUID STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID = null;
        try {
          STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID =
              UUID.fromString(System.getenv("STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID"));
        } catch (IllegalArgumentException e) {
          System.err.println("Error parsing UUID: " + e.getMessage());
        }
        UUID STATUS_PAGE_DATA_ID = null;
        try {
          STATUS_PAGE_DATA_ID = UUID.fromString(System.getenv("STATUS_PAGE_DATA_ID"));
        } catch (IllegalArgumentException e) {
          System.err.println("Error parsing UUID: " + e.getMessage());
        }
    
        try {
          apiInstance.deleteComponent(STATUS_PAGE_DATA_ID, STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID);
        } catch (ApiException e) {
          System.err.println("Exception when calling StatusPagesApi#deleteComponent");
          System.err.println("Status code: " + e.getCode());
          System.err.println("Reason: " + e.getResponseBody());
          System.err.println("Response headers: " + e.getResponseHeaders());
          e.printStackTrace();
        }
      }
    }
    

    Instructions

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

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" java "Example.java"
    // Delete component returns "No Content" response
    use datadog_api_client::datadog;
    use datadog_api_client::datadogV2::api_status_pages::StatusPagesAPI;
    
    #[tokio::main]
    async fn main() {
        // there is a valid "status_page" in the system
        let status_page_data_attributes_components_0_id = uuid::Uuid::parse_str(
            &std::env::var("STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID").unwrap(),
        )
        .expect("Invalid UUID");
        let status_page_data_id = uuid::Uuid::parse_str(&std::env::var("STATUS_PAGE_DATA_ID").unwrap())
            .expect("Invalid UUID");
        let configuration = datadog::Configuration::new();
        let api = StatusPagesAPI::with_config(configuration);
        let resp = api
            .delete_component(
                status_page_data_id.clone(),
                status_page_data_attributes_components_0_id.clone(),
            )
            .await;
        if let Ok(value) = resp {
            println!("{:#?}", value);
        } else {
            println!("{:#?}", resp.unwrap_err());
        }
    }
    

    Instructions

    First install the library and its dependencies and then save the example to src/main.rs and run following commands:

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo run
    /**
     * Delete component returns "No Content" response
     */
    
    import { client, v2 } from "@datadog/datadog-api-client";
    
    const configuration = client.createConfiguration();
    const apiInstance = new v2.StatusPagesApi(configuration);
    
    // there is a valid "status_page" in the system
    const STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID = process.env
      .STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID as string;
    const STATUS_PAGE_DATA_ID = process.env.STATUS_PAGE_DATA_ID as string;
    
    const params: v2.StatusPagesApiDeleteComponentRequest = {
      pageId: STATUS_PAGE_DATA_ID,
      componentId: STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_ID,
    };
    
    apiInstance
      .deleteComponent(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.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" tsc "example.ts"

    POST https://api.ap1.datadoghq.com/api/v2/statuspages/{page_id}/degradationshttps://api.ap2.datadoghq.com/api/v2/statuspages/{page_id}/degradationshttps://api.datadoghq.eu/api/v2/statuspages/{page_id}/degradationshttps://api.ddog-gov.com/api/v2/statuspages/{page_id}/degradationshttps://api.datadoghq.com/api/v2/statuspages/{page_id}/degradationshttps://api.us3.datadoghq.com/api/v2/statuspages/{page_id}/degradationshttps://api.us5.datadoghq.com/api/v2/statuspages/{page_id}/degradations

    개요

    Creates a new degradation. This endpoint requires the status_pages_incident_write permission.

    인수

    경로 파라미터

    이름

    유형

    설명

    page_id [required]

    string

    The ID of the status page.

    쿼리 문자열

    이름

    유형

    설명

    notify_subscribers

    boolean

    Whether to notify page subscribers of the degradation.

    include

    string

    Comma-separated list of resources to include. Supported values: created_by_user, last_modified_by_user, status_page.

    요청

    Body Data (required)

    Expand All

    항목

    유형

    설명

    data

    object

    The data object for creating a degradation.

    attributes [required]

    object

    The supported attributes for creating a degradation.

    components_affected [required]

    [object]

    The components affected by the degradation.

    id [required]

    uuid

    The ID of the component. Must be a component of type component.

    name

    string

    The name of the component.

    status [required]

    enum

    The status of the component. Allowed enum values: operational,degraded,partial_outage,major_outage,maintenance

    description

    string

    The description of the degradation.

    status [required]

    enum

    The status of the degradation. Allowed enum values: investigating,identified,monitoring,resolved

    title [required]

    string

    The title of the degradation.

    type [required]

    enum

    Degradations resource type. Allowed enum values: degradations

    default: degradations

    {
      "data": {
        "attributes": {
          "components_affected": [
            {
              "id": "4e9d3726-bdd7-0079-613c-e9aaba89eb01",
              "status": "major_outage"
            }
          ],
          "description": "Our API is experiencing elevated latency. We are investigating the issue.",
          "status": "investigating",
          "title": "Elevated API Latency"
        },
        "type": "degradations"
      }
    }

    응답

    Created

    Response object for a single degradation.

    Expand All

    항목

    유형

    설명

    data

    object

    The data object for a degradation.

    attributes

    object

    The attributes of a degradation.

    components_affected

    [object]

    Components affected by the degradation.

    id [required]

    uuid

    The ID of the component.

    name

    string

    The name of the component.

    status [required]

    enum

    The status of the component. Allowed enum values: operational,degraded,partial_outage,major_outage,maintenance

    created_at

    date-time

    Timestamp of when the degradation was created.

    description

    string

    Description of the degradation.

    modified_at

    date-time

    Timestamp of when the degradation was last modified.

    source

    object

    The source of the degradation.

    created_at [required]

    date-time

    Timestamp of when the source was created.

    source_id [required]

    string

    The ID of the source.

    type [required]

    enum

    The type of the source. Allowed enum values: incident

    status

    enum

    The status of the degradation. Allowed enum values: investigating,identified,monitoring,resolved

    title

    string

    Title of the degradation.

    updates

    [object]

    Past updates made to the degradation.

    components_affected

    [object]

    The components affected at the time of the update.

    id [required]

    uuid

    Identifier of the component affected at the time of the update.

    name

    string

    The name of the component affected at the time of the update.

    status [required]

    enum

    The status of the component affected at the time of the update. Allowed enum values: operational,degraded,partial_outage,major_outage,maintenance

    created_at

    date-time

    Timestamp of when the update was created.

    description

    string

    Description of the update.

    id

    uuid

    Identifier of the update.

    modified_at

    date-time

    Timestamp of when the update was last modified.

    started_at

    date-time

    Timestamp of when the update started.

    status

    enum

    The status of the degradation. Allowed enum values: investigating,identified,monitoring,resolved

    id

    uuid

    The ID of the degradation.

    relationships

    object

    The relationships of a degradation.

    created_by_user

    object

    The Datadog user who created the degradation.

    data [required]

    object

    The data object identifying the Datadog user who created the degradation.

    id [required]

    string

    The ID of the Datadog user who created the degradation.

    type [required]

    enum

    Users resource type. Allowed enum values: users

    default: users

    last_modified_by_user

    object

    The Datadog user who last modified the degradation.

    data [required]

    object

    The data object identifying the Datadog user who last modified the degradation.

    id [required]

    string

    The ID of the Datadog user who last modified the degradation.

    type [required]

    enum

    Users resource type. Allowed enum values: users

    default: users

    status_page

    object

    The status page the degradation belongs to.

    data [required]

    object

    The data object identifying the status page the degradation belongs to.

    id [required]

    uuid

    The ID of the status page.

    type [required]

    enum

    Status pages resource type. Allowed enum values: status_pages

    default: status_pages

    type [required]

    enum

    Degradations resource type. Allowed enum values: degradations

    default: degradations

    included

    [ <oneOf>]

    The included related resources of a degradation. Client must explicitly request these resources by name in the include query parameter.

    Option 1

    object

    The included Datadog user resource.

    attributes

    object

    Attributes of the Datadog user.

    email

    string

    The email of the Datadog user.

    handle

    string

    The handle of the Datadog user.

    icon

    string

    The icon of the Datadog user.

    name

    string

    The name of the Datadog user.

    uuid

    string

    The UUID of the Datadog user.

    id

    uuid

    The ID of the Datadog user.

    type [required]

    enum

    Users resource type. Allowed enum values: users

    default: users

    Option 2

    object

    The included status page resource.

    attributes

    object

    The attributes of a status page.

    company_logo

    string

    The base64-encoded image data displayed in the company logo.

    components

    [object]

    Components displayed on the status page.

    components

    [object]

    If the component is of type group, the components within the group.

    id

    uuid

    The ID of the grouped component.

    name

    string

    The name of the grouped component.

    position

    int64

    The zero-indexed position of the grouped component. Relative to the other components in the group.

    status

    enum

    The status of the component. Allowed enum values: operational,degraded,partial_outage,major_outage,maintenance

    type

    enum

    The type of the component. Allowed enum values: component

    id

    uuid

    The ID of the component.

    name

    string

    The name of the component.

    position

    int64

    The zero-indexed position of the component.

    status

    enum

    The status of the component. Allowed enum values: operational,degraded,partial_outage,major_outage,maintenance

    type

    enum

    The type of the component. Allowed enum values: component,group

    created_at

    date-time

    Timestamp of when the status page was created.

    custom_domain

    string

    If configured, the url that the status page is accessible at.

    custom_domain_enabled

    boolean

    Whether the custom domain is configured.

    domain_prefix

    string

    The subdomain of the status page's url taking the form https://{domain_prefix}.statuspage.datadoghq.com. Globally unique across Datadog Status Pages.

    email_header_image

    string

    Base64-encoded image data included in email notifications sent to status page subscribers.

    enabled

    boolean

    Whether the status page is enabled.

    favicon

    string

    Base64-encoded image data displayed in the browser tab.

    modified_at

    date-time

    Timestamp of when the status page was last modified.

    name

    string

    The name of the status page.

    page_url

    string

    The url that the status page is accessible at.

    subscriptions_enabled

    boolean

    Whether users can subscribe to the status page.

    type

    enum

    The type of the status page controlling how the status page is accessed. Allowed enum values: public,internal

    visualization_type

    enum

    The visualization type of the status page. Allowed enum values: bars_and_uptime_percentage,bars_only,component_name_only

    id

    uuid

    The ID of the status page.

    relationships

    object

    The relationships of a status page.

    created_by_user

    object

    The Datadog user who created the status page.

    data [required]

    object

    The data object identifying the Datadog user who created the status page.

    id [required]

    string

    The ID of the Datadog user who created the status page.

    type [required]

    enum

    Users resource type. Allowed enum values: users

    default: users

    last_modified_by_user

    object

    The Datadog user who last modified the status page.

    data [required]

    object

    The data object identifying the Datadog user who last modified the status page.

    id [required]

    string

    The ID of the Datadog user who last modified the status page.

    type [required]

    enum

    Users resource type. Allowed enum values: users

    default: users

    type [required]

    enum

    Status pages resource type. Allowed enum values: status_pages

    default: status_pages

    {
      "data": {
        "attributes": {
          "components_affected": [
            {
              "id": "1234abcd-12ab-34cd-56ef-123456abcdef",
              "name": "string",
              "status": "operational"
            }
          ],
          "created_at": "2019-09-19T10:00:00.000Z",
          "description": "string",
          "modified_at": "2019-09-19T10:00:00.000Z",
          "source": {
            "created_at": "",
            "source_id": "",
            "type": "incident"
          },
          "status": "investigating",
          "title": "string",
          "updates": [
            {
              "components_affected": [
                {
                  "id": "1234abcd-12ab-34cd-56ef-123456abcdef",
                  "name": "string",
                  "status": "operational"
                }
              ],
              "created_at": "2019-09-19T10:00:00.000Z",
              "description": "string",
              "id": "string",
              "modified_at": "2019-09-19T10:00:00.000Z",
              "started_at": "2019-09-19T10:00:00.000Z",
              "status": "investigating"
            }
          ]
        },
        "id": "string",
        "relationships": {
          "created_by_user": {
            "data": {
              "id": "",
              "type": "users"
            }
          },
          "last_modified_by_user": {
            "data": {
              "id": "",
              "type": "users"
            }
          },
          "status_page": {
            "data": {
              "id": "1234abcd-12ab-34cd-56ef-123456abcdef",
              "type": "status_pages"
            }
          }
        },
        "type": "degradations"
      },
      "included": [
        {
          "attributes": {
            "email": "string",
            "handle": "string",
            "icon": "string",
            "name": "string",
            "uuid": "string"
          },
          "id": "string",
          "type": "users"
        }
      ]
    }

    Too many requests

    API error response.

    Expand All

    항목

    유형

    설명

    errors [required]

    [string]

    A list of errors.

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

    코드 사례

                              # Path parameters
    export page_id="1234abcd-12ab-34cd-56ef-123456abcdef"
    # Curl command
    curl -X POST "https://api.ap1.datadoghq.com"https://api.ap2.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/statuspages/${page_id}/degradations" \ -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": { "components_affected": [ { "id": "4e9d3726-bdd7-0079-613c-e9aaba89eb01", "status": "major_outage" } ], "description": "Our API is experiencing elevated latency. We are investigating the issue.", "status": "investigating", "title": "Elevated API Latency" }, "type": "degradations" } } EOF
    // Create degradation returns "Created" response
    
    package main
    
    import (
    	"context"
    	"encoding/json"
    	"fmt"
    	"os"
    
    	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
    	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV2"
    	"github.com/google/uuid"
    )
    
    func main() {
    	// there is a valid "status_page" in the system
    	StatusPageDataAttributesComponents0Components0ID := uuid.MustParse(os.Getenv("STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_COMPONENTS_0_ID"))
    	StatusPageDataID := uuid.MustParse(os.Getenv("STATUS_PAGE_DATA_ID"))
    
    	body := datadogV2.CreateDegradationRequest{
    		Data: &datadogV2.CreateDegradationRequestData{
    			Attributes: datadogV2.CreateDegradationRequestDataAttributes{
    				ComponentsAffected: []datadogV2.CreateDegradationRequestDataAttributesComponentsAffectedItems{
    					{
    						Id:     StatusPageDataAttributesComponents0Components0ID,
    						Status: datadogV2.STATUSPAGESCOMPONENTDATAATTRIBUTESSTATUS_MAJOR_OUTAGE,
    					},
    				},
    				Description: datadog.PtrString("Our API is experiencing elevated latency. We are investigating the issue."),
    				Status:      datadogV2.CREATEDEGRADATIONREQUESTDATAATTRIBUTESSTATUS_INVESTIGATING,
    				Title:       "Elevated API Latency",
    			},
    			Type: datadogV2.PATCHDEGRADATIONREQUESTDATATYPE_DEGRADATIONS,
    		},
    	}
    	ctx := datadog.NewDefaultContext(context.Background())
    	configuration := datadog.NewConfiguration()
    	apiClient := datadog.NewAPIClient(configuration)
    	api := datadogV2.NewStatusPagesApi(apiClient)
    	resp, r, err := api.CreateDegradation(ctx, StatusPageDataID, body, *datadogV2.NewCreateDegradationOptionalParameters())
    
    	if err != nil {
    		fmt.Fprintf(os.Stderr, "Error when calling `StatusPagesApi.CreateDegradation`: %v\n", err)
    		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    	}
    
    	responseContent, _ := json.MarshalIndent(resp, "", "  ")
    	fmt.Fprintf(os.Stdout, "Response from `StatusPagesApi.CreateDegradation`:\n%s\n", responseContent)
    }
    

    Instructions

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

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" go run "main.go"
    // Create degradation returns "Created" response
    
    import com.datadog.api.client.ApiClient;
    import com.datadog.api.client.ApiException;
    import com.datadog.api.client.v2.api.StatusPagesApi;
    import com.datadog.api.client.v2.model.CreateDegradationRequest;
    import com.datadog.api.client.v2.model.CreateDegradationRequestData;
    import com.datadog.api.client.v2.model.CreateDegradationRequestDataAttributes;
    import com.datadog.api.client.v2.model.CreateDegradationRequestDataAttributesComponentsAffectedItems;
    import com.datadog.api.client.v2.model.CreateDegradationRequestDataAttributesStatus;
    import com.datadog.api.client.v2.model.Degradation;
    import com.datadog.api.client.v2.model.PatchDegradationRequestDataType;
    import com.datadog.api.client.v2.model.StatusPagesComponentDataAttributesStatus;
    import java.util.Collections;
    import java.util.UUID;
    
    public class Example {
      public static void main(String[] args) {
        ApiClient defaultClient = ApiClient.getDefaultApiClient();
        StatusPagesApi apiInstance = new StatusPagesApi(defaultClient);
    
        // there is a valid "status_page" in the system
        UUID STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_COMPONENTS_0_ID = null;
        try {
          STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_COMPONENTS_0_ID =
              UUID.fromString(
                  System.getenv("STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_COMPONENTS_0_ID"));
        } catch (IllegalArgumentException e) {
          System.err.println("Error parsing UUID: " + e.getMessage());
        }
        UUID STATUS_PAGE_DATA_ID = null;
        try {
          STATUS_PAGE_DATA_ID = UUID.fromString(System.getenv("STATUS_PAGE_DATA_ID"));
        } catch (IllegalArgumentException e) {
          System.err.println("Error parsing UUID: " + e.getMessage());
        }
    
        CreateDegradationRequest body =
            new CreateDegradationRequest()
                .data(
                    new CreateDegradationRequestData()
                        .attributes(
                            new CreateDegradationRequestDataAttributes()
                                .componentsAffected(
                                    Collections.singletonList(
                                        new CreateDegradationRequestDataAttributesComponentsAffectedItems()
                                            .id(
                                                STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_COMPONENTS_0_ID)
                                            .status(
                                                StatusPagesComponentDataAttributesStatus.MAJOR_OUTAGE)))
                                .description(
                                    "Our API is experiencing elevated latency. We are investigating the"
                                        + " issue.")
                                .status(CreateDegradationRequestDataAttributesStatus.INVESTIGATING)
                                .title("Elevated API Latency"))
                        .type(PatchDegradationRequestDataType.DEGRADATIONS));
    
        try {
          Degradation result = apiInstance.createDegradation(STATUS_PAGE_DATA_ID, body);
          System.out.println(result);
        } catch (ApiException e) {
          System.err.println("Exception when calling StatusPagesApi#createDegradation");
          System.err.println("Status code: " + e.getCode());
          System.err.println("Reason: " + e.getResponseBody());
          System.err.println("Response headers: " + e.getResponseHeaders());
          e.printStackTrace();
        }
      }
    }
    

    Instructions

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

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" java "Example.java"
    """
    Create degradation returns "Created" response
    """
    
    from os import environ
    from datadog_api_client import ApiClient, Configuration
    from datadog_api_client.v2.api.status_pages_api import StatusPagesApi
    from datadog_api_client.v2.model.create_degradation_request import CreateDegradationRequest
    from datadog_api_client.v2.model.create_degradation_request_data import CreateDegradationRequestData
    from datadog_api_client.v2.model.create_degradation_request_data_attributes import (
        CreateDegradationRequestDataAttributes,
    )
    from datadog_api_client.v2.model.create_degradation_request_data_attributes_components_affected_items import (
        CreateDegradationRequestDataAttributesComponentsAffectedItems,
    )
    from datadog_api_client.v2.model.create_degradation_request_data_attributes_status import (
        CreateDegradationRequestDataAttributesStatus,
    )
    from datadog_api_client.v2.model.patch_degradation_request_data_type import PatchDegradationRequestDataType
    from datadog_api_client.v2.model.status_pages_component_data_attributes_status import (
        StatusPagesComponentDataAttributesStatus,
    )
    
    # there is a valid "status_page" in the system
    STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_COMPONENTS_0_ID = environ[
        "STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_COMPONENTS_0_ID"
    ]
    STATUS_PAGE_DATA_ID = environ["STATUS_PAGE_DATA_ID"]
    
    body = CreateDegradationRequest(
        data=CreateDegradationRequestData(
            attributes=CreateDegradationRequestDataAttributes(
                components_affected=[
                    CreateDegradationRequestDataAttributesComponentsAffectedItems(
                        id=STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_COMPONENTS_0_ID,
                        status=StatusPagesComponentDataAttributesStatus.MAJOR_OUTAGE,
                    ),
                ],
                description="Our API is experiencing elevated latency. We are investigating the issue.",
                status=CreateDegradationRequestDataAttributesStatus.INVESTIGATING,
                title="Elevated API Latency",
            ),
            type=PatchDegradationRequestDataType.DEGRADATIONS,
        ),
    )
    
    configuration = Configuration()
    with ApiClient(configuration) as api_client:
        api_instance = StatusPagesApi(api_client)
        response = api_instance.create_degradation(page_id=STATUS_PAGE_DATA_ID, body=body)
    
        print(response)
    

    Instructions

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

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" python3 "example.py"
    # Create degradation returns "Created" response
    
    require "datadog_api_client"
    api_instance = DatadogAPIClient::V2::StatusPagesAPI.new
    
    # there is a valid "status_page" in the system
    STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_COMPONENTS_0_ID = ENV["STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_COMPONENTS_0_ID"]
    STATUS_PAGE_DATA_ID = ENV["STATUS_PAGE_DATA_ID"]
    
    body = DatadogAPIClient::V2::CreateDegradationRequest.new({
      data: DatadogAPIClient::V2::CreateDegradationRequestData.new({
        attributes: DatadogAPIClient::V2::CreateDegradationRequestDataAttributes.new({
          components_affected: [
            DatadogAPIClient::V2::CreateDegradationRequestDataAttributesComponentsAffectedItems.new({
              id: STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_COMPONENTS_0_ID,
              status: DatadogAPIClient::V2::StatusPagesComponentDataAttributesStatus::MAJOR_OUTAGE,
            }),
          ],
          description: "Our API is experiencing elevated latency. We are investigating the issue.",
          status: DatadogAPIClient::V2::CreateDegradationRequestDataAttributesStatus::INVESTIGATING,
          title: "Elevated API Latency",
        }),
        type: DatadogAPIClient::V2::PatchDegradationRequestDataType::DEGRADATIONS,
      }),
    })
    p api_instance.create_degradation(STATUS_PAGE_DATA_ID, body)
    

    Instructions

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

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" rb "example.rb"
    // Create degradation returns "Created" response
    use datadog_api_client::datadog;
    use datadog_api_client::datadogV2::api_status_pages::CreateDegradationOptionalParams;
    use datadog_api_client::datadogV2::api_status_pages::StatusPagesAPI;
    use datadog_api_client::datadogV2::model::CreateDegradationRequest;
    use datadog_api_client::datadogV2::model::CreateDegradationRequestData;
    use datadog_api_client::datadogV2::model::CreateDegradationRequestDataAttributes;
    use datadog_api_client::datadogV2::model::CreateDegradationRequestDataAttributesComponentsAffectedItems;
    use datadog_api_client::datadogV2::model::CreateDegradationRequestDataAttributesStatus;
    use datadog_api_client::datadogV2::model::PatchDegradationRequestDataType;
    use datadog_api_client::datadogV2::model::StatusPagesComponentDataAttributesStatus;
    
    #[tokio::main]
    async fn main() {
        // there is a valid "status_page" in the system
        let status_page_data_attributes_components_0_components_0_id = uuid::Uuid::parse_str(
            &std::env::var("STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_COMPONENTS_0_ID").unwrap(),
        )
        .expect("Invalid UUID");
        let status_page_data_id = uuid::Uuid::parse_str(&std::env::var("STATUS_PAGE_DATA_ID").unwrap())
            .expect("Invalid UUID");
        let body = CreateDegradationRequest::new().data(CreateDegradationRequestData::new(
            CreateDegradationRequestDataAttributes::new(
                vec![
                    CreateDegradationRequestDataAttributesComponentsAffectedItems::new(
                        status_page_data_attributes_components_0_components_0_id.clone(),
                        StatusPagesComponentDataAttributesStatus::MAJOR_OUTAGE,
                    ),
                ],
                CreateDegradationRequestDataAttributesStatus::INVESTIGATING,
                "Elevated API Latency".to_string(),
            )
            .description(
                "Our API is experiencing elevated latency. We are investigating the issue.".to_string(),
            ),
            PatchDegradationRequestDataType::DEGRADATIONS,
        ));
        let configuration = datadog::Configuration::new();
        let api = StatusPagesAPI::with_config(configuration);
        let resp = api
            .create_degradation(
                status_page_data_id.clone(),
                body,
                CreateDegradationOptionalParams::default(),
            )
            .await;
        if let Ok(value) = resp {
            println!("{:#?}", value);
        } else {
            println!("{:#?}", resp.unwrap_err());
        }
    }
    

    Instructions

    First install the library and its dependencies and then save the example to src/main.rs and run following commands:

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo run
    /**
     * Create degradation returns "Created" response
     */
    
    import { client, v2 } from "@datadog/datadog-api-client";
    
    const configuration = client.createConfiguration();
    const apiInstance = new v2.StatusPagesApi(configuration);
    
    // there is a valid "status_page" in the system
    const STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_COMPONENTS_0_ID = process.env
      .STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_COMPONENTS_0_ID as string;
    const STATUS_PAGE_DATA_ID = process.env.STATUS_PAGE_DATA_ID as string;
    
    const params: v2.StatusPagesApiCreateDegradationRequest = {
      body: {
        data: {
          attributes: {
            componentsAffected: [
              {
                id: STATUS_PAGE_DATA_ATTRIBUTES_COMPONENTS_0_COMPONENTS_0_ID,
                status: "major_outage",
              },
            ],
            description:
              "Our API is experiencing elevated latency. We are investigating the issue.",
            status: "investigating",
            title: "Elevated API Latency",
          },
          type: "degradations",
        },
      },
      pageId: STATUS_PAGE_DATA_ID,
    };
    
    apiInstance
      .createDegradation(params)
      .then((data: v2.Degradation) => {
        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.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" tsc "example.ts"

    PATCH https://api.ap1.datadoghq.com/api/v2/statuspages/{page_id}/degradations/{degradation_id}https://api.ap2.datadoghq.com/api/v2/statuspages/{page_id}/degradations/{degradation_id}https://api.datadoghq.eu/api/v2/statuspages/{page_id}/degradations/{degradation_id}https://api.ddog-gov.com/api/v2/statuspages/{page_id}/degradations/{degradation_id}https://api.datadoghq.com/api/v2/statuspages/{page_id}/degradations/{degradation_id}https://api.us3.datadoghq.com/api/v2/statuspages/{page_id}/degradations/{degradation_id}https://api.us5.datadoghq.com/api/v2/statuspages/{page_id}/degradations/{degradation_id}

    개요

    Updates an existing degradation’s attributes. This endpoint requires the status_pages_incident_write permission.

    인수

    경로 파라미터

    이름

    유형

    설명

    page_id [required]

    string

    The ID of the status page.

    degradation_id [required]

    string

    The ID of the degradation.

    쿼리 문자열

    이름

    유형

    설명

    notify_subscribers

    boolean

    Whether to notify page subscribers of the degradation.

    include

    string

    Comma-separated list of resources to include. Supported values: created_by_user, last_modified_by_user, status_page.

    요청

    Body Data (required)

    Expand All

    항목

    유형

    설명

    data

    object

    The data object for updating a degradation.

    attributes [required]

    object

    The supported attributes for updating a degradation.

    components_affected

    [object]

    The components affected by the degradation.

    id [required]

    uuid

    The ID of the component. Must be a component of type component.

    name

    string

    The name of the component.

    status [required]

    enum

    The status of the component. Allowed enum values: operational,degraded,partial_outage,major_outage,maintenance

    description

    string

    The description of the degradation.

    status

    enum

    The status of the degradation. Allowed enum values: investigating,identified,monitoring,resolved

    title

    string

    The title of the degradation.

    id [required]

    uuid

    The ID of the degradation.

    type [required]

    enum

    Degradations resource type. Allowed enum values: degradations

    default: degradations

    {
      "data": {
        "attributes": {
          "title": "Elevated API Latency in US1"
        },
        "id": "81335836-b858-2e64-43d6-5b27ba1e6d8e",
        "type": "degradations"
      }
    }

    응답

    OK

    Response object for a single degradation.

    Expand All

    항목

    유형

    설명

    data

    object

    The data object for a degradation.

    attributes

    object

    The attributes of a degradation.

    components_affected

    [object]

    Components affected by the degradation.

    id [required]

    uuid

    The ID of the component.

    name

    string

    The name of the component.

    status [required]

    enum

    The status of the component. Allowed enum values: operational,degraded,partial_outage,major_outage,maintenance

    created_at

    date-time

    Timestamp of when the degradation was created.

    description

    string

    Description of the degradation.

    modified_at

    date-time

    Timestamp of when the degradation was last modified.

    source

    object

    The source of the degradation.

    created_at [required]

    date-time

    Timestamp of when the source was created.

    source_id [required]

    string

    The ID of the source.

    type [required]

    enum

    The type of the source. Allowed enum values: incident

    status

    enum

    The status of the degradation. Allowed enum values: investigating,identified,monitoring,resolved

    title

    string

    Title of the degradation.

    updates

    [object]

    Past updates made to the degradation.

    components_affected

    [object]

    The components affected at the time of the update.

    id [required]

    uuid

    Identifier of the component affected at the time of the update.

    name

    string

    The name of the component affected at the time of the update.

    status [required]

    enum

    The status of the component affected at the time of the update. Allowed enum values: operational,degraded,partial_outage,major_outage,maintenance

    created_at

    date-time

    Timestamp of when the update was created.

    description

    string

    Description of the update.

    id

    uuid

    Identifier of the update.

    modified_at

    date-time

    Timestamp of when the update was last modified.

    started_at

    date-time

    Timestamp of when the update started.

    status

    enum

    The status of the degradation. Allowed enum values: investigating,identified,monitoring,resolved

    id

    uuid

    The ID of the degradation.

    relationships

    object

    The relationships of a degradation.

    created_by_user

    object

    The Datadog user who created the degradation.

    data [required]

    object

    The data object identifying the Datadog user who created the degradation.

    id [required]

    string

    The ID of the Datadog user who created the degradation.

    type [required]

    enum

    Users resource type. Allowed enum values: users

    default: users

    last_modified_by_user

    object

    The Datadog user who last modified the degradation.

    data [required]

    object

    The data object identifying the Datadog user who last modified the degradation.

    id [required]

    string

    The ID of the Datadog user who last modified the degradation.

    type [required]

    enum

    Users resource type. Allowed enum values: users

    default: users

    status_page

    object

    The status page the degradation belongs to.

    data [required]

    object

    The data object identifying the status page the degradation belongs to.

    id [required]

    uuid

    The ID of the status page.

    type [required]

    enum

    Status pages resource type. Allowed enum values: status_pages

    default: status_pages

    type [required]

    enum

    Degradations resource type. Allowed enum values: degradations

    default: degradations

    included

    [ <oneOf>]

    The included related resources of a degradation. Client must explicitly request these resources by name in the include query parameter.

    Option 1

    object

    The included Datadog user resource.

    attributes

    object

    Attributes of the Datadog user.

    email

    string

    The email of the Datadog user.

    handle

    string

    The handle of the Datadog user.

    icon

    string

    The icon of the Datadog user.

    name

    string

    The name of the Datadog user.

    uuid

    string

    The UUID of the Datadog user.

    id

    uuid

    The ID of the Datadog user.

    type [required]

    enum

    Users resource type. Allowed enum values: users

    default: users

    Option 2

    object

    The included status page resource.

    attributes

    object

    The attributes of a status page.

    company_logo

    string

    The base64-encoded image data displayed in the company logo.

    components

    [object]

    Components displayed on the status page.

    components

    [object]

    If the component is of type group, the components within the group.

    id

    uuid

    The ID of the grouped component.

    name

    string

    The name of the grouped component.

    position

    int64

    The zero-indexed position of the grouped component. Relative to the other components in the group.

    status

    enum

    The status of the component. Allowed enum values: operational,degraded,partial_outage,major_outage,maintenance

    type

    enum

    The type of the component. Allowed enum values: component

    id

    uuid

    The ID of the component.

    name

    string

    The name of the component.

    position

    int64

    The zero-indexed position of the component.

    status

    enum

    The status of the component. Allowed enum values: operational,degraded,partial_outage,major_outage,maintenance

    type

    enum

    The type of the component. Allowed enum values: component,group

    created_at

    date-time

    Timestamp of when the status page was created.

    custom_domain

    string

    If configured, the url that the status page is accessible at.

    custom_domain_enabled

    boolean

    Whether the custom domain is configured.

    domain_prefix

    string

    The subdomain of the status page's url taking the form https://{domain_prefix}.statuspage.datadoghq.com. Globally unique across Datadog Status Pages.

    email_header_image

    string

    Base64-encoded image data included in email notifications sent to status page subscribers.

    enabled

    boolean

    Whether the status page is enabled.

    favicon

    string

    Base64-encoded image data displayed in the browser tab.

    modified_at

    date-time

    Timestamp of when the status page was last modified.

    name

    string

    The name of the status page.

    page_url

    string

    The url that the status page is accessible at.

    subscriptions_enabled

    boolean

    Whether users can subscribe to the status page.

    type

    enum

    The type of the status page controlling how the status page is accessed. Allowed enum values: public,internal

    visualization_type

    enum

    The visualization type of the status page. Allowed enum values: bars_and_uptime_percentage,bars_only,component_name_only

    id

    uuid

    The ID of the status page.

    relationships

    object

    The relationships of a status page.

    created_by_user

    object

    The Datadog user who created the status page.

    data [required]

    object

    The data object identifying the Datadog user who created the status page.

    id [required]

    string

    The ID of the Datadog user who created the status page.

    type [required]

    enum

    Users resource type. Allowed enum values: users

    default: users

    last_modified_by_user

    object

    The Datadog user who last modified the status page.

    data [required]

    object

    The data object identifying the Datadog user who last modified the status page.

    id [required]

    string

    The ID of the Datadog user who last modified the status page.

    type [required]

    enum

    Users resource type. Allowed enum values: users

    default: users

    type [required]

    enum

    Status pages resource type. Allowed enum values: status_pages

    default: status_pages

    {
      "data": {
        "attributes": {
          "components_affected": [
            {
              "id": "1234abcd-12ab-34cd-56ef-123456abcdef",
              "name": "string",
              "status": "operational"
            }
          ],
          "created_at": "2019-09-19T10:00:00.000Z",
          "description": "string",
          "modified_at": "2019-09-19T10:00:00.000Z",
          "source": {
            "created_at": "",
            "source_id": "",
            "type": "incident"
          },
          "status": "investigating",
          "title": "string",
          "updates": [
            {
              "components_affected": [
                {
                  "id": "1234abcd-12ab-34cd-56ef-123456abcdef",
                  "name": "string",
                  "status": "operational"
                }
              ],
              "created_at": "2019-09-19T10:00:00.000Z",
              "description": "string",
              "id": "string",
              "modified_at": "2019-09-19T10:00:00.000Z",
              "started_at": "2019-09-19T10:00:00.000Z",
              "status": "investigating"
            }
          ]
        },
        "id": "string",
        "relationships": {
          "created_by_user": {
            "data": {
              "id": "",
              "type": "users"
            }
          },
          "last_modified_by_user": {
            "data": {
              "id": "",
              "type": "users"
            }
          },
          "status_page": {
            "data": {
              "id": "1234abcd-12ab-34cd-56ef-123456abcdef",
              "type": "status_pages"
            }
          }
        },
        "type": "degradations"
      },
      "included": [
        {
          "attributes": {
            "email": "string",
            "handle": "string",
            "icon": "string",
            "name": "string",
            "uuid": "string"
          },
          "id": "string",
          "type": "users"
        }
      ]
    }

    Too many requests

    API error response.

    Expand All

    항목

    유형

    설명

    errors [required]

    [string]

    A list of errors.

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

    코드 사례

                              # Path parameters
    export page_id="1234abcd-12ab-34cd-56ef-123456abcdef"
    export degradation_id="1234abcd-12ab-34cd-56ef-123456abcdef"
    # Curl command
    curl -X PATCH "https://api.ap1.datadoghq.com"https://api.ap2.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/statuspages/${page_id}/degradations/${degradation_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": { "title": "Elevated API Latency in US1" }, "id": "81335836-b858-2e64-43d6-5b27ba1e6d8e", "type": "degradations" } } EOF
    // Update degradation returns "OK" response
    
    package main
    
    import (
    	"context"
    	"encoding/json"
    	"fmt"
    	"os"
    
    	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
    	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV2"
    	"github.com/google/uuid"
    )
    
    func main() {
    	// there is a valid "status_page" in the system
    	StatusPageDataID := uuid.MustParse(os.Getenv("STATUS_PAGE_DATA_ID"))
    
    	// there is a valid "degradation" in the system
    	DegradationDataID := uuid.MustParse(os.Getenv("DEGRADATION_DATA_ID"))
    
    	body := datadogV2.PatchDegradationRequest{
    		Data: &datadogV2.PatchDegradationRequestData{
    			Attributes: datadogV2.PatchDegradationRequestDataAttributes{
    				Title: datadog.PtrString("Elevated API Latency in US1"),
    			},
    			Id:   DegradationDataID,
    			Type: datadogV2.PATCHDEGRADATIONREQUESTDATATYPE_DEGRADATIONS,
    		},
    	}
    	ctx := datadog.NewDefaultContext(context.Background())
    	configuration := datadog.NewConfiguration()
    	apiClient := datadog.NewAPIClient(configuration)
    	api := datadogV2.NewStatusPagesApi(apiClient)
    	resp, r, err := api.UpdateDegradation(ctx, StatusPageDataID, DegradationDataID, body, *datadogV2.NewUpdateDegradationOptionalParameters())
    
    	if err != nil {
    		fmt.Fprintf(os.Stderr, "Error when calling `StatusPagesApi.UpdateDegradation`: %v\n", err)
    		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    	}
    
    	responseContent, _ := json.MarshalIndent(resp, "", "  ")
    	fmt.Fprintf(os.Stdout, "Response from `StatusPagesApi.UpdateDegradation`:\n%s\n", responseContent)
    }
    

    Instructions

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

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" go run "main.go"
    // Update degradation returns "OK" response
    
    import com.datadog.api.client.ApiClient;
    import com.datadog.api.client.ApiException;
    import com.datadog.api.client.v2.api.StatusPagesApi;
    import com.datadog.api.client.v2.model.Degradation;
    import com.datadog.api.client.v2.model.PatchDegradationRequest;
    import com.datadog.api.client.v2.model.PatchDegradationRequestData;
    import com.datadog.api.client.v2.model.PatchDegradationRequestDataAttributes;
    import com.datadog.api.client.v2.model.PatchDegradationRequestDataType;
    import java.util.UUID;
    
    public class Example {
      public static void main(String[] args) {
        ApiClient defaultClient = ApiClient.getDefaultApiClient();
        StatusPagesApi apiInstance = new StatusPagesApi(defaultClient);
    
        // there is a valid "status_page" in the system
        UUID STATUS_PAGE_DATA_ID = null;
        try {
          STATUS_PAGE_DATA_ID = UUID.fromString(System.getenv("STATUS_PAGE_DATA_ID"));
        } catch (IllegalArgumentException e) {
          System.err.println("Error parsing UUID: " + e.getMessage());
        }
    
        // there is a valid "degradation" in the system
        UUID DEGRADATION_DATA_ID = null;
        try {
          DEGRADATION_DATA_ID = UUID.fromString(System.getenv("DEGRADATION_DATA_ID"));
        } catch (IllegalArgumentException e) {
          System.err.println("Error parsing UUID: " + e.getMessage());
        }
    
        PatchDegradationRequest body =
            new PatchDegradationRequest()
                .data(
                    new PatchDegradationRequestData()
                        .attributes(
                            new PatchDegradationRequestDataAttributes()
                                .title("Elevated API Latency in US1"))
                        .id(DEGRADATION_DATA_ID)
                        .type(PatchDegradationRequestDataType.DEGRADATIONS));
    
        try {
          Degradation result =
              apiInstance.updateDegradation(STATUS_PAGE_DATA_ID, DEGRADATION_DATA_ID, body);
          System.out.println(result);
        } catch (ApiException e) {
          System.err.println("Exception when calling StatusPagesApi#updateDegradation");
          System.err.println("Status code: " + e.getCode());
          System.err.println("Reason: " + e.getResponseBody());
          System.err.println("Response headers: " + e.getResponseHeaders());
          e.printStackTrace();
        }
      }
    }
    

    Instructions

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

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" java "Example.java"
    """
    Update degradation returns "OK" response
    """
    
    from os import environ
    from datadog_api_client import ApiClient, Configuration
    from datadog_api_client.v2.api.status_pages_api import StatusPagesApi
    from datadog_api_client.v2.model.patch_degradation_request import PatchDegradationRequest
    from datadog_api_client.v2.model.patch_degradation_request_data import PatchDegradationRequestData
    from datadog_api_client.v2.model.patch_degradation_request_data_attributes import PatchDegradationRequestDataAttributes
    from datadog_api_client.v2.model.patch_degradation_request_data_type import PatchDegradationRequestDataType
    
    # there is a valid "status_page" in the system
    STATUS_PAGE_DATA_ID = environ["STATUS_PAGE_DATA_ID"]
    
    # there is a valid "degradation" in the system
    DEGRADATION_DATA_ID = environ["DEGRADATION_DATA_ID"]
    
    body = PatchDegradationRequest(
        data=PatchDegradationRequestData(
            attributes=PatchDegradationRequestDataAttributes(
                title="Elevated API Latency in US1",
            ),
            id=DEGRADATION_DATA_ID,
            type=PatchDegradationRequestDataType.DEGRADATIONS,
        ),
    )
    
    configuration = Configuration()
    with ApiClient(configuration) as api_client:
        api_instance = StatusPagesApi(api_client)
        response = api_instance.update_degradation(
            page_id=STATUS_PAGE_DATA_ID, degradation_id=DEGRADATION_DATA_ID, body=body
        )
    
        print(response)
    

    Instructions

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

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" python3 "example.py"
    # Update degradation returns "OK" response
    
    require "datadog_api_client"
    api_instance = DatadogAPIClient::V2::StatusPagesAPI.new
    
    # there is a valid "status_page" in the system
    STATUS_PAGE_DATA_ID = ENV["STATUS_PAGE_DATA_ID"]
    
    # there is a valid "degradation" in the system
    DEGRADATION_DATA_ID = ENV["DEGRADATION_DATA_ID"]
    
    body = DatadogAPIClient::V2::PatchDegradationRequest.new({
      data: DatadogAPIClient::V2::PatchDegradationRequestData.new({
        attributes: DatadogAPIClient::V2::PatchDegradationRequestDataAttributes.new({
          title: "Elevated API Latency in US1",
        }),
        id: DEGRADATION_DATA_ID,
        type: DatadogAPIClient::V2::PatchDegradationRequestDataType::DEGRADATIONS,
      }),
    })
    p api_instance.update_degradation(STATUS_PAGE_DATA_ID, DEGRADATION_DATA_ID, body)
    

    Instructions

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

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" rb "example.rb"
    // Update degradation returns "OK" response
    use datadog_api_client::datadog;
    use datadog_api_client::datadogV2::api_status_pages::StatusPagesAPI;
    use datadog_api_client::datadogV2::api_status_pages::UpdateDegradationOptionalParams;
    use datadog_api_client::datadogV2::model::PatchDegradationRequest;
    use datadog_api_client::datadogV2::model::PatchDegradationRequestData;
    use datadog_api_client::datadogV2::model::PatchDegradationRequestDataAttributes;
    use datadog_api_client::datadogV2::model::PatchDegradationRequestDataType;
    
    #[tokio::main]
    async fn main() {
        // there is a valid "status_page" in the system
        let status_page_data_id = uuid::Uuid::parse_str(&std::env::var("STATUS_PAGE_DATA_ID").unwrap())
            .expect("Invalid UUID");
    
        // there is a valid "degradation" in the system
        let degradation_data_id = uuid::Uuid::parse_str(&std::env::var("DEGRADATION_DATA_ID").unwrap())
            .expect("Invalid UUID");
        let body = PatchDegradationRequest::new().data(PatchDegradationRequestData::new(
            PatchDegradationRequestDataAttributes::new()
                .title("Elevated API Latency in US1".to_string()),
            degradation_data_id.clone(),
            PatchDegradationRequestDataType::DEGRADATIONS,
        ));
        let configuration = datadog::Configuration::new();
        let api = StatusPagesAPI::with_config(configuration);
        let resp = api
            .update_degradation(
                status_page_data_id.clone(),
                degradation_data_id.clone(),
                body,
                UpdateDegradationOptionalParams::default(),
            )
            .await;
        if let Ok(value) = resp {
            println!("{:#?}", value);
        } else {
            println!("{:#?}", resp.unwrap_err());
        }
    }
    

    Instructions

    First install the library and its dependencies and then save the example to src/main.rs and run following commands:

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo run
    /**
     * Update degradation returns "OK" response
     */
    
    import { client, v2 } from "@datadog/datadog-api-client";
    
    const configuration = client.createConfiguration();
    const apiInstance = new v2.StatusPagesApi(configuration);
    
    // there is a valid "status_page" in the system
    const STATUS_PAGE_DATA_ID = process.env.STATUS_PAGE_DATA_ID as string;
    
    // there is a valid "degradation" in the system
    const DEGRADATION_DATA_ID = process.env.DEGRADATION_DATA_ID as string;
    
    const params: v2.StatusPagesApiUpdateDegradationRequest = {
      body: {
        data: {
          attributes: {
            title: "Elevated API Latency in US1",
          },
          id: DEGRADATION_DATA_ID,
          type: "degradations",
        },
      },
      pageId: STATUS_PAGE_DATA_ID,
      degradationId: DEGRADATION_DATA_ID,
    };
    
    apiInstance
      .updateDegradation(params)
      .then((data: v2.Degradation) => {
        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.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" tsc "example.ts"

    GET https://api.ap1.datadoghq.com/api/v2/statuspages/degradationshttps://api.ap2.datadoghq.com/api/v2/statuspages/degradationshttps://api.datadoghq.eu/api/v2/statuspages/degradationshttps://api.ddog-gov.com/api/v2/statuspages/degradationshttps://api.datadoghq.com/api/v2/statuspages/degradationshttps://api.us3.datadoghq.com/api/v2/statuspages/degradationshttps://api.us5.datadoghq.com/api/v2/statuspages/degradations

    개요

    Lists all degradations for the organization. Optionally filter by status and page. This endpoint requires the status_pages_settings_read permission.

    인수

    쿼리 문자열

    이름

    유형

    설명

    filter[page_id]

    string

    Optional page id filter.

    page[offset]

    integer

    Offset to use as the start of the page.

    page[limit]

    integer

    The number of degradations to return per page.

    include

    string

    Comma-separated list of resources to include. Supported values: created_by_user, last_modified_by_user, status_page.

    filter[status]

    string

    Optional degradation status filter. Supported values: investigating, identified, monitoring, resolved.

    sort

    string

    Sort order. Prefix with ‘-’ for descending. Supported values: created_at, -created_at, modified_at, -modified_at.

    응답

    OK

    Response object for a list of degradations.

    Expand All

    항목

    유형

    설명

    data [required]

    [object]

    A list of degradation data objects.

    attributes

    object

    The attributes of a degradation.

    components_affected

    [object]

    Components affected by the degradation.

    id [required]

    uuid

    The ID of the component.

    name

    string

    The name of the component.

    status [required]

    enum

    The status of the component. Allowed enum values: operational,degraded,partial_outage,major_outage,maintenance

    created_at

    date-time

    Timestamp of when the degradation was created.

    description

    string

    Description of the degradation.

    modified_at

    date-time

    Timestamp of when the degradation was last modified.

    source

    object

    The source of the degradation.

    created_at [required]

    date-time

    Timestamp of when the source was created.

    source_id [required]

    string

    The ID of the source.

    type [required]

    enum

    The type of the source. Allowed enum values: incident

    status

    enum

    The status of the degradation. Allowed enum values: investigating,identified,monitoring,resolved

    title

    string

    Title of the degradation.

    updates

    [object]

    Past updates made to the degradation.

    components_affected

    [object]

    The components affected at the time of the update.

    id [required]

    uuid

    Identifier of the component affected at the time of the update.

    name

    string

    The name of the component affected at the time of the update.

    status [required]

    enum

    The status of the component affected at the time of the update. Allowed enum values: operational,degraded,partial_outage,major_outage,maintenance

    created_at

    date-time

    Timestamp of when the update was created.

    description

    string

    Description of the update.

    id

    uuid

    Identifier of the update.

    modified_at

    date-time

    Timestamp of when the update was last modified.

    started_at

    date-time

    Timestamp of when the update started.

    status

    enum

    The status of the degradation. Allowed enum values: investigating,identified,monitoring,resolved

    id

    uuid

    The ID of the degradation.

    relationships

    object

    The relationships of a degradation.

    created_by_user

    object

    The Datadog user who created the degradation.

    data [required]

    object

    The data object identifying the Datadog user who created the degradation.

    id [required]

    string

    The ID of the Datadog user who created the degradation.

    type [required]

    enum

    Users resource type. Allowed enum values: users

    default: users

    last_modified_by_user

    object

    The Datadog user who last modified the degradation.

    data [required]

    object

    The data object identifying the Datadog user who last modified the degradation.

    id [required]

    string

    The ID of the Datadog user who last modified the degradation.

    type [required]

    enum

    Users resource type. Allowed enum values: users

    default: users

    status_page

    object

    The status page the degradation belongs to.

    data [required]

    object

    The data object identifying the status page the degradation belongs to.

    id [required]

    uuid

    The ID of the status page.

    type [required]

    enum

    Status pages resource type. Allowed enum values: status_pages

    default: status_pages

    type [required]

    enum

    Degradations resource type. Allowed enum values: degradations

    default: degradations

    included

    [ <oneOf>]

    The included related resources of a degradation. Client must explicitly request these resources by name in the include query parameter.

    Option 1

    object

    The included Datadog user resource.

    attributes

    object

    Attributes of the Datadog user.

    email

    string

    The email of the Datadog user.

    handle

    string

    The handle of the Datadog user.

    icon

    string

    The icon of the Datadog user.

    name

    string

    The name of the Datadog user.

    uuid

    string

    The UUID of the Datadog user.

    id

    uuid

    The ID of the Datadog user.

    type [required]

    enum

    Users resource type. Allowed enum values: users

    default: users

    Option 2

    object

    The included status page resource.

    attributes

    object

    The attributes of a status page.

    company_logo

    string

    The base64-encoded image data displayed in the company logo.

    components

    [object]

    Components displayed on the status page.

    components

    [object]

    If the component is of type group, the components within the group.

    id

    uuid

    The ID of the grouped component.

    name

    string

    The name of the grouped component.

    position

    int64

    The zero-indexed position of the grouped component. Relative to the other components in the group.

    status

    enum

    The status of the component. Allowed enum values: operational,degraded,partial_outage,major_outage,maintenance

    type

    enum

    The type of the component. Allowed enum values: component

    id

    uuid

    The ID of the component.

    name

    string

    The name of the component.

    position

    int64

    The zero-indexed position of the component.

    status

    enum

    The status of the component. Allowed enum values: operational,degraded,partial_outage,major_outage,maintenance

    type

    enum

    The type of the component. Allowed enum values: component,group

    created_at

    date-time

    Timestamp of when the status page was created.

    custom_domain

    string

    If configured, the url that the status page is accessible at.

    custom_domain_enabled

    boolean

    Whether the custom domain is configured.

    domain_prefix

    string

    The subdomain of the status page's url taking the form https://{domain_prefix}.statuspage.datadoghq.com. Globally unique across Datadog Status Pages.

    email_header_image

    string

    Base64-encoded image data included in email notifications sent to status page subscribers.

    enabled

    boolean

    Whether the status page is enabled.

    favicon

    string

    Base64-encoded image data displayed in the browser tab.

    modified_at

    date-time

    Timestamp of when the status page was last modified.

    name

    string

    The name of the status page.

    page_url

    string

    The url that the status page is accessible at.

    subscriptions_enabled

    boolean

    Whether users can subscribe to the status page.

    type

    enum

    The type of the status page controlling how the status page is accessed. Allowed enum values: public,internal

    visualization_type

    enum

    The visualization type of the status page. Allowed enum values: bars_and_uptime_percentage,bars_only,component_name_only

    id

    uuid

    The ID of the status page.

    relationships

    object

    The relationships of a status page.

    created_by_user

    object

    The Datadog user who created the status page.

    data [required]

    object

    The data object identifying the Datadog user who created the status page.

    id [required]

    string

    The ID of the Datadog user who created the status page.

    type [required]

    enum

    Users resource type. Allowed enum values: users

    default: users

    last_modified_by_user

    object

    The Datadog user who last modified the status page.

    data [required]

    object

    The data object identifying the Datadog user who last modified the status page.

    id [required]

    string

    The ID of the Datadog user who last modified the status page.

    type [required]

    enum

    Users resource type. Allowed enum values: users

    default: users

    type [required]

    enum

    Status pages resource type. Allowed enum values: status_pages

    default: status_pages

    meta

    object

    Response metadata.

    page

    object

    Offset-based pagination schema.

    first_offset

    int64

    Integer representing the offset to fetch the first page of results.

    last_offset

    int64

    Integer representing the offset to fetch the last page of results.

    limit

    int64

    Integer representing the number of elements to be returned in the results.

    next_offset

    int64

    Integer representing the index of the first element in the next page of results. Equal to page size added to the current offset.

    offset

    int64

    Integer representing the index of the first element in the results.

    prev_offset

    int64

    Integer representing the index of the first element in the previous page of results.

    total

    int64

    Integer representing the total number of elements available.

    type

    enum

    The pagination type used for offset-based pagination. Allowed enum values: offset_limit

    default: offset_limit

    {
      "data": [
        {
          "attributes": {
            "components_affected": [
              {
                "id": "1234abcd-12ab-34cd-56ef-123456abcdef",
                "name": "string",
                "status": "operational"
              }
            ],
            "created_at": "2019-09-19T10:00:00.000Z",
            "description": "string",
            "modified_at": "2019-09-19T10:00:00.000Z",
            "source": {
              "created_at": "",
              "source_id": "",
              "type": "incident"
            },
            "status": "investigating",
            "title": "string",
            "updates": [
              {
                "components_affected": [
                  {
                    "id": "1234abcd-12ab-34cd-56ef-123456abcdef",
                    "name": "string",
                    "status": "operational"
                  }
                ],
                "created_at": "2019-09-19T10:00:00.000Z",
                "description": "string",
                "id": "string",
                "modified_at": "2019-09-19T10:00:00.000Z",
                "started_at": "2019-09-19T10:00:00.000Z",
                "status": "investigating"
              }
            ]
          },
          "id": "string",
          "relationships": {
            "created_by_user": {
              "data": {
                "id": "",
                "type": "users"
              }
            },
            "last_modified_by_user": {
              "data": {
                "id": "",
                "type": "users"
              }
            },
            "status_page": {
              "data": {
                "id": "1234abcd-12ab-34cd-56ef-123456abcdef",
                "type": "status_pages"
              }
            }
          },
          "type": "degradations"
        }
      ],
      "included": [
        {
          "attributes": {
            "email": "string",
            "handle": "string",
            "icon": "string",
            "name": "string",
            "uuid": "string"
          },
          "id": "string",
          "type": "users"
        }
      ],
      "meta": {
        "page": {
          "first_offset": 0,
          "last_offset": 900,
          "limit": 100,
          "next_offset": 100,
          "offset": 0,
          "prev_offset": 100,
          "total": 1000,
          "type": "offset_limit"
        }
      }
    }

    Too many requests

    API error response.

    Expand All

    항목

    유형

    설명

    errors [required]

    [string]

    A list of errors.

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

    코드 사례

                      # Curl command
    curl -X GET "https://api.ap1.datadoghq.com"https://api.ap2.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/statuspages/degradations" \ -H "Accept: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}"
    """
    List degradations returns "OK" response
    """
    
    from datadog_api_client import ApiClient, Configuration
    from datadog_api_client.v2.api.status_pages_api import StatusPagesApi
    
    configuration = Configuration()
    with ApiClient(configuration) as api_client:
        api_instance = StatusPagesApi(api_client)
        response = api_instance.list_degradations()
    
        print(response)
    

    Instructions

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

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" python3 "example.py"
    # List degradations returns "OK" response
    
    require "datadog_api_client"
    api_instance = DatadogAPIClient::V2::StatusPagesAPI.new
    p api_instance.list_degradations()
    

    Instructions

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

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" rb "example.rb"
    // List degradations returns "OK" response
    
    package main
    
    import (
    	"context"
    	"encoding/json"
    	"fmt"
    	"os"
    
    	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
    	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV2"
    )
    
    func main() {
    	ctx := datadog.NewDefaultContext(context.Background())
    	configuration := datadog.NewConfiguration()
    	apiClient := datadog.NewAPIClient(configuration)
    	api := datadogV2.NewStatusPagesApi(apiClient)
    	resp, r, err := api.ListDegradations(ctx, *datadogV2.NewListDegradationsOptionalParameters())
    
    	if err != nil {
    		fmt.Fprintf(os.Stderr, "Error when calling `StatusPagesApi.ListDegradations`: %v\n", err)
    		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    	}
    
    	responseContent, _ := json.MarshalIndent(resp, "", "  ")
    	fmt.Fprintf(os.Stdout, "Response from `StatusPagesApi.ListDegradations`:\n%s\n", responseContent)
    }
    

    Instructions

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

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" go run "main.go"
    // List degradations returns "OK" response
    
    import com.datadog.api.client.ApiClient;
    import com.datadog.api.client.ApiException;
    import com.datadog.api.client.v2.api.StatusPagesApi;
    import com.datadog.api.client.v2.model.DegradationArray;
    
    public class Example {
      public static void main(String[] args) {
        ApiClient defaultClient = ApiClient.getDefaultApiClient();
        StatusPagesApi apiInstance = new StatusPagesApi(defaultClient);
    
        try {
          DegradationArray result = apiInstance.listDegradations();
          System.out.println(result);
        } catch (ApiException e) {
          System.err.println("Exception when calling StatusPagesApi#listDegradations");
          System.err.println("Status code: " + e.getCode());
          System.err.println("Reason: " + e.getResponseBody());
          System.err.println("Response headers: " + e.getResponseHeaders());
          e.printStackTrace();
        }
      }
    }
    

    Instructions

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

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" java "Example.java"
    // List degradations returns "OK" response
    use datadog_api_client::datadog;
    use datadog_api_client::datadogV2::api_status_pages::ListDegradationsOptionalParams;
    use datadog_api_client::datadogV2::api_status_pages::StatusPagesAPI;
    
    #[tokio::main]
    async fn main() {
        let configuration = datadog::Configuration::new();
        let api = StatusPagesAPI::with_config(configuration);
        let resp = api
            .list_degradations(ListDegradationsOptionalParams::default())
            .await;
        if let Ok(value) = resp {
            println!("{:#?}", value);
        } else {
            println!("{:#?}", resp.unwrap_err());
        }
    }
    

    Instructions

    First install the library and its dependencies and then save the example to src/main.rs and run following commands:

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo run
    /**
     * List degradations returns "OK" response
     */
    
    import { client, v2 } from "@datadog/datadog-api-client";
    
    const configuration = client.createConfiguration();
    const apiInstance = new v2.StatusPagesApi(configuration);
    
    apiInstance
      .listDegradations()
      .then((data: v2.DegradationArray) => {
        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.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" tsc "example.ts"

    GET https://api.ap1.datadoghq.com/api/v2/statuspages/{page_id}/degradations/{degradation_id}https://api.ap2.datadoghq.com/api/v2/statuspages/{page_id}/degradations/{degradation_id}https://api.datadoghq.eu/api/v2/statuspages/{page_id}/degradations/{degradation_id}https://api.ddog-gov.com/api/v2/statuspages/{page_id}/degradations/{degradation_id}https://api.datadoghq.com/api/v2/statuspages/{page_id}/degradations/{degradation_id}https://api.us3.datadoghq.com/api/v2/statuspages/{page_id}/degradations/{degradation_id}https://api.us5.datadoghq.com/api/v2/statuspages/{page_id}/degradations/{degradation_id}

    개요

    Retrieves a specific degradation by its ID. This endpoint requires the status_pages_settings_read permission.

    인수

    경로 파라미터

    이름

    유형

    설명

    page_id [required]

    string

    The ID of the status page.

    degradation_id [required]

    string

    The ID of the degradation.

    쿼리 문자열

    이름

    유형

    설명

    include

    string

    Comma-separated list of resources to include. Supported values: created_by_user, last_modified_by_user, status_page.

    응답

    OK

    Response object for a single degradation.

    Expand All

    항목

    유형

    설명

    data

    object

    The data object for a degradation.

    attributes

    object

    The attributes of a degradation.

    components_affected

    [object]

    Components affected by the degradation.

    id [required]

    uuid

    The ID of the component.

    name

    string

    The name of the component.

    status [required]

    enum

    The status of the component. Allowed enum values: operational,degraded,partial_outage,major_outage,maintenance

    created_at

    date-time

    Timestamp of when the degradation was created.

    description

    string

    Description of the degradation.

    modified_at

    date-time

    Timestamp of when the degradation was last modified.

    source

    object

    The source of the degradation.

    created_at [required]

    date-time

    Timestamp of when the source was created.

    source_id [required]

    string

    The ID of the source.

    type [required]

    enum

    The type of the source. Allowed enum values: incident

    status

    enum

    The status of the degradation. Allowed enum values: investigating,identified,monitoring,resolved

    title

    string

    Title of the degradation.

    updates

    [object]

    Past updates made to the degradation.

    components_affected

    [object]

    The components affected at the time of the update.

    id [required]

    uuid

    Identifier of the component affected at the time of the update.

    name

    string

    The name of the component affected at the time of the update.

    status [required]

    enum

    The status of the component affected at the time of the update. Allowed enum values: operational,degraded,partial_outage,major_outage,maintenance

    created_at

    date-time

    Timestamp of when the update was created.

    description

    string

    Description of the update.

    id

    uuid

    Identifier of the update.

    modified_at

    date-time

    Timestamp of when the update was last modified.

    started_at

    date-time

    Timestamp of when the update started.

    status

    enum

    The status of the degradation. Allowed enum values: investigating,identified,monitoring,resolved

    id

    uuid

    The ID of the degradation.

    relationships

    object

    The relationships of a degradation.

    created_by_user

    object

    The Datadog user who created the degradation.

    data [required]

    object

    The data object identifying the Datadog user who created the degradation.

    id [required]

    string

    The ID of the Datadog user who created the degradation.

    type [required]

    enum

    Users resource type. Allowed enum values: users

    default: users

    last_modified_by_user

    object

    The Datadog user who last modified the degradation.

    data [required]

    object

    The data object identifying the Datadog user who last modified the degradation.

    id [required]

    string

    The ID of the Datadog user who last modified the degradation.

    type [required]

    enum

    Users resource type. Allowed enum values: users

    default: users

    status_page

    object

    The status page the degradation belongs to.

    data [required]

    object

    The data object identifying the status page the degradation belongs to.

    id [required]

    uuid

    The ID of the status page.

    type [required]

    enum

    Status pages resource type. Allowed enum values: status_pages

    default: status_pages

    type [required]

    enum

    Degradations resource type. Allowed enum values: degradations

    default: degradations

    included

    [ <oneOf>]

    The included related resources of a degradation. Client must explicitly request these resources by name in the include query parameter.

    Option 1

    object

    The included Datadog user resource.

    attributes

    object

    Attributes of the Datadog user.

    email

    string

    The email of the Datadog user.

    handle

    string

    The handle of the Datadog user.

    icon

    string

    The icon of the Datadog user.

    name

    string

    The name of the Datadog user.

    uuid

    string

    The UUID of the Datadog user.

    id

    uuid

    The ID of the Datadog user.

    type [required]

    enum

    Users resource type. Allowed enum values: users

    default: users

    Option 2

    object

    The included status page resource.

    attributes

    object

    The attributes of a status page.

    company_logo

    string

    The base64-encoded image data displayed in the company logo.

    components

    [object]

    Components displayed on the status page.

    components

    [object]

    If the component is of type group, the components within the group.

    id

    uuid

    The ID of the grouped component.

    name

    string

    The name of the grouped component.

    position

    int64

    The zero-indexed position of the grouped component. Relative to the other components in the group.

    status

    enum

    The status of the component. Allowed enum values: operational,degraded,partial_outage,major_outage,maintenance

    type

    enum

    The type of the component. Allowed enum values: component

    id

    uuid

    The ID of the component.

    name

    string

    The name of the component.

    position

    int64

    The zero-indexed position of the component.

    status

    enum

    The status of the component. Allowed enum values: operational,degraded,partial_outage,major_outage,maintenance

    type

    enum

    The type of the component. Allowed enum values: component,group

    created_at

    date-time

    Timestamp of when the status page was created.

    custom_domain

    string

    If configured, the url that the status page is accessible at.

    custom_domain_enabled

    boolean

    Whether the custom domain is configured.

    domain_prefix

    string

    The subdomain of the status page's url taking the form https://{domain_prefix}.statuspage.datadoghq.com. Globally unique across Datadog Status Pages.

    email_header_image

    string

    Base64-encoded image data included in email notifications sent to status page subscribers.

    enabled

    boolean

    Whether the status page is enabled.

    favicon

    string

    Base64-encoded image data displayed in the browser tab.

    modified_at

    date-time

    Timestamp of when the status page was last modified.

    name

    string

    The name of the status page.

    page_url

    string

    The url that the status page is accessible at.

    subscriptions_enabled

    boolean

    Whether users can subscribe to the status page.

    type

    enum

    The type of the status page controlling how the status page is accessed. Allowed enum values: public,internal

    visualization_type

    enum

    The visualization type of the status page. Allowed enum values: bars_and_uptime_percentage,bars_only,component_name_only

    id

    uuid

    The ID of the status page.

    relationships

    object

    The relationships of a status page.

    created_by_user

    object

    The Datadog user who created the status page.

    data [required]

    object

    The data object identifying the Datadog user who created the status page.

    id [required]

    string

    The ID of the Datadog user who created the status page.

    type [required]

    enum

    Users resource type. Allowed enum values: users

    default: users

    last_modified_by_user

    object

    The Datadog user who last modified the status page.

    data [required]

    object

    The data object identifying the Datadog user who last modified the status page.

    id [required]

    string

    The ID of the Datadog user who last modified the status page.

    type [required]

    enum

    Users resource type. Allowed enum values: users

    default: users

    type [required]

    enum

    Status pages resource type. Allowed enum values: status_pages

    default: status_pages

    {
      "data": {
        "attributes": {
          "components_affected": [
            {
              "id": "1234abcd-12ab-34cd-56ef-123456abcdef",
              "name": "string",
              "status": "operational"
            }
          ],
          "created_at": "2019-09-19T10:00:00.000Z",
          "description": "string",
          "modified_at": "2019-09-19T10:00:00.000Z",
          "source": {
            "created_at": "",
            "source_id": "",
            "type": "incident"
          },
          "status": "investigating",
          "title": "string",
          "updates": [
            {
              "components_affected": [
                {
                  "id": "1234abcd-12ab-34cd-56ef-123456abcdef",
                  "name": "string",
                  "status": "operational"
                }
              ],
              "created_at": "2019-09-19T10:00:00.000Z",
              "description": "string",
              "id": "string",
              "modified_at": "2019-09-19T10:00:00.000Z",
              "started_at": "2019-09-19T10:00:00.000Z",
              "status": "investigating"
            }
          ]
        },
        "id": "string",
        "relationships": {
          "created_by_user": {
            "data": {
              "id": "",
              "type": "users"
            }
          },
          "last_modified_by_user": {
            "data": {
              "id": "",
              "type": "users"
            }
          },
          "status_page": {
            "data": {
              "id": "1234abcd-12ab-34cd-56ef-123456abcdef",
              "type": "status_pages"
            }
          }
        },
        "type": "degradations"
      },
      "included": [
        {
          "attributes": {
            "email": "string",
            "handle": "string",
            "icon": "string",
            "name": "string",
            "uuid": "string"
          },
          "id": "string",
          "type": "users"
        }
      ]
    }

    Too many requests

    API error response.

    Expand All

    항목

    유형

    설명

    errors [required]

    [string]

    A list of errors.

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

    코드 사례

                      # Path parameters
    export page_id="1234abcd-12ab-34cd-56ef-123456abcdef"
    export degradation_id="1234abcd-12ab-34cd-56ef-123456abcdef"
    # Curl command
    curl -X GET "https://api.ap1.datadoghq.com"https://api.ap2.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/statuspages/${page_id}/degradations/${degradation_id}" \ -H "Accept: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}"
    """
    Get degradation returns "OK" response
    """
    
    from os import environ
    from datadog_api_client import ApiClient, Configuration
    from datadog_api_client.v2.api.status_pages_api import StatusPagesApi
    
    # there is a valid "status_page" in the system
    STATUS_PAGE_DATA_ID = environ["STATUS_PAGE_DATA_ID"]
    
    # there is a valid "degradation" in the system
    DEGRADATION_DATA_ID = environ["DEGRADATION_DATA_ID"]
    
    configuration = Configuration()
    with ApiClient(configuration) as api_client:
        api_instance = StatusPagesApi(api_client)
        response = api_instance.get_degradation(
            page_id=STATUS_PAGE_DATA_ID,
            degradation_id=DEGRADATION_DATA_ID,
        )
    
        print(response)
    

    Instructions

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

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" python3 "example.py"
    # Get degradation returns "OK" response
    
    require "datadog_api_client"
    api_instance = DatadogAPIClient::V2::StatusPagesAPI.new
    
    # there is a valid "status_page" in the system
    STATUS_PAGE_DATA_ID = ENV["STATUS_PAGE_DATA_ID"]
    
    # there is a valid "degradation" in the system
    DEGRADATION_DATA_ID = ENV["DEGRADATION_DATA_ID"]
    p api_instance.get_degradation(STATUS_PAGE_DATA_ID, DEGRADATION_DATA_ID)
    

    Instructions

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

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" rb "example.rb"
    // Get degradation returns "OK" response
    
    package main
    
    import (
    	"context"
    	"encoding/json"
    	"fmt"
    	"os"
    
    	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
    	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV2"
    	"github.com/google/uuid"
    )
    
    func main() {
    	// there is a valid "status_page" in the system
    	StatusPageDataID := uuid.MustParse(os.Getenv("STATUS_PAGE_DATA_ID"))
    
    	// there is a valid "degradation" in the system
    	DegradationDataID := uuid.MustParse(os.Getenv("DEGRADATION_DATA_ID"))
    
    	ctx := datadog.NewDefaultContext(context.Background())
    	configuration := datadog.NewConfiguration()
    	apiClient := datadog.NewAPIClient(configuration)
    	api := datadogV2.NewStatusPagesApi(apiClient)
    	resp, r, err := api.GetDegradation(ctx, StatusPageDataID, DegradationDataID, *datadogV2.NewGetDegradationOptionalParameters())
    
    	if err != nil {
    		fmt.Fprintf(os.Stderr, "Error when calling `StatusPagesApi.GetDegradation`: %v\n", err)
    		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    	}
    
    	responseContent, _ := json.MarshalIndent(resp, "", "  ")
    	fmt.Fprintf(os.Stdout, "Response from `StatusPagesApi.GetDegradation`:\n%s\n", responseContent)
    }
    

    Instructions

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

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" go run "main.go"
    // Get degradation returns "OK" response
    
    import com.datadog.api.client.ApiClient;
    import com.datadog.api.client.ApiException;
    import com.datadog.api.client.v2.api.StatusPagesApi;
    import com.datadog.api.client.v2.model.Degradation;
    import java.util.UUID;
    
    public class Example {
      public static void main(String[] args) {
        ApiClient defaultClient = ApiClient.getDefaultApiClient();
        StatusPagesApi apiInstance = new StatusPagesApi(defaultClient);
    
        // there is a valid "status_page" in the system
        UUID STATUS_PAGE_DATA_ID = null;
        try {
          STATUS_PAGE_DATA_ID = UUID.fromString(System.getenv("STATUS_PAGE_DATA_ID"));
        } catch (IllegalArgumentException e) {
          System.err.println("Error parsing UUID: " + e.getMessage());
        }
    
        // there is a valid "degradation" in the system
        UUID DEGRADATION_DATA_ID = null;
        try {
          DEGRADATION_DATA_ID = UUID.fromString(System.getenv("DEGRADATION_DATA_ID"));
        } catch (IllegalArgumentException e) {
          System.err.println("Error parsing UUID: " + e.getMessage());
        }
    
        try {
          Degradation result = apiInstance.getDegradation(STATUS_PAGE_DATA_ID, DEGRADATION_DATA_ID);
          System.out.println(result);
        } catch (ApiException e) {
          System.err.println("Exception when calling StatusPagesApi#getDegradation");
          System.err.println("Status code: " + e.getCode());
          System.err.println("Reason: " + e.getResponseBody());
          System.err.println("Response headers: " + e.getResponseHeaders());
          e.printStackTrace();
        }
      }
    }
    

    Instructions

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

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" java "Example.java"
    // Get degradation returns "OK" response
    use datadog_api_client::datadog;
    use datadog_api_client::datadogV2::api_status_pages::GetDegradationOptionalParams;
    use datadog_api_client::datadogV2::api_status_pages::StatusPagesAPI;
    
    #[tokio::main]
    async fn main() {
        // there is a valid "status_page" in the system
        let status_page_data_id = uuid::Uuid::parse_str(&std::env::var("STATUS_PAGE_DATA_ID").unwrap())
            .expect("Invalid UUID");
    
        // there is a valid "degradation" in the system
        let degradation_data_id = uuid::Uuid::parse_str(&std::env::var("DEGRADATION_DATA_ID").unwrap())
            .expect("Invalid UUID");
        let configuration = datadog::Configuration::new();
        let api = StatusPagesAPI::with_config(configuration);
        let resp = api
            .get_degradation(
                status_page_data_id.clone(),
                degradation_data_id.clone(),
                GetDegradationOptionalParams::default(),
            )
            .await;
        if let Ok(value) = resp {
            println!("{:#?}", value);
        } else {
            println!("{:#?}", resp.unwrap_err());
        }
    }
    

    Instructions

    First install the library and its dependencies and then save the example to src/main.rs and run following commands:

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo run
    /**
     * Get degradation returns "OK" response
     */
    
    import { client, v2 } from "@datadog/datadog-api-client";
    
    const configuration = client.createConfiguration();
    const apiInstance = new v2.StatusPagesApi(configuration);
    
    // there is a valid "status_page" in the system
    const STATUS_PAGE_DATA_ID = process.env.STATUS_PAGE_DATA_ID as string;
    
    // there is a valid "degradation" in the system
    const DEGRADATION_DATA_ID = process.env.DEGRADATION_DATA_ID as string;
    
    const params: v2.StatusPagesApiGetDegradationRequest = {
      pageId: STATUS_PAGE_DATA_ID,
      degradationId: DEGRADATION_DATA_ID,
    };
    
    apiInstance
      .getDegradation(params)
      .then((data: v2.Degradation) => {
        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.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" tsc "example.ts"

    DELETE https://api.ap1.datadoghq.com/api/v2/statuspages/{page_id}/degradations/{degradation_id}https://api.ap2.datadoghq.com/api/v2/statuspages/{page_id}/degradations/{degradation_id}https://api.datadoghq.eu/api/v2/statuspages/{page_id}/degradations/{degradation_id}https://api.ddog-gov.com/api/v2/statuspages/{page_id}/degradations/{degradation_id}https://api.datadoghq.com/api/v2/statuspages/{page_id}/degradations/{degradation_id}https://api.us3.datadoghq.com/api/v2/statuspages/{page_id}/degradations/{degradation_id}https://api.us5.datadoghq.com/api/v2/statuspages/{page_id}/degradations/{degradation_id}

    개요

    Deletes a degradation by its ID. This endpoint requires the status_pages_incident_write permission.

    인수

    경로 파라미터

    이름

    유형

    설명

    page_id [required]

    string

    The ID of the status page.

    degradation_id [required]

    string

    The ID of the degradation.

    응답

    No Content

    Too many requests

    API error response.

    Expand All

    항목

    유형

    설명

    errors [required]

    [string]

    A list of errors.

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

    코드 사례

                      # Path parameters
    export page_id="1234abcd-12ab-34cd-56ef-123456abcdef"
    export degradation_id="1234abcd-12ab-34cd-56ef-123456abcdef"
    # Curl command
    curl -X DELETE "https://api.ap1.datadoghq.com"https://api.ap2.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/statuspages/${page_id}/degradations/${degradation_id}" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}"
    """
    Delete degradation returns "No Content" response
    """
    
    from os import environ
    from datadog_api_client import ApiClient, Configuration
    from datadog_api_client.v2.api.status_pages_api import StatusPagesApi
    
    # there is a valid "status_page" in the system
    STATUS_PAGE_DATA_ID = environ["STATUS_PAGE_DATA_ID"]
    
    # there is a valid "degradation" in the system
    DEGRADATION_DATA_ID = environ["DEGRADATION_DATA_ID"]
    
    configuration = Configuration()
    with ApiClient(configuration) as api_client:
        api_instance = StatusPagesApi(api_client)
        api_instance.delete_degradation(
            page_id=STATUS_PAGE_DATA_ID,
            degradation_id=DEGRADATION_DATA_ID,
        )
    

    Instructions

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

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" python3 "example.py"
    # Delete degradation returns "No Content" response
    
    require "datadog_api_client"
    api_instance = DatadogAPIClient::V2::StatusPagesAPI.new
    
    # there is a valid "status_page" in the system
    STATUS_PAGE_DATA_ID = ENV["STATUS_PAGE_DATA_ID"]
    
    # there is a valid "degradation" in the system
    DEGRADATION_DATA_ID = ENV["DEGRADATION_DATA_ID"]
    api_instance.delete_degradation(STATUS_PAGE_DATA_ID, DEGRADATION_DATA_ID)
    

    Instructions

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

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" rb "example.rb"
    // Delete degradation returns "No Content" response
    
    package main
    
    import (
    	"context"
    	"fmt"
    	"os"
    
    	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
    	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV2"
    	"github.com/google/uuid"
    )
    
    func main() {
    	// there is a valid "status_page" in the system
    	StatusPageDataID := uuid.MustParse(os.Getenv("STATUS_PAGE_DATA_ID"))
    
    	// there is a valid "degradation" in the system
    	DegradationDataID := uuid.MustParse(os.Getenv("DEGRADATION_DATA_ID"))
    
    	ctx := datadog.NewDefaultContext(context.Background())
    	configuration := datadog.NewConfiguration()
    	apiClient := datadog.NewAPIClient(configuration)
    	api := datadogV2.NewStatusPagesApi(apiClient)
    	r, err := api.DeleteDegradation(ctx, StatusPageDataID, DegradationDataID)
    
    	if err != nil {
    		fmt.Fprintf(os.Stderr, "Error when calling `StatusPagesApi.DeleteDegradation`: %v\n", err)
    		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    	}
    }
    

    Instructions

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

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" go run "main.go"
    // Delete degradation returns "No Content" response
    
    import com.datadog.api.client.ApiClient;
    import com.datadog.api.client.ApiException;
    import com.datadog.api.client.v2.api.StatusPagesApi;
    import java.util.UUID;
    
    public class Example {
      public static void main(String[] args) {
        ApiClient defaultClient = ApiClient.getDefaultApiClient();
        StatusPagesApi apiInstance = new StatusPagesApi(defaultClient);
    
        // there is a valid "status_page" in the system
        UUID STATUS_PAGE_DATA_ID = null;
        try {
          STATUS_PAGE_DATA_ID = UUID.fromString(System.getenv("STATUS_PAGE_DATA_ID"));
        } catch (IllegalArgumentException e) {
          System.err.println("Error parsing UUID: " + e.getMessage());
        }
    
        // there is a valid "degradation" in the system
        UUID DEGRADATION_DATA_ID = null;
        try {
          DEGRADATION_DATA_ID = UUID.fromString(System.getenv("DEGRADATION_DATA_ID"));
        } catch (IllegalArgumentException e) {
          System.err.println("Error parsing UUID: " + e.getMessage());
        }
    
        try {
          apiInstance.deleteDegradation(STATUS_PAGE_DATA_ID, DEGRADATION_DATA_ID);
        } catch (ApiException e) {
          System.err.println("Exception when calling StatusPagesApi#deleteDegradation");
          System.err.println("Status code: " + e.getCode());
          System.err.println("Reason: " + e.getResponseBody());
          System.err.println("Response headers: " + e.getResponseHeaders());
          e.printStackTrace();
        }
      }
    }
    

    Instructions

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

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" java "Example.java"
    // Delete degradation returns "No Content" response
    use datadog_api_client::datadog;
    use datadog_api_client::datadogV2::api_status_pages::StatusPagesAPI;
    
    #[tokio::main]
    async fn main() {
        // there is a valid "status_page" in the system
        let status_page_data_id = uuid::Uuid::parse_str(&std::env::var("STATUS_PAGE_DATA_ID").unwrap())
            .expect("Invalid UUID");
    
        // there is a valid "degradation" in the system
        let degradation_data_id = uuid::Uuid::parse_str(&std::env::var("DEGRADATION_DATA_ID").unwrap())
            .expect("Invalid UUID");
        let configuration = datadog::Configuration::new();
        let api = StatusPagesAPI::with_config(configuration);
        let resp = api
            .delete_degradation(status_page_data_id.clone(), degradation_data_id.clone())
            .await;
        if let Ok(value) = resp {
            println!("{:#?}", value);
        } else {
            println!("{:#?}", resp.unwrap_err());
        }
    }
    

    Instructions

    First install the library and its dependencies and then save the example to src/main.rs and run following commands:

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo run
    /**
     * Delete degradation returns "No Content" response
     */
    
    import { client, v2 } from "@datadog/datadog-api-client";
    
    const configuration = client.createConfiguration();
    const apiInstance = new v2.StatusPagesApi(configuration);
    
    // there is a valid "status_page" in the system
    const STATUS_PAGE_DATA_ID = process.env.STATUS_PAGE_DATA_ID as string;
    
    // there is a valid "degradation" in the system
    const DEGRADATION_DATA_ID = process.env.DEGRADATION_DATA_ID as string;
    
    const params: v2.StatusPagesApiDeleteDegradationRequest = {
      pageId: STATUS_PAGE_DATA_ID,
      degradationId: DEGRADATION_DATA_ID,
    };
    
    apiInstance
      .deleteDegradation(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.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" tsc "example.ts"

    POST https://api.ap1.datadoghq.com/api/v2/statuspages/{page_id}/maintenanceshttps://api.ap2.datadoghq.com/api/v2/statuspages/{page_id}/maintenanceshttps://api.datadoghq.eu/api/v2/statuspages/{page_id}/maintenanceshttps://api.ddog-gov.com/api/v2/statuspages/{page_id}/maintenanceshttps://api.datadoghq.com/api/v2/statuspages/{page_id}/maintenanceshttps://api.us3.datadoghq.com/api/v2/statuspages/{page_id}/maintenanceshttps://api.us5.datadoghq.com/api/v2/statuspages/{page_id}/maintenances

    개요

    Schedules a new maintenance. This endpoint requires the status_pages_incident_write permission.

    인수

    경로 파라미터

    이름

    유형

    설명

    page_id [required]

    string

    The ID of the status page.

    쿼리 문자열

    이름

    유형

    설명

    notify_subscribers

    boolean

    Whether to notify page subscribers of the maintenance.

    include

    string

    Comma-separated list of resources to include. Supported values: created_by_user, last_modified_by_user, status_page.

    요청

    Body Data (required)

    Expand All

    항목

    유형

    설명

    data

    object

    The data object for creating a maintenance.

    attributes [required]

    object

    The supported attributes for creating a maintenance.

    completed_date

    date-time

    Timestamp of when the maintenance was completed.

    completed_description

    string

    The description shown when the maintenance is completed.

    components_affected [required]

    [object]

    The components affected by the maintenance.

    id [required]

    uuid

    The ID of the component. Must be a component of type component.

    name

    string

    The name of the component.

    status [required]

    enum

    The status of the component. Allowed enum values: operational,maintenance

    in_progress_description

    string

    The description shown while the maintenance is in progress.

    scheduled_description

    string

    The description shown when the maintenance is scheduled.

    start_date

    date-time

    Timestamp of when the maintenance is scheduled to start.

    title [required]

    string

    The title of the maintenance.

    type [required]

    enum

    Maintenances resource type. Allowed enum values: maintenances

    default: maintenances

    {
      "data": {
        "attributes": {
          "title": "API Maintenance",
          "scheduled_description": "We will be performing maintenance on the API to improve performance.",
          "in_progress_description": "We are currently performing maintenance on the API to improve performance.",
          "completed_description": "We have completed maintenance on the API to improve performance.",
          "start_date": "2021-11-11T12:11:11+00:00",
          "completed_date": "2021-11-11T13:11:11+00:00",
          "components_affected": [
            {
              "id": "4e9d3726-bdd7-0079-613c-e9aaba89eb01",
              "status": "operational"
            }
          ]
        },
        "type": "maintenances"
      }
    }

    응답

    Created

    Response object for a single maintenance.

    Expand All

    항목

    유형

    설명

    data

    object

    The data object for a maintenance.

    attributes

    object

    The attributes of a maintenance.

    completed_date

    date-time

    Timestamp of when the maintenance was completed.

    completed_description

    string

    The description shown when the maintenance is completed.

    components_affected

    [object]

    Components affected by the maintenance.

    id [required]

    uuid

    The ID of the component. Must be a component of type component.

    name

    string

    The name of the component.

    status [required]

    enum

    The status of the component. Allowed enum values: operational,maintenance

    in_progress_description

    string

    The description shown while the maintenance is in progress.

    modified_at

    date-time

    Timestamp of when the maintenance was last modified.

    published_date

    date-time

    Timestamp of when the maintenance was published.

    scheduled_description

    string

    The description shown when the maintenance is scheduled.

    start_date

    date-time

    Timestamp of when the maintenance is scheduled to start.

    status

    enum

    The status of the maintenance. Allowed enum values: scheduled,in_progress,completed

    title

    string

    Title of the maintenance.

    updates

    [object]

    Past updates made to the maintenance.

    components_affected

    [object]

    The components affected at the time of the update.

    id [required]

    uuid

    Identifier of the component affected at the time of the update.

    name

    string

    The name of the component affected at the time of the update.

    status [required]

    enum

    The status of the component affected at the time of the update. Allowed enum values: operational,maintenance

    created_at

    date-time

    Timestamp of when the update was created.

    description

    string

    Description of the update.

    id

    uuid

    Identifier of the update.

    manual_transition

    boolean

    Whether the update was applied manually by a user (true) or automatically by the system (false).

    modified_at

    date-time

    Timestamp of when the update was last modified.

    started_at

    date-time

    Timestamp of when the update started.

    status

    string

    The status of the update.

    id

    uuid

    The ID of the maintenance.

    relationships

    object

    The relationships of a maintenance.

    created_by_user

    object

    The Datadog user who created the maintenance.

    data [required]

    object

    The data object identifying the Datadog user who created the maintenance.

    id [required]

    uuid

    The ID of the Datadog user who created the maintenance.

    type [required]

    enum

    Users resource type. Allowed enum values: users

    default: users

    last_modified_by_user

    object

    The Datadog user who last modified the maintenance.

    data [required]

    object

    The data object identifying the Datadog user who last modified the maintenance.

    id [required]

    uuid

    The ID of the Datadog user who last modified the maintenance.

    type [required]

    enum

    Users resource type. Allowed enum values: users

    default: users

    status_page

    object

    The status page the maintenance belongs to.

    data [required]

    object

    The data object identifying the status page associated with a maintenance.

    id [required]

    uuid

    The ID of the status page.

    type [required]

    enum

    Status pages resource type. Allowed enum values: status_pages

    default: status_pages

    type [required]

    enum

    Maintenances resource type. Allowed enum values: maintenances

    default: maintenances

    included

    [ <oneOf>]

    The included related resources of a maintenance. Client must explicitly request these resources by name in the include query parameter.

    Option 1

    object

    The included Datadog user resource.

    attributes

    object

    Attributes of the Datadog user.

    email

    string

    The email of the Datadog user.

    handle

    string

    The handle of the Datadog user.

    icon

    string

    The icon of the Datadog user.

    name

    string

    The name of the Datadog user.

    uuid

    string

    The UUID of the Datadog user.

    id

    uuid

    The ID of the Datadog user.

    type [required]

    enum

    Users resource type. Allowed enum values: users

    default: users

    Option 2

    object

    The included status page resource.

    attributes

    object

    The attributes of a status page.

    company_logo

    string

    The base64-encoded image data displayed in the company logo.

    components

    [object]

    Components displayed on the status page.

    components

    [object]

    If the component is of type group, the components within the group.

    id

    uuid

    The ID of the grouped component.

    name

    string

    The name of the grouped component.

    position

    int64

    The zero-indexed position of the grouped component. Relative to the other components in the group.

    status

    enum

    The status of the component. Allowed enum values: operational,degraded,partial_outage,major_outage,maintenance

    type

    enum

    The type of the component. Allowed enum values: component

    id

    uuid

    The ID of the component.

    name

    string

    The name of the component.

    position

    int64

    The zero-indexed position of the component.

    status

    enum

    The status of the component. Allowed enum values: operational,degraded,partial_outage,major_outage,maintenance

    type

    enum

    The type of the component. Allowed enum values: component,group

    created_at

    date-time

    Timestamp of when the status page was created.

    custom_domain

    string

    If configured, the url that the status page is accessible at.

    custom_domain_enabled

    boolean

    Whether the custom domain is configured.

    domain_prefix

    string

    The subdomain of the status page's url taking the form https://{domain_prefix}.statuspage.datadoghq.com. Globally unique across Datadog Status Pages.

    email_header_image

    string

    Base64-encoded image data included in email notifications sent to status page subscribers.

    enabled

    boolean

    Whether the status page is enabled.

    favicon

    string

    Base64-encoded image data displayed in the browser tab.

    modified_at

    date-time

    Timestamp of when the status page was last modified.

    name

    string

    The name of the status page.

    page_url

    string

    The url that the status page is accessible at.

    subscriptions_enabled

    boolean

    Whether users can subscribe to the status page.

    type

    enum

    The type of the status page controlling how the status page is accessed. Allowed enum values: public,internal

    visualization_type

    enum

    The visualization type of the status page. Allowed enum values: bars_and_uptime_percentage,bars_only,component_name_only

    id

    uuid

    The ID of the status page.

    relationships

    object

    The relationships of a status page.

    created_by_user

    object

    The Datadog user who created the status page.

    data [required]

    object

    The data object identifying the Datadog user who created the status page.

    id [required]

    string

    The ID of the Datadog user who created the status page.

    type [required]

    enum

    Users resource type. Allowed enum values: users

    default: users

    last_modified_by_user

    object

    The Datadog user who last modified the status page.

    data [required]

    object

    The data object identifying the Datadog user who last modified the status page.

    id [required]

    string

    The ID of the Datadog user who last modified the status page.

    type [required]

    enum

    Users resource type. Allowed enum values: users

    default: users

    type [required]

    enum

    Status pages resource type. Allowed enum values: status_pages

    default: status_pages

    {
      "data": {
        "attributes": {
          "completed_date": "2019-09-19T10:00:00.000Z",
          "completed_description": "string",
          "components_affected": [
            {
              "id": "1234abcd-12ab-34cd-56ef-123456abcdef",
              "name": "string",
              "status": "operational"
            }
          ],
          "in_progress_description": "string",
          "modified_at": "2019-09-19T10:00:00.000Z",
          "published_date": "2019-09-19T10:00:00.000Z",
          "scheduled_description": "string",
          "start_date": "2019-09-19T10:00:00.000Z",
          "status": "string",
          "title": "string",
          "updates": [
            {
              "components_affected": [
                {
                  "id": "1234abcd-12ab-34cd-56ef-123456abcdef",
                  "name": "string",
                  "status": "operational"
                }
              ],
              "created_at": "2019-09-19T10:00:00.000Z",
              "description": "string",
              "id": "string",
              "manual_transition": false,
              "modified_at": "2019-09-19T10:00:00.000Z",
              "started_at": "2019-09-19T10:00:00.000Z",
              "status": "string"
            }
          ]
        },
        "id": "string",
        "relationships": {
          "created_by_user": {
            "data": {
              "id": "",
              "type": "users"
            }
          },
          "last_modified_by_user": {
            "data": {
              "id": "",
              "type": "users"
            }
          },
          "status_page": {
            "data": {
              "id": "",
              "type": "status_pages"
            }
          }
        },
        "type": "maintenances"
      },
      "included": [
        {
          "attributes": {
            "email": "string",
            "handle": "string",
            "icon": "string",
            "name": "string",
            "uuid": "string"
          },
          "id": "string",
          "type": "users"
        }
      ]
    }

    Too many requests

    API error response.

    Expand All

    항목

    유형

    설명

    errors [required]

    [string]

    A list of errors.

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

    코드 사례

                              # Path parameters
    export page_id="CHANGE_ME"
    # Curl command
    curl -X POST "https://api.ap1.datadoghq.com"https://api.ap2.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/statuspages/${page_id}/maintenances" \ -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": { "title": "API Maintenance", "scheduled_description": "We will be performing maintenance on the API to improve performance.", "in_progress_description": "We are currently performing maintenance on the API to improve performance.", "completed_description": "We have completed maintenance on the API to improve performance.", "start_date": "2021-11-11T12:11:11+00:00", "completed_date": "2021-11-11T13:11:11+00:00", "components_affected": [ { "id": "4e9d3726-bdd7-0079-613c-e9aaba89eb01", "status": "operational" } ] }, "type": "maintenances" } } EOF

    PATCH https://api.ap1.datadoghq.com/api/v2/statuspages/{page_id}/maintenances/{maintenance_id}https://api.ap2.datadoghq.com/api/v2/statuspages/{page_id}/maintenances/{maintenance_id}https://api.datadoghq.eu/api/v2/statuspages/{page_id}/maintenances/{maintenance_id}https://api.ddog-gov.com/api/v2/statuspages/{page_id}/maintenances/{maintenance_id}https://api.datadoghq.com/api/v2/statuspages/{page_id}/maintenances/{maintenance_id}https://api.us3.datadoghq.com/api/v2/statuspages/{page_id}/maintenances/{maintenance_id}https://api.us5.datadoghq.com/api/v2/statuspages/{page_id}/maintenances/{maintenance_id}

    개요

    Updates an existing maintenance’s attributes. This endpoint requires the status_pages_incident_write permission.

    인수

    경로 파라미터

    이름

    유형

    설명

    page_id [required]

    string

    The ID of the status page.

    maintenance_id [required]

    string

    The ID of the maintenance.

    쿼리 문자열

    이름

    유형

    설명

    notify_subscribers

    boolean

    Whether to notify page subscribers of the maintenance.

    include

    string

    Comma-separated list of resources to include. Supported values: created_by_user, last_modified_by_user, status_page.

    요청

    Body Data (required)

    Expand All

    항목

    유형

    설명

    data

    object

    The data object for updating a maintenance.

    attributes [required]

    object

    The supported attributes for updating a maintenance.

    completed_date

    date-time

    Timestamp of when the maintenance was completed.

    completed_description

    string

    The description shown when the maintenance is completed.

    components_affected

    [object]

    The components affected by the maintenance.

    id [required]

    uuid

    The ID of the component. Must be a component of type component.

    name

    string

    The name of the component.

    status [required]

    enum

    The status of the component. Allowed enum values: operational,maintenance

    in_progress_description

    string

    The description shown while the maintenance is in progress.

    scheduled_description

    string

    The description shown when the maintenance is scheduled.

    start_date

    date-time

    Timestamp of when the maintenance is scheduled to start.

    status

    enum

    The status of the maintenance. Allowed enum values: scheduled,in_progress,completed

    title

    string

    The title of the maintenance.

    id [required]

    uuid

    The ID of the maintenance.

    type [required]

    enum

    Maintenances resource type. Allowed enum values: maintenances

    default: maintenances

    {
      "data": {
        "attributes": {
          "scheduled_description": "We will be performing maintenance on the API to improve performance for 40 minutes.",
          "in_progress_description": "We are currently performing maintenance on the API to improve performance for 40 minutes."
        },
        "id": "6a167dcd-4975-9fda-c895-ee008c4256f9",
        "type": "maintenances"
      }
    }

    응답

    OK

    Response object for a single maintenance.

    Expand All

    항목

    유형

    설명

    data

    object

    The data object for a maintenance.

    attributes

    object

    The attributes of a maintenance.

    completed_date

    date-time

    Timestamp of when the maintenance was completed.

    completed_description

    string

    The description shown when the maintenance is completed.

    components_affected

    [object]

    Components affected by the maintenance.

    id [required]

    uuid

    The ID of the component. Must be a component of type component.

    name

    string

    The name of the component.

    status [required]

    enum

    The status of the component. Allowed enum values: operational,maintenance

    in_progress_description

    string

    The description shown while the maintenance is in progress.

    modified_at

    date-time

    Timestamp of when the maintenance was last modified.

    published_date

    date-time

    Timestamp of when the maintenance was published.

    scheduled_description

    string

    The description shown when the maintenance is scheduled.

    start_date

    date-time

    Timestamp of when the maintenance is scheduled to start.

    status

    enum

    The status of the maintenance. Allowed enum values: scheduled,in_progress,completed

    title

    string

    Title of the maintenance.

    updates

    [object]

    Past updates made to the maintenance.

    components_affected

    [object]

    The components affected at the time of the update.

    id [required]

    uuid

    Identifier of the component affected at the time of the update.

    name

    string

    The name of the component affected at the time of the update.

    status [required]

    enum

    The status of the component affected at the time of the update. Allowed enum values: operational,maintenance

    created_at

    date-time

    Timestamp of when the update was created.

    description

    string

    Description of the update.

    id

    uuid

    Identifier of the update.

    manual_transition

    boolean

    Whether the update was applied manually by a user (true) or automatically by the system (false).

    modified_at

    date-time

    Timestamp of when the update was last modified.

    started_at

    date-time

    Timestamp of when the update started.

    status

    string

    The status of the update.

    id

    uuid

    The ID of the maintenance.

    relationships

    object

    The relationships of a maintenance.

    created_by_user

    object

    The Datadog user who created the maintenance.

    data [required]

    object

    The data object identifying the Datadog user who created the maintenance.

    id [required]

    uuid

    The ID of the Datadog user who created the maintenance.

    type [required]

    enum

    Users resource type. Allowed enum values: users

    default: users

    last_modified_by_user

    object

    The Datadog user who last modified the maintenance.

    data [required]

    object

    The data object identifying the Datadog user who last modified the maintenance.

    id [required]

    uuid

    The ID of the Datadog user who last modified the maintenance.

    type [required]

    enum

    Users resource type. Allowed enum values: users

    default: users

    status_page

    object

    The status page the maintenance belongs to.

    data [required]

    object

    The data object identifying the status page associated with a maintenance.

    id [required]

    uuid

    The ID of the status page.

    type [required]

    enum

    Status pages resource type. Allowed enum values: status_pages

    default: status_pages

    type [required]

    enum

    Maintenances resource type. Allowed enum values: maintenances

    default: maintenances

    included

    [ <oneOf>]

    The included related resources of a maintenance. Client must explicitly request these resources by name in the include query parameter.

    Option 1

    object

    The included Datadog user resource.

    attributes

    object

    Attributes of the Datadog user.

    email

    string

    The email of the Datadog user.

    handle

    string

    The handle of the Datadog user.

    icon

    string

    The icon of the Datadog user.

    name

    string

    The name of the Datadog user.

    uuid

    string

    The UUID of the Datadog user.

    id

    uuid

    The ID of the Datadog user.

    type [required]

    enum

    Users resource type. Allowed enum values: users

    default: users

    Option 2

    object

    The included status page resource.

    attributes

    object

    The attributes of a status page.

    company_logo

    string

    The base64-encoded image data displayed in the company logo.

    components

    [object]

    Components displayed on the status page.

    components

    [object]

    If the component is of type group, the components within the group.

    id

    uuid

    The ID of the grouped component.

    name

    string

    The name of the grouped component.

    position

    int64

    The zero-indexed position of the grouped component. Relative to the other components in the group.

    status

    enum

    The status of the component. Allowed enum values: operational,degraded,partial_outage,major_outage,maintenance

    type

    enum

    The type of the component. Allowed enum values: component

    id

    uuid

    The ID of the component.

    name

    string

    The name of the component.

    position

    int64

    The zero-indexed position of the component.

    status

    enum

    The status of the component. Allowed enum values: operational,degraded,partial_outage,major_outage,maintenance

    type

    enum

    The type of the component. Allowed enum values: component,group

    created_at

    date-time

    Timestamp of when the status page was created.

    custom_domain

    string

    If configured, the url that the status page is accessible at.

    custom_domain_enabled

    boolean

    Whether the custom domain is configured.

    domain_prefix

    string

    The subdomain of the status page's url taking the form https://{domain_prefix}.statuspage.datadoghq.com. Globally unique across Datadog Status Pages.

    email_header_image

    string

    Base64-encoded image data included in email notifications sent to status page subscribers.

    enabled

    boolean

    Whether the status page is enabled.

    favicon

    string

    Base64-encoded image data displayed in the browser tab.

    modified_at

    date-time

    Timestamp of when the status page was last modified.

    name

    string

    The name of the status page.

    page_url

    string

    The url that the status page is accessible at.

    subscriptions_enabled

    boolean

    Whether users can subscribe to the status page.

    type

    enum

    The type of the status page controlling how the status page is accessed. Allowed enum values: public,internal

    visualization_type

    enum

    The visualization type of the status page. Allowed enum values: bars_and_uptime_percentage,bars_only,component_name_only

    id

    uuid

    The ID of the status page.

    relationships

    object

    The relationships of a status page.

    created_by_user

    object

    The Datadog user who created the status page.

    data [required]

    object

    The data object identifying the Datadog user who created the status page.

    id [required]

    string

    The ID of the Datadog user who created the status page.

    type [required]

    enum

    Users resource type. Allowed enum values: users

    default: users

    last_modified_by_user

    object

    The Datadog user who last modified the status page.

    data [required]

    object

    The data object identifying the Datadog user who last modified the status page.

    id [required]

    string

    The ID of the Datadog user who last modified the status page.

    type [required]

    enum

    Users resource type. Allowed enum values: users

    default: users

    type [required]

    enum

    Status pages resource type. Allowed enum values: status_pages

    default: status_pages

    {
      "data": {
        "attributes": {
          "completed_date": "2019-09-19T10:00:00.000Z",
          "completed_description": "string",
          "components_affected": [
            {
              "id": "1234abcd-12ab-34cd-56ef-123456abcdef",
              "name": "string",
              "status": "operational"
            }
          ],
          "in_progress_description": "string",
          "modified_at": "2019-09-19T10:00:00.000Z",
          "published_date": "2019-09-19T10:00:00.000Z",
          "scheduled_description": "string",
          "start_date": "2019-09-19T10:00:00.000Z",
          "status": "string",
          "title": "string",
          "updates": [
            {
              "components_affected": [
                {
                  "id": "1234abcd-12ab-34cd-56ef-123456abcdef",
                  "name": "string",
                  "status": "operational"
                }
              ],
              "created_at": "2019-09-19T10:00:00.000Z",
              "description": "string",
              "id": "string",
              "manual_transition": false,
              "modified_at": "2019-09-19T10:00:00.000Z",
              "started_at": "2019-09-19T10:00:00.000Z",
              "status": "string"
            }
          ]
        },
        "id": "string",
        "relationships": {
          "created_by_user": {
            "data": {
              "id": "",
              "type": "users"
            }
          },
          "last_modified_by_user": {
            "data": {
              "id": "",
              "type": "users"
            }
          },
          "status_page": {
            "data": {
              "id": "",
              "type": "status_pages"
            }
          }
        },
        "type": "maintenances"
      },
      "included": [
        {
          "attributes": {
            "email": "string",
            "handle": "string",
            "icon": "string",
            "name": "string",
            "uuid": "string"
          },
          "id": "string",
          "type": "users"
        }
      ]
    }

    Too many requests

    API error response.

    Expand All

    항목

    유형

    설명

    errors [required]

    [string]

    A list of errors.

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

    코드 사례

                              # Path parameters
    export page_id="CHANGE_ME"
    export maintenance_id="CHANGE_ME"
    # Curl command
    curl -X PATCH "https://api.ap1.datadoghq.com"https://api.ap2.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/statuspages/${page_id}/maintenances/${maintenance_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": { "scheduled_description": "We will be performing maintenance on the API to improve performance for 40 minutes.", "in_progress_description": "We are currently performing maintenance on the API to improve performance for 40 minutes." }, "id": "6a167dcd-4975-9fda-c895-ee008c4256f9", "type": "maintenances" } } EOF

    GET https://api.ap1.datadoghq.com/api/v2/statuspages/maintenanceshttps://api.ap2.datadoghq.com/api/v2/statuspages/maintenanceshttps://api.datadoghq.eu/api/v2/statuspages/maintenanceshttps://api.ddog-gov.com/api/v2/statuspages/maintenanceshttps://api.datadoghq.com/api/v2/statuspages/maintenanceshttps://api.us3.datadoghq.com/api/v2/statuspages/maintenanceshttps://api.us5.datadoghq.com/api/v2/statuspages/maintenances

    개요

    Lists all maintenances for the organization. Optionally filter by status and page. This endpoint requires the status_pages_settings_read permission.

    인수

    쿼리 문자열

    이름

    유형

    설명

    filter[page_id]

    string

    Optional page id filter.

    page[offset]

    integer

    Offset to use as the start of the page.

    page[limit]

    integer

    The number of maintenances to return per page.

    include

    string

    Comma-separated list of resources to include. Supported values: created_by_user, last_modified_by_user, status_page.

    filter[status]

    string

    Optional maintenance status filter. Supported values: scheduled, in_progress, completed.

    sort

    string

    Sort order. Prefix with ‘-’ for descending. Supported values: created_at, -created_at, start_date, -start_date.

    응답

    OK

    Response object for a list of maintenances.

    Expand All

    항목

    유형

    설명

    data [required]

    [object]

    A list of maintenance data objects.

    attributes

    object

    The attributes of a maintenance.

    completed_date

    date-time

    Timestamp of when the maintenance was completed.

    completed_description

    string

    The description shown when the maintenance is completed.

    components_affected

    [object]

    Components affected by the maintenance.

    id [required]

    uuid

    The ID of the component. Must be a component of type component.

    name

    string

    The name of the component.

    status [required]

    enum

    The status of the component. Allowed enum values: operational,maintenance

    in_progress_description

    string

    The description shown while the maintenance is in progress.

    modified_at

    date-time

    Timestamp of when the maintenance was last modified.

    published_date

    date-time

    Timestamp of when the maintenance was published.

    scheduled_description

    string

    The description shown when the maintenance is scheduled.

    start_date

    date-time

    Timestamp of when the maintenance is scheduled to start.

    status

    enum

    The status of the maintenance. Allowed enum values: scheduled,in_progress,completed

    title

    string

    Title of the maintenance.

    updates

    [object]

    Past updates made to the maintenance.

    components_affected

    [object]

    The components affected at the time of the update.

    id [required]

    uuid

    Identifier of the component affected at the time of the update.

    name

    string

    The name of the component affected at the time of the update.

    status [required]

    enum

    The status of the component affected at the time of the update. Allowed enum values: operational,maintenance

    created_at

    date-time

    Timestamp of when the update was created.

    description

    string

    Description of the update.

    id

    uuid

    Identifier of the update.

    manual_transition

    boolean

    Whether the update was applied manually by a user (true) or automatically by the system (false).

    modified_at

    date-time

    Timestamp of when the update was last modified.

    started_at

    date-time

    Timestamp of when the update started.

    status

    string

    The status of the update.

    id

    uuid

    The ID of the maintenance.

    relationships

    object

    The relationships of a maintenance.

    created_by_user

    object

    The Datadog user who created the maintenance.

    data [required]

    object

    The data object identifying the Datadog user who created the maintenance.

    id [required]

    uuid

    The ID of the Datadog user who created the maintenance.

    type [required]

    enum

    Users resource type. Allowed enum values: users

    default: users

    last_modified_by_user

    object

    The Datadog user who last modified the maintenance.

    data [required]

    object

    The data object identifying the Datadog user who last modified the maintenance.

    id [required]

    uuid

    The ID of the Datadog user who last modified the maintenance.

    type [required]

    enum

    Users resource type. Allowed enum values: users

    default: users

    status_page

    object

    The status page the maintenance belongs to.

    data [required]

    object

    The data object identifying the status page associated with a maintenance.

    id [required]

    uuid

    The ID of the status page.

    type [required]

    enum

    Status pages resource type. Allowed enum values: status_pages

    default: status_pages

    type [required]

    enum

    Maintenances resource type. Allowed enum values: maintenances

    default: maintenances

    included

    [ <oneOf>]

    The included related resources of a maintenance. Client must explicitly request these resources by name in the include query parameter.

    Option 1

    object

    The included Datadog user resource.

    attributes

    object

    Attributes of the Datadog user.

    email

    string

    The email of the Datadog user.

    handle

    string

    The handle of the Datadog user.

    icon

    string

    The icon of the Datadog user.

    name

    string

    The name of the Datadog user.

    uuid

    string

    The UUID of the Datadog user.

    id

    uuid

    The ID of the Datadog user.

    type [required]

    enum

    Users resource type. Allowed enum values: users

    default: users

    Option 2

    object

    The included status page resource.

    attributes

    object

    The attributes of a status page.

    company_logo

    string

    The base64-encoded image data displayed in the company logo.

    components

    [object]

    Components displayed on the status page.

    components

    [object]

    If the component is of type group, the components within the group.

    id

    uuid

    The ID of the grouped component.

    name

    string

    The name of the grouped component.

    position

    int64

    The zero-indexed position of the grouped component. Relative to the other components in the group.

    status

    enum

    The status of the component. Allowed enum values: operational,degraded,partial_outage,major_outage,maintenance

    type

    enum

    The type of the component. Allowed enum values: component

    id

    uuid

    The ID of the component.

    name

    string

    The name of the component.

    position

    int64

    The zero-indexed position of the component.

    status

    enum

    The status of the component. Allowed enum values: operational,degraded,partial_outage,major_outage,maintenance

    type

    enum

    The type of the component. Allowed enum values: component,group

    created_at

    date-time

    Timestamp of when the status page was created.

    custom_domain

    string

    If configured, the url that the status page is accessible at.

    custom_domain_enabled

    boolean

    Whether the custom domain is configured.

    domain_prefix

    string

    The subdomain of the status page's url taking the form https://{domain_prefix}.statuspage.datadoghq.com. Globally unique across Datadog Status Pages.

    email_header_image

    string

    Base64-encoded image data included in email notifications sent to status page subscribers.

    enabled

    boolean

    Whether the status page is enabled.

    favicon

    string

    Base64-encoded image data displayed in the browser tab.

    modified_at

    date-time

    Timestamp of when the status page was last modified.

    name

    string

    The name of the status page.

    page_url

    string

    The url that the status page is accessible at.

    subscriptions_enabled

    boolean

    Whether users can subscribe to the status page.

    type

    enum

    The type of the status page controlling how the status page is accessed. Allowed enum values: public,internal

    visualization_type

    enum

    The visualization type of the status page. Allowed enum values: bars_and_uptime_percentage,bars_only,component_name_only

    id

    uuid

    The ID of the status page.

    relationships

    object

    The relationships of a status page.

    created_by_user

    object

    The Datadog user who created the status page.

    data [required]

    object

    The data object identifying the Datadog user who created the status page.

    id [required]

    string

    The ID of the Datadog user who created the status page.

    type [required]

    enum

    Users resource type. Allowed enum values: users

    default: users

    last_modified_by_user

    object

    The Datadog user who last modified the status page.

    data [required]

    object

    The data object identifying the Datadog user who last modified the status page.

    id [required]

    string

    The ID of the Datadog user who last modified the status page.

    type [required]

    enum

    Users resource type. Allowed enum values: users

    default: users

    type [required]

    enum

    Status pages resource type. Allowed enum values: status_pages

    default: status_pages

    meta

    object

    Response metadata.

    page

    object

    Offset-based pagination schema.

    first_offset

    int64

    Integer representing the offset to fetch the first page of results.

    last_offset

    int64

    Integer representing the offset to fetch the last page of results.

    limit

    int64

    Integer representing the number of elements to be returned in the results.

    next_offset

    int64

    Integer representing the index of the first element in the next page of results. Equal to page size added to the current offset.

    offset

    int64

    Integer representing the index of the first element in the results.

    prev_offset

    int64

    Integer representing the index of the first element in the previous page of results.

    total

    int64

    Integer representing the total number of elements available.

    type

    enum

    The pagination type used for offset-based pagination. Allowed enum values: offset_limit

    default: offset_limit

    {
      "data": [
        {
          "attributes": {
            "completed_date": "2019-09-19T10:00:00.000Z",
            "completed_description": "string",
            "components_affected": [
              {
                "id": "1234abcd-12ab-34cd-56ef-123456abcdef",
                "name": "string",
                "status": "operational"
              }
            ],
            "in_progress_description": "string",
            "modified_at": "2019-09-19T10:00:00.000Z",
            "published_date": "2019-09-19T10:00:00.000Z",
            "scheduled_description": "string",
            "start_date": "2019-09-19T10:00:00.000Z",
            "status": "string",
            "title": "string",
            "updates": [
              {
                "components_affected": [
                  {
                    "id": "1234abcd-12ab-34cd-56ef-123456abcdef",
                    "name": "string",
                    "status": "operational"
                  }
                ],
                "created_at": "2019-09-19T10:00:00.000Z",
                "description": "string",
                "id": "string",
                "manual_transition": false,
                "modified_at": "2019-09-19T10:00:00.000Z",
                "started_at": "2019-09-19T10:00:00.000Z",
                "status": "string"
              }
            ]
          },
          "id": "string",
          "relationships": {
            "created_by_user": {
              "data": {
                "id": "",
                "type": "users"
              }
            },
            "last_modified_by_user": {
              "data": {
                "id": "",
                "type": "users"
              }
            },
            "status_page": {
              "data": {
                "id": "",
                "type": "status_pages"
              }
            }
          },
          "type": "maintenances"
        }
      ],
      "included": [
        {
          "attributes": {
            "email": "string",
            "handle": "string",
            "icon": "string",
            "name": "string",
            "uuid": "string"
          },
          "id": "string",
          "type": "users"
        }
      ],
      "meta": {
        "page": {
          "first_offset": 0,
          "last_offset": 900,
          "limit": 100,
          "next_offset": 100,
          "offset": 0,
          "prev_offset": 100,
          "total": 1000,
          "type": "offset_limit"
        }
      }
    }

    Too many requests

    API error response.

    Expand All

    항목

    유형

    설명

    errors [required]

    [string]

    A list of errors.

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

    코드 사례

                      # Curl command
    curl -X GET "https://api.ap1.datadoghq.com"https://api.ap2.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/statuspages/maintenances" \ -H "Accept: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}"

    GET https://api.ap1.datadoghq.com/api/v2/statuspages/{page_id}/maintenances/{maintenance_id}https://api.ap2.datadoghq.com/api/v2/statuspages/{page_id}/maintenances/{maintenance_id}https://api.datadoghq.eu/api/v2/statuspages/{page_id}/maintenances/{maintenance_id}https://api.ddog-gov.com/api/v2/statuspages/{page_id}/maintenances/{maintenance_id}https://api.datadoghq.com/api/v2/statuspages/{page_id}/maintenances/{maintenance_id}https://api.us3.datadoghq.com/api/v2/statuspages/{page_id}/maintenances/{maintenance_id}https://api.us5.datadoghq.com/api/v2/statuspages/{page_id}/maintenances/{maintenance_id}

    개요

    Retrieves a specific maintenance by its ID. This endpoint requires the status_pages_settings_read permission.

    인수

    경로 파라미터

    이름

    유형

    설명

    page_id [required]

    string

    The ID of the status page.

    maintenance_id [required]

    string

    The ID of the maintenance.

    쿼리 문자열

    이름

    유형

    설명

    include

    string

    Comma-separated list of resources to include. Supported values: created_by_user, last_modified_by_user, status_page.

    응답

    OK

    Response object for a single maintenance.

    Expand All

    항목

    유형

    설명

    data

    object

    The data object for a maintenance.

    attributes

    object

    The attributes of a maintenance.

    completed_date

    date-time

    Timestamp of when the maintenance was completed.

    completed_description

    string

    The description shown when the maintenance is completed.

    components_affected

    [object]

    Components affected by the maintenance.

    id [required]

    uuid

    The ID of the component. Must be a component of type component.

    name

    string

    The name of the component.

    status [required]

    enum

    The status of the component. Allowed enum values: operational,maintenance

    in_progress_description

    string

    The description shown while the maintenance is in progress.

    modified_at

    date-time

    Timestamp of when the maintenance was last modified.

    published_date

    date-time

    Timestamp of when the maintenance was published.

    scheduled_description

    string

    The description shown when the maintenance is scheduled.

    start_date

    date-time

    Timestamp of when the maintenance is scheduled to start.

    status

    enum

    The status of the maintenance. Allowed enum values: scheduled,in_progress,completed

    title

    string

    Title of the maintenance.

    updates

    [object]

    Past updates made to the maintenance.

    components_affected

    [object]

    The components affected at the time of the update.

    id [required]

    uuid

    Identifier of the component affected at the time of the update.

    name

    string

    The name of the component affected at the time of the update.

    status [required]

    enum

    The status of the component affected at the time of the update. Allowed enum values: operational,maintenance

    created_at

    date-time

    Timestamp of when the update was created.

    description

    string

    Description of the update.

    id

    uuid

    Identifier of the update.

    manual_transition

    boolean

    Whether the update was applied manually by a user (true) or automatically by the system (false).

    modified_at

    date-time

    Timestamp of when the update was last modified.

    started_at

    date-time

    Timestamp of when the update started.

    status

    string

    The status of the update.

    id

    uuid

    The ID of the maintenance.

    relationships

    object

    The relationships of a maintenance.

    created_by_user

    object

    The Datadog user who created the maintenance.

    data [required]

    object

    The data object identifying the Datadog user who created the maintenance.

    id [required]

    uuid

    The ID of the Datadog user who created the maintenance.

    type [required]

    enum

    Users resource type. Allowed enum values: users

    default: users

    last_modified_by_user

    object

    The Datadog user who last modified the maintenance.

    data [required]

    object

    The data object identifying the Datadog user who last modified the maintenance.

    id [required]

    uuid

    The ID of the Datadog user who last modified the maintenance.

    type [required]

    enum

    Users resource type. Allowed enum values: users

    default: users

    status_page

    object

    The status page the maintenance belongs to.

    data [required]

    object

    The data object identifying the status page associated with a maintenance.

    id [required]

    uuid

    The ID of the status page.

    type [required]

    enum

    Status pages resource type. Allowed enum values: status_pages

    default: status_pages

    type [required]

    enum

    Maintenances resource type. Allowed enum values: maintenances

    default: maintenances

    included

    [ <oneOf>]

    The included related resources of a maintenance. Client must explicitly request these resources by name in the include query parameter.

    Option 1

    object

    The included Datadog user resource.

    attributes

    object

    Attributes of the Datadog user.

    email

    string

    The email of the Datadog user.

    handle

    string

    The handle of the Datadog user.

    icon

    string

    The icon of the Datadog user.

    name

    string

    The name of the Datadog user.

    uuid

    string

    The UUID of the Datadog user.

    id

    uuid

    The ID of the Datadog user.

    type [required]

    enum

    Users resource type. Allowed enum values: users

    default: users

    Option 2

    object

    The included status page resource.

    attributes

    object

    The attributes of a status page.

    company_logo

    string

    The base64-encoded image data displayed in the company logo.

    components

    [object]

    Components displayed on the status page.

    components

    [object]

    If the component is of type group, the components within the group.

    id

    uuid

    The ID of the grouped component.

    name

    string

    The name of the grouped component.

    position

    int64

    The zero-indexed position of the grouped component. Relative to the other components in the group.

    status

    enum

    The status of the component. Allowed enum values: operational,degraded,partial_outage,major_outage,maintenance

    type

    enum

    The type of the component. Allowed enum values: component

    id

    uuid

    The ID of the component.

    name

    string

    The name of the component.

    position

    int64

    The zero-indexed position of the component.

    status

    enum

    The status of the component. Allowed enum values: operational,degraded,partial_outage,major_outage,maintenance

    type

    enum

    The type of the component. Allowed enum values: component,group

    created_at

    date-time

    Timestamp of when the status page was created.

    custom_domain

    string

    If configured, the url that the status page is accessible at.

    custom_domain_enabled

    boolean

    Whether the custom domain is configured.

    domain_prefix

    string

    The subdomain of the status page's url taking the form https://{domain_prefix}.statuspage.datadoghq.com. Globally unique across Datadog Status Pages.

    email_header_image

    string

    Base64-encoded image data included in email notifications sent to status page subscribers.

    enabled

    boolean

    Whether the status page is enabled.

    favicon

    string

    Base64-encoded image data displayed in the browser tab.

    modified_at

    date-time

    Timestamp of when the status page was last modified.

    name

    string

    The name of the status page.

    page_url

    string

    The url that the status page is accessible at.

    subscriptions_enabled

    boolean

    Whether users can subscribe to the status page.

    type

    enum

    The type of the status page controlling how the status page is accessed. Allowed enum values: public,internal

    visualization_type

    enum

    The visualization type of the status page. Allowed enum values: bars_and_uptime_percentage,bars_only,component_name_only

    id

    uuid

    The ID of the status page.

    relationships

    object

    The relationships of a status page.

    created_by_user

    object

    The Datadog user who created the status page.

    data [required]

    object

    The data object identifying the Datadog user who created the status page.

    id [required]

    string

    The ID of the Datadog user who created the status page.

    type [required]

    enum

    Users resource type. Allowed enum values: users

    default: users

    last_modified_by_user

    object

    The Datadog user who last modified the status page.

    data [required]

    object

    The data object identifying the Datadog user who last modified the status page.

    id [required]

    string

    The ID of the Datadog user who last modified the status page.

    type [required]

    enum

    Users resource type. Allowed enum values: users

    default: users

    type [required]

    enum

    Status pages resource type. Allowed enum values: status_pages

    default: status_pages

    {
      "data": {
        "attributes": {
          "completed_date": "2019-09-19T10:00:00.000Z",
          "completed_description": "string",
          "components_affected": [
            {
              "id": "1234abcd-12ab-34cd-56ef-123456abcdef",
              "name": "string",
              "status": "operational"
            }
          ],
          "in_progress_description": "string",
          "modified_at": "2019-09-19T10:00:00.000Z",
          "published_date": "2019-09-19T10:00:00.000Z",
          "scheduled_description": "string",
          "start_date": "2019-09-19T10:00:00.000Z",
          "status": "string",
          "title": "string",
          "updates": [
            {
              "components_affected": [
                {
                  "id": "1234abcd-12ab-34cd-56ef-123456abcdef",
                  "name": "string",
                  "status": "operational"
                }
              ],
              "created_at": "2019-09-19T10:00:00.000Z",
              "description": "string",
              "id": "string",
              "manual_transition": false,
              "modified_at": "2019-09-19T10:00:00.000Z",
              "started_at": "2019-09-19T10:00:00.000Z",
              "status": "string"
            }
          ]
        },
        "id": "string",
        "relationships": {
          "created_by_user": {
            "data": {
              "id": "",
              "type": "users"
            }
          },
          "last_modified_by_user": {
            "data": {
              "id": "",
              "type": "users"
            }
          },
          "status_page": {
            "data": {
              "id": "",
              "type": "status_pages"
            }
          }
        },
        "type": "maintenances"
      },
      "included": [
        {
          "attributes": {
            "email": "string",
            "handle": "string",
            "icon": "string",
            "name": "string",
            "uuid": "string"
          },
          "id": "string",
          "type": "users"
        }
      ]
    }

    Too many requests

    API error response.

    Expand All

    항목

    유형

    설명

    errors [required]

    [string]

    A list of errors.

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

    코드 사례

                      # Path parameters
    export page_id="CHANGE_ME"
    export maintenance_id="CHANGE_ME"
    # Curl command
    curl -X GET "https://api.ap1.datadoghq.com"https://api.ap2.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/statuspages/${page_id}/maintenances/${maintenance_id}" \ -H "Accept: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}"