Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
195 changes: 195 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55232,6 +55232,35 @@ components:
required:
- data
type: object
ListWorkflowsResponse:
description: The response object for a listing workflows request.
properties:
data:
description: A list of workflows.
items:
$ref: "#/components/schemas/WorkflowListItem"
type: array
meta:
$ref: "#/components/schemas/ListWorkflowsResponseMeta"
type: object
ListWorkflowsResponseMeta:
description: Metadata for a List Workflows response.
properties:
page:
$ref: "#/components/schemas/ListWorkflowsResponseMetaPage"
type: object
ListWorkflowsResponseMetaPage:
description: Pagination metadata for a List Workflows response.
properties:
totalCount:
description: The total number of workflows in the organization.
format: int64
type: integer
totalFilteredCount:
description: The total number of workflows matching the applied filters.
format: int64
type: integer
type: object
Log:
description: Object description of a log after being processed and stored by Datadog.
properties:
Expand Down Expand Up @@ -106572,6 +106601,58 @@ components:
format: int64
type: integer
type: object
WorkflowListItem:
description: A workflow returned by the list workflows endpoint.
properties:
attributes:
$ref: "#/components/schemas/WorkflowListItemAttributes"
id:
description: The workflow identifier.
readOnly: true
type: string
relationships:
$ref: "#/components/schemas/WorkflowDataRelationships"
type:
$ref: "#/components/schemas/WorkflowDataType"
required:
- type
- attributes
type: object
WorkflowListItemAttributes:
description: Attributes of a workflow returned in a list response.
properties:
createdAt:
description: When the workflow was created.
format: date-time
readOnly: true
type: string
description:
description: Description of the workflow.
type: string
name:
description: Name of the workflow.
example: "My Workflow"
type: string
published:
description: Whether the workflow is published. Unpublished workflows can only be run manually. Automatic triggers such as Schedule do not fire until the workflow is published.
type: boolean
spec:
$ref: "#/components/schemas/Spec"
nullable: true
tags:
description: Tags of the workflow.
items:
description: A tag string in `key:value` format.
type: string
type: array
updatedAt:
description: When the workflow was last updated.
format: date-time
readOnly: true
type: string
required:
- name
type: object
WorkflowTriggerWrapper:
description: "Schema for a Workflow-based trigger."
properties:
Expand Down Expand Up @@ -188773,6 +188854,120 @@ paths:
- manage_log_reports
- product_analytics_saved_widgets_write
/api/v2/workflows:
get:
description: 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).
operationId: ListWorkflows
parameters:
- description: The maximum number of workflows to return per page.
example: 50
in: query
name: limit
required: false
schema:
default: 50
format: int64
type: integer
- description: The page number to return, starting from 0.
example: 0
in: query
name: page
required: false
schema:
default: 0
format: int64
type: integer
- description: "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"
in: query
name: sort
required: false
schema:
type: string
- description: "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
in: query
name: filter[query]
required: false
schema:
type: string
- description: 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
explode: true
in: query
name: filter[triggerIds]
required: false
schema:
items:
type: string
type: array
- description: Whether to include unpublished workflows in the response.
in: query
name: filter[includeUnpublished]
required: false
schema:
default: false
type: boolean
- description: Whether to include the full spec of each workflow in the response. When `false` (the default), each workflow's `spec` is returned as `null`.
in: query
name: filter[includeSpecs]
required: false
schema:
default: false
type: boolean
responses:
"200":
content:
application/json:
examples:
default:
value:
data:
- attributes:
createdAt: "2024-01-01T00:00:00+00:00"
description: A sample workflow.
name: Example Workflow
published: true
spec: {}
tags:
- team:infra
updatedAt: "2024-01-01T00:00:00+00:00"
id: 00000000-0000-0000-0000-000000000002
relationships:
creator:
data:
id: 00000000-0000-0000-0000-000000000009
type: users
owner:
data:
id: 00000000-0000-0000-0000-000000000009
type: users
type: workflows
meta:
page:
totalCount: 1
totalFilteredCount: 1
schema:
$ref: "#/components/schemas/ListWorkflowsResponse"
description: OK
"400":
$ref: "#/components/responses/BadRequestResponse"
"403":
$ref: "#/components/responses/ForbiddenResponse"
"429":
$ref: "#/components/responses/TooManyRequestsResponse"
summary: List workflows
tags:
- Workflow Automation
x-pagination:
limitParam: limit
pageParam: page
pageStart: 0
resultsPath: data
"x-permission":
operator: OR
permissions:
- workflows_read
post:
description: 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).
operationId: CreateWorkflow
Expand Down
35 changes: 35 additions & 0 deletions docs/datadog_api_client.v2.model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20304,6 +20304,27 @@ datadog\_api\_client.v2.model.list\_vulnerable\_assets\_response module
:members:
:show-inheritance:

datadog\_api\_client.v2.model.list\_workflows\_response module
--------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.list_workflows_response
:members:
:show-inheritance:

datadog\_api\_client.v2.model.list\_workflows\_response\_meta module
--------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.list_workflows_response_meta
:members:
:show-inheritance:

datadog\_api\_client.v2.model.list\_workflows\_response\_meta\_page module
--------------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.list_workflows_response_meta_page
:members:
:show-inheritance:

datadog\_api\_client.v2.model.llm\_obs\_annotated\_interaction\_by\_trace\_item module
--------------------------------------------------------------------------------------

Expand Down Expand Up @@ -45917,6 +45938,20 @@ datadog\_api\_client.v2.model.workflow\_list\_instances\_response\_meta\_page mo
:members:
:show-inheritance:

datadog\_api\_client.v2.model.workflow\_list\_item module
---------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.workflow_list_item
:members:
:show-inheritance:

datadog\_api\_client.v2.model.workflow\_list\_item\_attributes module
---------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.workflow_list_item_attributes
:members:
:show-inheritance:

datadog\_api\_client.v2.model.workflow\_trigger\_wrapper module
---------------------------------------------------------------

Expand Down
13 changes: 13 additions & 0 deletions examples/v2/workflow-automation/ListWorkflows.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
"""
List workflows returns "OK" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.workflow_automation_api import WorkflowAutomationApi

configuration = Configuration()
with ApiClient(configuration) as api_client:
api_instance = WorkflowAutomationApi(api_client)
response = api_instance.list_workflows()

print(response)
16 changes: 16 additions & 0 deletions examples/v2/workflow-automation/ListWorkflows_71111569.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
"""
List workflows returns "OK" response with pagination
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.workflow_automation_api import WorkflowAutomationApi

configuration = Configuration()
with ApiClient(configuration) as api_client:
api_instance = WorkflowAutomationApi(api_client)
items = api_instance.list_workflows_with_pagination(
limit=2,
filter_query="Example-Workflow-Automation",
)
for item in items:
print(item)
Loading
Loading