For AI agents: A markdown version of this page is available at https://dnd37xeb23o8n.cloudfront.net/stefon.simmons/docs-astro-web-10435/api/latest/status-pages/create-component.md. A documentation index is available at /llms.txt.
Language
Datadog site

Create component

POSThttps://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}/componentshttps://api.datadoghq.eu/api/v2/statuspages/{page_id}/componentshttps://api.ap1.datadoghq.com/api/v2/statuspages/{page_id}/componentshttps://api.ap2.datadoghq.com/api/v2/statuspages/{page_id}/componentshttps://api.uk1.datadoghq.com/api/v2/statuspages/{page_id}/componentshttps://api.ddog-gov.com/api/v2/statuspages/{page_id}/componentshttps://api.us2.ddog-gov.com/api/v2/statuspages/{page_id}/components

Overview

Creates a new component.

This endpoint requires the status_pages_settings_write permission.

OAuth apps require the status_pages_settings_write authorization scope to access this endpoint.

Arguments

Path Parameters

Name
Type
Description
page_id [required]
string

The ID of the status page.

Query Strings

Name
Type
Description
include
string

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

Request

Body Data (required)

Field
Type
Description
data
object

The data object for creating a component.

Response

Created

Response object for a single component.

Field
Type
Description
data
object

The data object for a component.

included
[<oneOf>]

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

Code Example

Create component returns "Created" response
# Path parameters
export page_id="1234abcd-12ab-34cd-56ef-123456abcdef"

# Set your Datadog site and credentials
export DD_SITE="datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/statuspages/${page_id}/components" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "name": "Logs",
      "position": 0,
      "type": "component"
    },
    "type": "components"
  }
}
EOF
# Path parameters
export page_id="1234abcd-12ab-34cd-56ef-123456abcdef"

# Set your Datadog site and credentials
export DD_SITE="us3.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/statuspages/${page_id}/components" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "name": "Logs",
      "position": 0,
      "type": "component"
    },
    "type": "components"
  }
}
EOF
# Path parameters
export page_id="1234abcd-12ab-34cd-56ef-123456abcdef"

# Set your Datadog site and credentials
export DD_SITE="us5.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/statuspages/${page_id}/components" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "name": "Logs",
      "position": 0,
      "type": "component"
    },
    "type": "components"
  }
}
EOF
# Path parameters
export page_id="1234abcd-12ab-34cd-56ef-123456abcdef"

# Set your Datadog site and credentials
export DD_SITE="datadoghq.eu"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/statuspages/${page_id}/components" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "name": "Logs",
      "position": 0,
      "type": "component"
    },
    "type": "components"
  }
}
EOF
# Path parameters
export page_id="1234abcd-12ab-34cd-56ef-123456abcdef"

# Set your Datadog site and credentials
export DD_SITE="ap1.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/statuspages/${page_id}/components" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "name": "Logs",
      "position": 0,
      "type": "component"
    },
    "type": "components"
  }
}
EOF
# Path parameters
export page_id="1234abcd-12ab-34cd-56ef-123456abcdef"

# Set your Datadog site and credentials
export DD_SITE="ap2.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/statuspages/${page_id}/components" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "name": "Logs",
      "position": 0,
      "type": "component"
    },
    "type": "components"
  }
}
EOF
# Path parameters
export page_id="1234abcd-12ab-34cd-56ef-123456abcdef"

# Set your Datadog site and credentials
export DD_SITE="uk1.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/statuspages/${page_id}/components" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "name": "Logs",
      "position": 0,
      "type": "component"
    },
    "type": "components"
  }
}
EOF
# Path parameters
export page_id="1234abcd-12ab-34cd-56ef-123456abcdef"

# Set your Datadog site and credentials
export DD_SITE="ddog-gov.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/statuspages/${page_id}/components" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "name": "Logs",
      "position": 0,
      "type": "component"
    },
    "type": "components"
  }
}
EOF
# Path parameters
export page_id="1234abcd-12ab-34cd-56ef-123456abcdef"

# Set your Datadog site and credentials
export DD_SITE="us2.ddog-gov.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/statuspages/${page_id}/components" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "name": "Logs",
      "position": 0,
      "type": "component"
    },
    "type": "components"
  }
}
EOF