arazzo: 1.0.1
info:
title: Datadog Resolve an Incident
summary: Retrieve an incident then update its state to resolved.
description: >-
Closes out a Datadog incident by first retrieving its current details to
confirm it exists and capture its present state, and then updating the
incident to transition its state to resolved, which records the resolution
time. Every step spells out its request inline so the flow can be read and
executed without opening the underlying OpenAPI description.
version: 1.0.0
sourceDescriptions:
- name: existingApi
url: ../openapi/datadog-existing-api-openapi.yml
type: openapi
- name: getApi
url: ../openapi/datadog-get-api-openapi.yml
type: openapi
workflows:
- workflowId: resolve-incident
summary: Get an incident then update its state to resolved.
description: >-
Fetches the incident by id to confirm it exists, then patches its state to
resolved to mark the incident closed.
inputs:
type: object
required:
- incidentId
properties:
incidentId:
type: string
description: The unique identifier of the incident to resolve.
steps:
- stepId: getIncident
description: >-
Retrieve the incident details by id to confirm it exists and capture its
current state before resolving.
operationId: $sourceDescriptions.getApi.GetIncident
parameters:
- name: incident_id
in: path
value: $inputs.incidentId
successCriteria:
- condition: $statusCode == 200
outputs:
incidentId: $response.body#/data/id
currentState: $response.body#/data/attributes/state
- stepId: resolveIncident
description: >-
Update the incident state to resolved, which records the resolution time
and marks the incident closed.
operationId: $sourceDescriptions.existingApi.UpdateIncident
parameters:
- name: incident_id
in: path
value: $steps.getIncident.outputs.incidentId
requestBody:
contentType: application/json
payload:
data:
id: $steps.getIncident.outputs.incidentId
type: incidents
attributes:
state: resolved
successCriteria:
- condition: $statusCode == 200
outputs:
incidentId: $response.body#/data/id
state: $response.body#/data/attributes/state
outputs:
incidentId: $steps.resolveIncident.outputs.incidentId
state: $steps.resolveIncident.outputs.state
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. By signing up you are subscribing to the APIs.io and API Evangelist
newsletters — you can unsubscribe from any issue. See our
Privacy Policy and Terms.