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

Create a change request branch

WARNINGNote: This endpoint is in preview and is subject to change. If you have any feedback, contact Datadog support.
POSThttps://api.datadoghq.com/api/v2/change-management/change-request/{change_request_id}/branchhttps://api.us3.datadoghq.com/api/v2/change-management/change-request/{change_request_id}/branchhttps://api.us5.datadoghq.com/api/v2/change-management/change-request/{change_request_id}/branchhttps://api.datadoghq.eu/api/v2/change-management/change-request/{change_request_id}/branchhttps://api.ap1.datadoghq.com/api/v2/change-management/change-request/{change_request_id}/branchhttps://api.ap2.datadoghq.com/api/v2/change-management/change-request/{change_request_id}/branchhttps://api.uk1.datadoghq.com/api/v2/change-management/change-request/{change_request_id}/branchhttps://api.ddog-gov.com/api/v2/change-management/change-request/{change_request_id}/branchhttps://api.us2.ddog-gov.com/api/v2/change-management/change-request/{change_request_id}/branch

Overview

Create a new branch in a repository for a change request.

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

Arguments

Path Parameters

Name
Type
Description
change_request_id [required]
string

The identifier of the change request.

Request

Body Data (required)

Branch creation payload.

Field
Type
Description
data [required]
object

Data object to create a change request branch.

Response

OK

Response object for a change request.

Field
Type
Description
data [required]
object

Data object for a change request response.

included
[<oneOf>]

Included resources related to the change request.

Code Example

# Path parameters
export change_request_id="CHM-1234"

# 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/change-management/change-request/${change_request_id}/branch" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "branch_name": "chm/CHM-1234",
      "repo_id": "DataDog/test-repo"
    },
    "type": "change_request_branch"
  }
}
EOF
# Path parameters
export change_request_id="CHM-1234"

# 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/change-management/change-request/${change_request_id}/branch" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "branch_name": "chm/CHM-1234",
      "repo_id": "DataDog/test-repo"
    },
    "type": "change_request_branch"
  }
}
EOF
# Path parameters
export change_request_id="CHM-1234"

# 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/change-management/change-request/${change_request_id}/branch" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "branch_name": "chm/CHM-1234",
      "repo_id": "DataDog/test-repo"
    },
    "type": "change_request_branch"
  }
}
EOF
# Path parameters
export change_request_id="CHM-1234"

# 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/change-management/change-request/${change_request_id}/branch" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "branch_name": "chm/CHM-1234",
      "repo_id": "DataDog/test-repo"
    },
    "type": "change_request_branch"
  }
}
EOF
# Path parameters
export change_request_id="CHM-1234"

# 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/change-management/change-request/${change_request_id}/branch" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "branch_name": "chm/CHM-1234",
      "repo_id": "DataDog/test-repo"
    },
    "type": "change_request_branch"
  }
}
EOF
# Path parameters
export change_request_id="CHM-1234"

# 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/change-management/change-request/${change_request_id}/branch" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "branch_name": "chm/CHM-1234",
      "repo_id": "DataDog/test-repo"
    },
    "type": "change_request_branch"
  }
}
EOF
# Path parameters
export change_request_id="CHM-1234"

# 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/change-management/change-request/${change_request_id}/branch" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "branch_name": "chm/CHM-1234",
      "repo_id": "DataDog/test-repo"
    },
    "type": "change_request_branch"
  }
}
EOF
# Path parameters
export change_request_id="CHM-1234"

# 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/change-management/change-request/${change_request_id}/branch" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "branch_name": "chm/CHM-1234",
      "repo_id": "DataDog/test-repo"
    },
    "type": "change_request_branch"
  }
}
EOF
# Path parameters
export change_request_id="CHM-1234"

# 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/change-management/change-request/${change_request_id}/branch" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "branch_name": "chm/CHM-1234",
      "repo_id": "DataDog/test-repo"
    },
    "type": "change_request_branch"
  }
}
EOF