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

Créer un modèle post-mortem

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/incidents/config/postmortem-templateshttps://api.us3.datadoghq.com/api/v2/incidents/config/postmortem-templateshttps://api.us5.datadoghq.com/api/v2/incidents/config/postmortem-templateshttps://api.datadoghq.eu/api/v2/incidents/config/postmortem-templateshttps://api.ap1.datadoghq.com/api/v2/incidents/config/postmortem-templateshttps://api.ap2.datadoghq.com/api/v2/incidents/config/postmortem-templateshttps://api.uk1.datadoghq.com/api/v2/incidents/config/postmortem-templateshttps://api.ddog-gov.com/api/v2/incidents/config/postmortem-templateshttps://api.us2.ddog-gov.com/api/v2/incidents/config/postmortem-templates

Présentation

Créez un nouveau modèle de postmortem pour les incidents.

Requête

Body Data (required)

Champ
Type
Description
data [required]
object

Réponse

Created

Response containing a single postmortem template.

Champ
Type
Description
data [required]
object

Data object for a postmortem template returned in a response.

Exemple de code

Créer un modèle post-mortem
# 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/incidents/config/postmortem-templates" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "content": "# Overview\n\n# What Happened\n\n# Timeline\n\n# Action Items",
      "name": "Standard Postmortem Template"
    },
    "relationships": {
      "incident_type": {
        "data": {
          "id": "00000000-0000-0000-0000-000000000009",
          "type": "incident_types"
        }
      }
    },
    "type": "postmortem_templates"
  }
}
EOF
# 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/incidents/config/postmortem-templates" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "content": "# Overview\n\n# What Happened\n\n# Timeline\n\n# Action Items",
      "name": "Standard Postmortem Template"
    },
    "relationships": {
      "incident_type": {
        "data": {
          "id": "00000000-0000-0000-0000-000000000009",
          "type": "incident_types"
        }
      }
    },
    "type": "postmortem_templates"
  }
}
EOF
# 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/incidents/config/postmortem-templates" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "content": "# Overview\n\n# What Happened\n\n# Timeline\n\n# Action Items",
      "name": "Standard Postmortem Template"
    },
    "relationships": {
      "incident_type": {
        "data": {
          "id": "00000000-0000-0000-0000-000000000009",
          "type": "incident_types"
        }
      }
    },
    "type": "postmortem_templates"
  }
}
EOF
# 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/incidents/config/postmortem-templates" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "content": "# Overview\n\n# What Happened\n\n# Timeline\n\n# Action Items",
      "name": "Standard Postmortem Template"
    },
    "relationships": {
      "incident_type": {
        "data": {
          "id": "00000000-0000-0000-0000-000000000009",
          "type": "incident_types"
        }
      }
    },
    "type": "postmortem_templates"
  }
}
EOF
# 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/incidents/config/postmortem-templates" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "content": "# Overview\n\n# What Happened\n\n# Timeline\n\n# Action Items",
      "name": "Standard Postmortem Template"
    },
    "relationships": {
      "incident_type": {
        "data": {
          "id": "00000000-0000-0000-0000-000000000009",
          "type": "incident_types"
        }
      }
    },
    "type": "postmortem_templates"
  }
}
EOF
# 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/incidents/config/postmortem-templates" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "content": "# Overview\n\n# What Happened\n\n# Timeline\n\n# Action Items",
      "name": "Standard Postmortem Template"
    },
    "relationships": {
      "incident_type": {
        "data": {
          "id": "00000000-0000-0000-0000-000000000009",
          "type": "incident_types"
        }
      }
    },
    "type": "postmortem_templates"
  }
}
EOF
# 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/incidents/config/postmortem-templates" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "content": "# Overview\n\n# What Happened\n\n# Timeline\n\n# Action Items",
      "name": "Standard Postmortem Template"
    },
    "relationships": {
      "incident_type": {
        "data": {
          "id": "00000000-0000-0000-0000-000000000009",
          "type": "incident_types"
        }
      }
    },
    "type": "postmortem_templates"
  }
}
EOF
# 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/incidents/config/postmortem-templates" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "content": "# Overview\n\n# What Happened\n\n# Timeline\n\n# Action Items",
      "name": "Standard Postmortem Template"
    },
    "relationships": {
      "incident_type": {
        "data": {
          "id": "00000000-0000-0000-0000-000000000009",
          "type": "incident_types"
        }
      }
    },
    "type": "postmortem_templates"
  }
}
EOF
# 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/incidents/config/postmortem-templates" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "content": "# Overview\n\n# What Happened\n\n# Timeline\n\n# Action Items",
      "name": "Standard Postmortem Template"
    },
    "relationships": {
      "incident_type": {
        "data": {
          "id": "00000000-0000-0000-0000-000000000009",
          "type": "incident_types"
        }
      }
    },
    "type": "postmortem_templates"
  }
}
EOF