workflows
Creates, updates, deletes, gets or lists a workflows resource.
Overview
| Name | workflows |
| Type | Resource |
| Id | datadog.software_delivery.workflows |
Fields
The following fields are returned by SELECT queries:
- get_workflow
- list_workflows
Successfully got a workflow.
| Name | Datatype | Description |
|---|---|---|
id | string | The workflow identifier |
attributes | object | The definition of WorkflowDataAttributes object. |
relationships | object | The definition of WorkflowDataRelationships object. |
type | string | The definition of WorkflowDataType object. (workflows) (example: workflows) |
| Name | Datatype | Description |
|---|---|---|
id | string | The workflow identifier. |
attributes | object | Attributes of a workflow returned in a list response. |
relationships | object | The definition of WorkflowDataRelationships object. |
type | string | The definition of WorkflowDataType object. (workflows) (example: workflows) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_workflow | select | workflow_id | Get a workflow by ID. This API requires a [registered application key](https://docs.datadoghq.com/api/latest/action-connection/#register-a-new-app-key). Alternatively, you can configure these permissions [in the UI](https://docs.datadoghq.com/account_management/api-app-keys/#actions-api-access). | |
list_workflows | select | limit, page, sort, filter[query], filter[trigger_ids], filter[include_unpublished], filter[include_specs] | List all workflows in your organization. This API requires a [registered application key](https://docs.datadoghq.com/api/latest/action-connection/#register-a-new-app-key). Alternatively, you can configure these permissions [in the UI](https://docs.datadoghq.com/account_management/api-app-keys/#actions-api-access). | |
create_workflow | insert | data | Create a new workflow, returning the workflow ID. This API requires a [registered application key](https://docs.datadoghq.com/api/latest/action-connection/#register-a-new-app-key). Alternatively, you can configure these permissions [in the UI](https://docs.datadoghq.com/account_management/api-app-keys/#actions-api-access). | |
update_workflow | update | workflow_id, data | Update a workflow by ID. This API requires a [registered application key](https://docs.datadoghq.com/api/latest/action-connection/#register-a-new-app-key). Alternatively, you can configure these permissions [in the UI](https://docs.datadoghq.com/account_management/api-app-keys/#actions-api-access). | |
delete_workflow | delete | workflow_id | Delete a workflow by ID. This API requires a [registered application key](https://docs.datadoghq.com/api/latest/action-connection/#register-a-new-app-key). Alternatively, you can configure these permissions [in the UI](https://docs.datadoghq.com/account_management/api-app-keys/#actions-api-access). |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
site | string | The Datadog site (region) for your organization, for example datadoghq.com, us3.datadoghq.com, us5.datadoghq.com, ap1.datadoghq.com, ap2.datadoghq.com, datadoghq.eu, ddog-gov.com. Resolved from the DD_SITE environment variable when set. Optional: defaults to datadoghq.com, or the value of the DD_SITE environment variable when set; a WHERE value overrides both. |
workflow_id | string | The ID of the workflow. |
filter[include_specs] | boolean | Whether to include the full spec of each workflow in the response. When false (the default), each workflow's spec is returned as null. (wire: filter[includeSpecs]) |
filter[include_unpublished] | boolean | Whether to include unpublished workflows in the response. (wire: filter[includeUnpublished]) |
filter[query] | string | 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. (example: deploy) |
filter[trigger_ids] | array | Filters the returned workflows by one or more trigger types, such as monitor, schedule, or githubWebhook. To specify the multiple types, repeat this parameter. (example: [monitor]) (wire: filter[triggerIds]) |
limit | integer (int64) | The maximum number of workflows to return per page. (example: 50) |
page | integer (int64) | The page number to return, starting from 0. (example: 0) |
sort | string | The 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. (example: -updatedAt) |
SELECT examples
- get_workflow
- list_workflows
Get a workflow by ID. This API requires a registered application key. Alternatively, you can configure these permissions in the UI.
SELECT
id,
attributes,
relationships,
type
FROM datadog.software_delivery.workflows
WHERE workflow_id = '{{ workflow_id }}' -- required
;
List all workflows in your organization. This API requires a registered application key. Alternatively, you can configure these permissions in the UI.
SELECT
id,
attributes,
relationships,
type
FROM datadog.software_delivery.workflows
WHERE limit = '{{ limit }}'
AND page = '{{ page }}'
AND sort = '{{ sort }}'
AND filter[query] = '{{ filter[query] }}'
AND filter[trigger_ids] = '{{ filter[trigger_ids] }}'
AND filter[include_unpublished] = '{{ filter[include_unpublished] }}'
AND filter[include_specs] = '{{ filter[include_specs] }}'
;
INSERT examples
- create_workflow
- Manifest
Create a new workflow, returning the workflow ID. This API requires a registered application key. Alternatively, you can configure these permissions in the UI.
INSERT INTO datadog.software_delivery.workflows (
data
)
SELECT
'{{ data }}' /* required */
RETURNING
data
;
# Description fields are for documentation purposes
- name: workflows
props:
- name: data
description: |
Data related to the workflow.
value:
attributes:
createdAt: "{{ createdAt }}"
description: "{{ description }}"
name: "{{ name }}"
published: {{ published }}
spec:
annotations:
- display:
bounds: "{{ bounds }}"
id: "{{ id }}"
markdownTextAnnotation:
text: "{{ text }}"
connectionEnvs:
- connectionGroups: "{{ connectionGroups }}"
connections: "{{ connections }}"
env: "{{ env }}"
handle: "{{ handle }}"
inputSchema:
parameters:
- allowExtraValues: {{ allowExtraValues }}
allowedValues: "{{ allowedValues }}"
defaultValue: "{{ defaultValue }}"
description: "{{ description }}"
label: "{{ label }}"
name: "{{ name }}"
type: "{{ type }}"
outputSchema:
parameters:
- defaultValue: "{{ defaultValue }}"
description: "{{ description }}"
label: "{{ label }}"
name: "{{ name }}"
type: "{{ type }}"
value: "{{ value }}"
steps:
- actionId: "{{ actionId }}"
completionGate:
completionCondition: "{{ completionCondition }}"
retryStrategy: "{{ retryStrategy }}"
connectionLabel: "{{ connectionLabel }}"
display:
bounds: "{{ bounds }}"
errorHandlers: "{{ errorHandlers }}"
name: "{{ name }}"
outboundEdges: "{{ outboundEdges }}"
parameters: "{{ parameters }}"
readinessGate:
thresholdType: "{{ thresholdType }}"
triggers:
- agentTrigger:
rateLimit: "{{ rateLimit }}"
startStepNames: "{{ startStepNames }}"
apiTrigger:
rateLimit: "{{ rateLimit }}"
appTrigger: "{{ appTrigger }}"
caseTrigger:
rateLimit: "{{ rateLimit }}"
changeEventTrigger: "{{ changeEventTrigger }}"
databaseMonitoringTrigger: "{{ databaseMonitoringTrigger }}"
datastoreTrigger:
rateLimit: "{{ rateLimit }}"
dashboardTrigger: "{{ dashboardTrigger }}"
formTrigger:
formId: "{{ formId }}"
githubWebhookTrigger:
rateLimit: "{{ rateLimit }}"
incidentTrigger:
rateLimit: "{{ rateLimit }}"
monitorTrigger:
rateLimit: "{{ rateLimit }}"
notebookTrigger: "{{ notebookTrigger }}"
onCallTrigger:
rateLimit: "{{ rateLimit }}"
scheduleTrigger:
overlapBehavior: "{{ overlapBehavior }}"
rruleExpression: "{{ rruleExpression }}"
securityTrigger:
rateLimit: "{{ rateLimit }}"
selfServiceTrigger: "{{ selfServiceTrigger }}"
slackTrigger: "{{ slackTrigger }}"
softwareCatalogTrigger: "{{ softwareCatalogTrigger }}"
workflowTrigger: "{{ workflowTrigger }}"
tags:
- "{{ tags }}"
updatedAt: "{{ updatedAt }}"
webhookSecret: "{{ webhookSecret }}"
id: "{{ id }}"
relationships:
creator:
data:
id: "{{ id }}"
type: "{{ type }}"
owner:
data:
id: "{{ id }}"
type: "{{ type }}"
type: "{{ type }}"
UPDATE examples
- update_workflow
Update a workflow by ID. This API requires a registered application key. Alternatively, you can configure these permissions in the UI.
UPDATE datadog.software_delivery.workflows
SET
data = '{{ data }}'
WHERE
workflow_id = '{{ workflow_id }}' --required
AND data = '{{ data }}' --required
RETURNING
data;
DELETE examples
- delete_workflow
Delete a workflow by ID. This API requires a registered application key. Alternatively, you can configure these permissions in the UI.
DELETE FROM datadog.software_delivery.workflows
WHERE workflow_id = '{{ workflow_id }}' --required
;