List workflows
https://api.datadoghq.com/api/v2/workflowshttps://api.us3.datadoghq.com/api/v2/workflowshttps://api.us5.datadoghq.com/api/v2/workflowshttps://api.datadoghq.eu/api/v2/workflowshttps://api.ap1.datadoghq.com/api/v2/workflowshttps://api.ap2.datadoghq.com/api/v2/workflowshttps://api.uk1.datadoghq.com/api/v2/workflowshttps://api.ddog-gov.com/api/v2/workflowshttps://api.us2.ddog-gov.com/api/v2/workflowsOverview
List all workflows in your organization. This API requires a registered application key. Alternatively, you can configure these permissions in the UI.
Arguments
Query Strings
limitThe maximum number of workflows to return per page.
50pageThe page number to return, starting from 0.
0sortThe sort order for the returned workflows. Provide a comma-separated list of fields, each optionally prefixed with - for descending order. Supported fields are name, createdAt, updatedAt, creatorName, ownerName, and lastExecutedAt.
filter[query]A search query used to filter the returned workflows. The query performs a case-insensitive substring match against each workflow's name, creator name, and handle. If the query contains a colon (for example, team:infra), the query is treated as a key:value tag filter.
filter[triggerIds]Filters the returned workflows by one or more trigger types, such as monitor, schedule, or githubWebhook. To specify the multiple types, repeat this parameter.
filter[includeUnpublished]Whether to include unpublished workflows in the response.
falsefilter[includeSpecs]Whether to include the full spec of each workflow in the response. When false (the default), each workflow's spec is returned as null.
falseResponse
OK
The response object for a listing workflows request.
dataA list of workflows.
attributes [required]Attributes of a workflow returned in a list response.
createdAtWhen the workflow was created.
descriptionDescription of the workflow.
name [required]Name of the workflow.
publishedWhether the workflow is published. Unpublished workflows can only be run manually. Automatic triggers such as Schedule do not fire until the workflow is published.
runAsUserModeThe effective type of identity used to run the workflow.
owner, service_account, initiatorsensitivePrivilegesWhether the workflow requires sensitive privileges to run. Only the workflow owner can update this field. This allows it to run actions that use Execution Policies.
specA complete Workflow Automation definition, including its triggers, steps, and connections.
annotationsUp to 100 text annotations displayed on the workflow canvas.
display [required]The annotation's position and size on the workflow canvas.
boundsCanvas coordinates and dimensions for an annotation on the workflow canvas.
heightThe annotation's height on the canvas.
widthThe annotation's width on the canvas.
xThe annotation's horizontal canvas coordinate.
yThe annotation's vertical canvas coordinate.
id [required]The unique identifier of this annotation within the workflow.
markdownTextAnnotation [required]Markdown content displayed in an annotation.
textThe annotation's Markdown content.
connectionEnvsA list of connections or connection groups used in the workflow.
connectionGroupsThe ConnectionEnv connectionGroups.
connectionGroupId [required]The ConnectionGroup connectionGroupId.
label [required]The ConnectionGroup label.
tags [required]The ConnectionGroup tags.
connectionsThe ConnectionEnv connections.
connectionId [required]The Connection connectionId.
label [required]The Connection label.
env [required]The definition of ConnectionEnvEnv object.
defaulthandleUnique identifier used to trigger workflows automatically in Datadog.
inputSchemaA list of input parameters for the workflow. Input parameters are available under the Trigger object and can be referenced in workflow steps using {{ Trigger.<parameter_name> }}.
parametersThe InputSchema parameters.
allowExtraValuesThe InputSchemaParameters allowExtraValues.
allowedValuesThe InputSchemaParameters allowedValues.
defaultValueThe InputSchemaParameters defaultValue.
descriptionThe InputSchemaParameters description.
labelThe InputSchemaParameters label.
name [required]The InputSchemaParameters name.
type [required]The definition of InputSchemaParametersType object.
STRING, NUMBER, BOOLEAN, OBJECT, ARRAY_STRING, ARRAY_NUMBER, ARRAY_BOOLEAN, ARRAY_OBJECToutputSchemaA list of output parameters for the workflow.
parametersThe OutputSchema parameters.
defaultValueThe OutputSchemaParameters defaultValue.
descriptionThe OutputSchemaParameters description.
labelThe OutputSchemaParameters label.
name [required]The OutputSchemaParameters name.
type [required]The definition of OutputSchemaParametersType object.
STRING, NUMBER, BOOLEAN, OBJECT, ARRAY_STRING, ARRAY_NUMBER, ARRAY_BOOLEAN, ARRAY_OBJECTvalueThe OutputSchemaParameters value.
stepsA Step is a sub-component of a workflow. Each Step performs an action.
actionId [required]The unique identifier of an action.
completionGateUsed to create conditions before running subsequent actions.
completionCondition [required]The definition of CompletionCondition object.
operand1 [required]The CompletionCondition operand1.
operand2The CompletionCondition operand2.
operator [required]The definition of CompletionConditionOperator object.
OPERATOR_EQUAL, OPERATOR_NOT_EQUAL, OPERATOR_GREATER_THAN, OPERATOR_LESS_THAN, OPERATOR_GREATER_THAN_OR_EQUAL_TO, OPERATOR_LESS_THAN_OR_EQUAL_TO, OPERATOR_CONTAINS, OPERATOR_DOES_NOT_CONTAIN, OPERATOR_IS_NULL, OPERATOR_IS_NOT_NULLShow 2 more
OPERATOR_IS_EMPTY, OPERATOR_IS_NOT_EMPTYretryStrategy [required]The definition of RetryStrategy object.
kind [required]The definition of RetryStrategyKind object.
RETRY_STRATEGY_LINEARlinear [required]The definition of RetryStrategyLinear object.
interval [required]The RetryStrategyLinear interval. The expected format is the number of seconds ending with an s. For example, 1 day is 86400s
maxRetries [required]The RetryStrategyLinear maxRetries.
connectionLabelThe unique identifier of a connection defined in the spec.
displayThe position of a step on the workflow canvas. Omit display from every step to use
automatic layout, or provide it for every step to preserve a manual layout.
boundsThe definition of StepDisplayBounds object.
xThe bounds x.
yThe bounds y.
errorHandlersThe Step errorHandlers.
fallbackStepName [required]The ErrorHandler fallbackStepName.
retryStrategy [required]The definition of RetryStrategy object.
kind [required]The definition of RetryStrategyKind object.
RETRY_STRATEGY_LINEARlinear [required]The definition of RetryStrategyLinear object.
interval [required]The RetryStrategyLinear interval. The expected format is the number of seconds ending with an s. For example, 1 day is 86400s
maxRetries [required]The RetryStrategyLinear maxRetries.
name [required]Name of the step.
outboundEdgesA list of subsequent actions to run. This list is empty for a terminal step.
branchName [required]The OutboundEdge branchName.
nextStepName [required]The OutboundEdge nextStepName.
parametersA list of inputs for an action.
name [required]The Parameter name.
value [required]The Parameter value.
readinessGateUsed to merge multiple branches into a single branch.
thresholdType [required]The definition of ReadinessGateThresholdType object.
ANY, ALLtriggersThe list of triggers that activate this workflow. At least one trigger is required, and each trigger type may appear at most once.
Object 1Schema for an agent-based trigger.
agentTrigger [required]Trigger a workflow from an agent via the MCP execute tool. Workflow can be executed from Bits Chat, Bits Agent Builder, Claude Code, Codex, Cursor, and any other coding agent using the Datadog MCP.
rateLimitDefines a rate limit for a trigger.
countThe TriggerRateLimit count.
intervalThe TriggerRateLimit interval. The expected format is the number of seconds ending with an s. For example, 1 day is 86400s
startStepNamesNames of existing workflow steps that run first after a trigger fires.
Object 2Schema for an API-based trigger.
apiTrigger [required]Trigger a workflow from an API request. The workflow must be published.
rateLimitDefines a rate limit for a trigger.
countThe TriggerRateLimit count.
intervalThe TriggerRateLimit interval. The expected format is the number of seconds ending with an s. For example, 1 day is 86400s
startStepNamesNames of existing workflow steps that run first after a trigger fires.
Object 3Schema for an App-based trigger.
appTrigger [required]Trigger a workflow from an App.
startStepNamesNames of existing workflow steps that run first after a trigger fires.
Object 4Schema for a Case-based trigger.
caseTrigger [required]Trigger a workflow from a Case. For automatic triggering a handle must be configured and the workflow must be published.
rateLimitDefines a rate limit for a trigger.
countThe TriggerRateLimit count.
intervalThe TriggerRateLimit interval. The expected format is the number of seconds ending with an s. For example, 1 day is 86400s
startStepNamesNames of existing workflow steps that run first after a trigger fires.
Object 5Schema for a Change Event-based trigger.
changeEventTrigger [required]Trigger a workflow from a Change Event.
startStepNamesNames of existing workflow steps that run first after a trigger fires.
Object 6Schema for a Database Monitoring-based trigger.
databaseMonitoringTrigger [required]Trigger a workflow from Database Monitoring.
startStepNamesNames of existing workflow steps that run first after a trigger fires.
Object 7Schema for a Datastore-based trigger.
datastoreTrigger [required]Trigger a workflow from a Datastore. For automatic triggering a handle must be configured and the workflow must be published.
rateLimitDefines a rate limit for a trigger.
countThe TriggerRateLimit count.
intervalThe TriggerRateLimit interval. The expected format is the number of seconds ending with an s. For example, 1 day is 86400s
startStepNamesNames of existing workflow steps that run first after a trigger fires.
Object 8Schema for a Dashboard-based trigger.
dashboardTrigger [required]Trigger a workflow from a Dashboard.
startStepNamesNames of existing workflow steps that run first after a trigger fires.
Object 9Schema for a Form-based trigger.
formTrigger [required]Trigger a workflow from a Form.
formIdThe form UUID.
startStepNamesNames of existing workflow steps that run first after a trigger fires.
Object 10Schema for a GitHub webhook-based trigger.
githubWebhookTrigger [required]Trigger a workflow from a GitHub webhook. To trigger a workflow from GitHub, you must set a webhookSecret. In your GitHub Webhook Settings, set the Payload URL to "base_url"/api/v2/workflows/"workflow_id"/webhook?orgId="org_id", select application/json for the content type, and be highly recommend enabling SSL verification for security. The workflow must be published.
rateLimitDefines a rate limit for a trigger.
countThe TriggerRateLimit count.
intervalThe TriggerRateLimit interval. The expected format is the number of seconds ending with an s. For example, 1 day is 86400s
startStepNamesNames of existing workflow steps that run first after a trigger fires.
Object 11Schema for an incident declared trigger.
incidentCreatedTrigger [required]Trigger a workflow when an incident is declared.
incidentTypeThe type of incident that triggers the workflow.
tagConditionConditions that determine which incidents trigger the workflow.
tagValuesIncident tags and values used to filter matching incidents.
tag [required]The incident tag to match.
values [required]The accepted values for the incident tag.
startStepNamesNames of existing workflow steps that run first after a trigger fires.
Object 12Schema for an incident impact created trigger.
incidentImpactCreatedTrigger [required]Trigger a workflow when an impact is created for an incident.
executionLimitThe maximum number of times to execute a workflow for an incident.
count [required]The maximum number of workflow executions.
incidentTypeThe type of incident that triggers the workflow.
tagConditionConditions that determine which incidents trigger the workflow.
tagValuesIncident tags and values used to filter matching incidents.
tag [required]The incident tag to match.
values [required]The accepted values for the incident tag.
startStepNamesNames of existing workflow steps that run first after a trigger fires.
Object 13Schema for an incident impact updated trigger.
incidentImpactUpdatedTrigger [required]Trigger a workflow when an impact is updated for an incident.
executionLimitThe maximum number of times to execute a workflow for an incident.
count [required]The maximum number of workflow executions.
incidentTypeThe type of incident that triggers the workflow.
tagConditionConditions that determine which incidents trigger the workflow.
tagValuesIncident tags and values used to filter matching incidents.
tag [required]The incident tag to match.
values [required]The accepted values for the incident tag.
startStepNamesNames of existing workflow steps that run first after a trigger fires.
Object 14Schema for an incident postmortem updated trigger.
incidentPostmortemUpdatedTrigger [required]Trigger a workflow when a postmortem is updated for an incident.
executionLimitThe maximum number of times to execute a workflow for an incident.
count [required]The maximum number of workflow executions.
incidentTypeThe type of incident that triggers the workflow.
tagConditionConditions that determine which incidents trigger the workflow.
tagValuesIncident tags and values used to filter matching incidents.
tag [required]The incident tag to match.
values [required]The accepted values for the incident tag.
startStepNamesNames of existing workflow steps that run first after a trigger fires.
Object 15Schema for an incident responder created trigger.
incidentResponderCreatedTrigger [required]Trigger a workflow when a responder is created for an incident.
executionLimitThe maximum number of times to execute a workflow for an incident.
count [required]The maximum number of workflow executions.
incidentTypeThe type of incident that triggers the workflow.
tagConditionConditions that determine which incidents trigger the workflow.
tagValuesIncident tags and values used to filter matching incidents.
tag [required]The incident tag to match.
values [required]The accepted values for the incident tag.
startStepNamesNames of existing workflow steps that run first after a trigger fires.
Object 16Schema for an incident declared or updated trigger.
incidentSavedTrigger [required]Trigger a workflow when an incident is declared or updated.
executionLimitThe maximum number of times to execute a workflow for an incident.
count [required]The maximum number of workflow executions.
incidentTypeThe type of incident that triggers the workflow.
serialExecutionWhether to execute the workflow serially for an incident.
enabled [required]Whether serial execution is enabled.
tagConditionConditions that determine which incidents trigger the workflow.
tagValuesIncident tags and values used to filter matching incidents.
tag [required]The incident tag to match.
values [required]The accepted values for the incident tag.
startStepNamesNames of existing workflow steps that run first after a trigger fires.
Object 17Schema for an incident schedule trigger.
incidentScheduleTrigger [required]Trigger a workflow on a schedule for an incident.
incidentTypeThe type of incident that triggers the workflow.
rrule [required]The recurrence rule for the schedule, expressed as an iCalendar RRULE string.
tagConditionConditions that determine which incidents trigger the workflow.
tagValuesIncident tags and values used to filter matching incidents.
tag [required]The incident tag to match.
values [required]The accepted values for the incident tag.
startStepNamesNames of existing workflow steps that run first after a trigger fires.
Object 18Schema for an incident-based trigger.
incidentTrigger [required]Trigger a workflow from an incident. For automatic triggering a handle must be configured and the workflow must be published.
rateLimitDefines a rate limit for a trigger.
countThe TriggerRateLimit count.
intervalThe TriggerRateLimit interval. The expected format is the number of seconds ending with an s. For example, 1 day is 86400s
versionVersion of the incident manual trigger.
startStepNamesNames of existing workflow steps that run first after a trigger fires.
Object 19Schema for a Monitor-based trigger.
monitorTrigger [required]Trigger a workflow from a Monitor. For automatic triggering a handle must be configured and the workflow must be published.
rateLimitDefines a rate limit for a trigger.
countThe TriggerRateLimit count.
intervalThe TriggerRateLimit interval. The expected format is the number of seconds ending with an s. For example, 1 day is 86400s
startStepNamesNames of existing workflow steps that run first after a trigger fires.
Object 20Schema for a Notebook-based trigger.
notebookTrigger [required]Trigger a workflow from a Notebook.
startStepNamesNames of existing workflow steps that run first after a trigger fires.
Object 21Schema for an On-Call shift change trigger.
onCallShiftChangeTrigger [required]Trigger a workflow when an On-Call shift changes. The workflow must be published.
rateLimitDefines a rate limit for a trigger.
countThe TriggerRateLimit count.
intervalThe TriggerRateLimit interval. The expected format is the number of seconds ending with an s. For example, 1 day is 86400s
startStepNamesNames of existing workflow steps that run first after a trigger fires.
Object 22Schema for an On-Call-based trigger.
onCallTrigger [required]Trigger a workflow from an On-Call Page or On-Call Handover. For automatic triggering a handle must be configured and the workflow must be published.
rateLimitDefines a rate limit for a trigger.
countThe TriggerRateLimit count.
intervalThe TriggerRateLimit interval. The expected format is the number of seconds ending with an s. For example, 1 day is 86400s
startStepNamesNames of existing workflow steps that run first after a trigger fires.
Object 23Schema for a Schedule-based trigger.
scheduleTrigger [required]Trigger a workflow from a Schedule. The workflow must be published.
overlapBehaviorControls whether a scheduled workflow run may start while another instance is still running.
EXCLUSIVE_RUNEXCLUSIVE_RUN, OVERLAP_ALLOWEDrruleExpression [required]Recurrence rule expression for scheduling.
startStepNamesNames of existing workflow steps that run first after a trigger fires.
Object 24Schema for a Security-based trigger.
securityTrigger [required]Trigger a workflow from a Security Signal or Finding. For automatic triggering a handle must be configured and the workflow must be published.
rateLimitDefines a rate limit for a trigger.
countThe TriggerRateLimit count.
intervalThe TriggerRateLimit interval. The expected format is the number of seconds ending with an s. For example, 1 day is 86400s
startStepNamesNames of existing workflow steps that run first after a trigger fires.
Object 25Schema for a Self Service-based trigger.
selfServiceTrigger [required]Trigger a workflow from Self Service.
startStepNamesNames of existing workflow steps that run first after a trigger fires.
Object 26Schema for a Slack-based trigger.
slackTrigger [required]Trigger a workflow from Slack. The workflow must be published.
reactionTriggersSlack emoji reactions that trigger the workflow.
reactionEmoji [required]The Slack emoji reaction name.
teamId [required]The Slack workspace ID.
startStepNamesNames of existing workflow steps that run first after a trigger fires.
Object 27Schema for a Software Catalog-based trigger.
softwareCatalogTrigger [required]Trigger a workflow from Software Catalog.
startStepNamesNames of existing workflow steps that run first after a trigger fires.
Object 28Schema for a Workflow-based trigger.
startStepNamesNames of existing workflow steps that run first after a trigger fires.
workflowTrigger [required]Trigger a workflow from the Datadog UI. When present, this must be the workflow's only trigger.
tagsTags of the workflow.
updatedAtWhen the workflow was last updated.
idThe workflow identifier.
relationshipsThe definition of WorkflowDataRelationships object.
creatorThe definition of WorkflowUserRelationship object.
dataThe definition of WorkflowUserRelationshipData object.
id [required]The user identifier
type [required]The definition of WorkflowUserRelationshipType object.
usersownerThe definition of WorkflowUserRelationship object.
dataThe definition of WorkflowUserRelationshipData object.
id [required]The user identifier
type [required]The definition of WorkflowUserRelationshipType object.
usersrunAsThe service account used to run the workflow. Present when runAsUserMode is service_account.
dataThe definition of WorkflowUserRelationshipData object.
id [required]The user identifier
type [required]The definition of WorkflowUserRelationshipType object.
userstype [required]The definition of WorkflowDataType object.
workflowsmetaMetadata for a List Workflows response.
pagePagination metadata for a List Workflows response.
totalCountThe total number of workflows in the organization.
totalFilteredCountThe total number of workflows matching the applied filters.
{
"data": [
{
"attributes": {
"createdAt": "2019-09-19T10:00:00.000Z",
"description": "string",
"name": "My Workflow",
"published": false,
"runAsUserMode": "owner",
"sensitivePrivileges": false,
"spec": {
"annotations": [
{
"display": {
"bounds": {
"height": "number",
"width": "number",
"x": "number",
"y": "number"
}
},
"id": "",
"markdownTextAnnotation": {
"text": "string"
}
}
],
"connectionEnvs": [
{
"connectionGroups": [
{
"connectionGroupId": "",
"label": "",
"tags": [
""
]
}
],
"connections": [
{
"connectionId": "",
"label": ""
}
],
"env": "default"
}
],
"handle": "string",
"inputSchema": {
"parameters": [
{
"allowExtraValues": false,
"allowedValues": "undefined",
"defaultValue": "undefined",
"description": "string",
"label": "string",
"name": "",
"type": "STRING"
}
]
},
"outputSchema": {
"parameters": [
{
"defaultValue": "undefined",
"description": "string",
"label": "string",
"name": "",
"type": "STRING",
"value": "undefined"
}
]
},
"steps": [
{
"actionId": "",
"completionGate": {
"completionCondition": {
"operand1": "undefined",
"operand2": "undefined",
"operator": "OPERATOR_EQUAL"
},
"retryStrategy": {
"kind": "RETRY_STRATEGY_LINEAR",
"linear": {
"interval": "",
"maxRetries": 0
}
}
},
"connectionLabel": "string",
"display": {
"bounds": {
"x": "number",
"y": "number"
}
},
"errorHandlers": [
{
"fallbackStepName": "",
"retryStrategy": {
"kind": "RETRY_STRATEGY_LINEAR",
"linear": {
"interval": "",
"maxRetries": 0
}
}
}
],
"name": "",
"outboundEdges": [
{
"branchName": "main",
"nextStepName": "Step2"
}
],
"parameters": [
{
"name": "",
"value": "undefined"
}
],
"readinessGate": {
"thresholdType": "ANY"
}
}
],
"triggers": [
{
"agentTrigger": {
"rateLimit": {
"count": "integer",
"interval": "string"
}
},
"startStepNames": [
""
]
}
]
},
"tags": [],
"updatedAt": "2019-09-19T10:00:00.000Z"
},
"id": "string",
"relationships": {
"creator": {
"data": {
"id": "",
"type": "users"
}
},
"owner": {
"data": {
"id": "",
"type": "users"
}
},
"runAs": {
"data": {
"id": "",
"type": "users"
}
}
},
"type": "workflows"
}
],
"meta": {
"page": {
"totalCount": "integer",
"totalFilteredCount": "integer"
}
}
}Bad Request
API error response.
errors [required]A list of errors.
{
"errors": [
"Bad Request"
]
}Forbidden
API error response.
errors [required]A list of errors.
{
"errors": [
"Bad Request"
]
}Too many requests
API error response.
errors [required]A list of errors.
{
"errors": [
"Bad Request"
]
}Code Example
# 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 GET "https://api.${DD_SITE}/api/v2/workflows" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# 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 GET "https://api.${DD_SITE}/api/v2/workflows" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# 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 GET "https://api.${DD_SITE}/api/v2/workflows" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# 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 GET "https://api.${DD_SITE}/api/v2/workflows" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# 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 GET "https://api.${DD_SITE}/api/v2/workflows" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# 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 GET "https://api.${DD_SITE}/api/v2/workflows" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# 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 GET "https://api.${DD_SITE}/api/v2/workflows" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# 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 GET "https://api.${DD_SITE}/api/v2/workflows" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# 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 GET "https://api.${DD_SITE}/api/v2/workflows" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"// List workflows 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())
ctx = context.WithValue(ctx, datadog.ContextAccessToken, os.Getenv("DD_BEARER_TOKEN"))
configuration := datadog.NewConfiguration()
apiClient := datadog.NewAPIClient(configuration)
api := datadogV2.NewWorkflowAutomationApi(apiClient)
resp, r, err := api.ListWorkflows(ctx, *datadogV2.NewListWorkflowsOptionalParameters())
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `WorkflowAutomationApi.ListWorkflows`: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
responseContent, _ := json.MarshalIndent(resp, "", " ")
fmt.Fprintf(os.Stdout, "Response from `WorkflowAutomationApi.ListWorkflows`:\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.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" go run "main.go"DD_SITE="us3.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" go run "main.go"DD_SITE="us5.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" go run "main.go"DD_SITE="datadoghq.eu" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" go run "main.go"DD_SITE="ap1.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" go run "main.go"DD_SITE="ap2.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" go run "main.go"DD_SITE="uk1.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" go run "main.go"DD_SITE="ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" go run "main.go"DD_SITE="us2.ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" go run "main.go"// List workflows returns "OK" response
import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.WorkflowAutomationApi;
import com.datadog.api.client.v2.model.ListWorkflowsResponse;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN"));
WorkflowAutomationApi apiInstance = new WorkflowAutomationApi(defaultClient);
try {
ListWorkflowsResponse result = apiInstance.listWorkflows();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling WorkflowAutomationApi#listWorkflows");
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.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" java "Example.java"DD_SITE="us3.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" java "Example.java"DD_SITE="us5.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" java "Example.java"DD_SITE="datadoghq.eu" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" java "Example.java"DD_SITE="ap1.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" java "Example.java"DD_SITE="ap2.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" java "Example.java"DD_SITE="uk1.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" java "Example.java"DD_SITE="ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" java "Example.java"DD_SITE="us2.ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" java "Example.java""""
List workflows returns "OK" response
"""
from os import environ
from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.workflow_automation_api import WorkflowAutomationApi
configuration = Configuration()
configuration.access_token = environ["DD_BEARER_TOKEN"]
with ApiClient(configuration) as api_client:
api_instance = WorkflowAutomationApi(api_client)
response = api_instance.list_workflows()
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.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" python3 "example.py"DD_SITE="us3.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" python3 "example.py"DD_SITE="us5.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" python3 "example.py"DD_SITE="datadoghq.eu" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" python3 "example.py"DD_SITE="ap1.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" python3 "example.py"DD_SITE="ap2.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" python3 "example.py"DD_SITE="uk1.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" python3 "example.py"DD_SITE="ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" python3 "example.py"DD_SITE="us2.ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" python3 "example.py"# List workflows returns "OK" response
require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.access_token = ENV["DD_BEARER_TOKEN"]
end
api_instance = DatadogAPIClient::V2::WorkflowAutomationAPI.new
p api_instance.list_workflows()
Instructions
First install the library and its dependencies and then save the example to example.rb and run following commands:
DD_SITE="datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" rb "example.rb"DD_SITE="us3.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" rb "example.rb"DD_SITE="us5.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" rb "example.rb"DD_SITE="datadoghq.eu" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" rb "example.rb"DD_SITE="ap1.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" rb "example.rb"DD_SITE="ap2.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" rb "example.rb"DD_SITE="uk1.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" rb "example.rb"DD_SITE="ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" rb "example.rb"DD_SITE="us2.ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" rb "example.rb"// List workflows returns "OK" response
use datadog_api_client::datadog;
use datadog_api_client::datadogV2::api_workflow_automation::ListWorkflowsOptionalParams;
use datadog_api_client::datadogV2::api_workflow_automation::WorkflowAutomationAPI;
#[tokio::main]
async fn main() {
let configuration = datadog::Configuration::new();
let api = WorkflowAutomationAPI::with_config(configuration);
let resp = api
.list_workflows(ListWorkflowsOptionalParams::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.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" cargo runDD_SITE="us3.datadoghq.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" cargo runDD_SITE="us5.datadoghq.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" cargo runDD_SITE="datadoghq.eu" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" cargo runDD_SITE="ap1.datadoghq.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" cargo runDD_SITE="ap2.datadoghq.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" cargo runDD_SITE="uk1.datadoghq.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" cargo runDD_SITE="ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" cargo runDD_SITE="us2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" cargo run/**
* List workflows returns "OK" response
*/
import { client, v2 } from "@datadog/datadog-api-client";
const configuration = client.createConfiguration({
authMethods: {
AuthZ: {
accessToken: process.env.DD_BEARER_TOKEN as string,
},
},
});
const apiInstance = new v2.WorkflowAutomationApi(configuration);
apiInstance
.listWorkflows()
.then((data: v2.ListWorkflowsResponse) => {
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.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" tsc "example.ts"DD_SITE="us3.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" tsc "example.ts"DD_SITE="us5.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" tsc "example.ts"DD_SITE="datadoghq.eu" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" tsc "example.ts"DD_SITE="ap1.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" tsc "example.ts"DD_SITE="ap2.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" tsc "example.ts"DD_SITE="uk1.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" tsc "example.ts"DD_SITE="ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" tsc "example.ts"DD_SITE="us2.ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" tsc "example.ts"