Skip to content

Commit 940e1ed

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 2bc9bee of spec repo
1 parent 6d40c6d commit 940e1ed

17 files changed

Lines changed: 919 additions & 1 deletion

.generator/schemas/v2/openapi.yaml

Lines changed: 195 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50104,6 +50104,35 @@ components:
5010450104
required:
5010550105
- data
5010650106
type: object
50107+
ListWorkflowsResponse:
50108+
description: The response object after listing workflows.
50109+
properties:
50110+
data:
50111+
description: A list of workflows.
50112+
items:
50113+
$ref: "#/components/schemas/WorkflowListItem"
50114+
type: array
50115+
meta:
50116+
$ref: "#/components/schemas/ListWorkflowsResponseMeta"
50117+
type: object
50118+
ListWorkflowsResponseMeta:
50119+
description: Metadata about the list workflows response.
50120+
properties:
50121+
page:
50122+
$ref: "#/components/schemas/ListWorkflowsResponseMetaPage"
50123+
type: object
50124+
ListWorkflowsResponseMetaPage:
50125+
description: Page information for the list workflows response.
50126+
properties:
50127+
totalCount:
50128+
description: The total number of workflows.
50129+
format: int64
50130+
type: integer
50131+
totalFilteredCount:
50132+
description: The total number of workflows matching the applied filters.
50133+
format: int64
50134+
type: integer
50135+
type: object
5010750136
Log:
5010850137
description: Object description of a log after being processed and stored by Datadog.
5010950138
properties:
@@ -96465,6 +96494,58 @@ components:
9646596494
format: int64
9646696495
type: integer
9646796496
type: object
96497+
WorkflowListItem:
96498+
description: A workflow returned by the list workflows endpoint.
96499+
properties:
96500+
attributes:
96501+
$ref: "#/components/schemas/WorkflowListItemAttributes"
96502+
id:
96503+
description: The workflow identifier
96504+
readOnly: true
96505+
type: string
96506+
relationships:
96507+
$ref: "#/components/schemas/WorkflowDataRelationships"
96508+
type:
96509+
$ref: "#/components/schemas/WorkflowDataType"
96510+
required:
96511+
- type
96512+
- attributes
96513+
type: object
96514+
WorkflowListItemAttributes:
96515+
description: The definition of `WorkflowListItemAttributes` object.
96516+
properties:
96517+
createdAt:
96518+
description: When the workflow was created.
96519+
format: date-time
96520+
readOnly: true
96521+
type: string
96522+
description:
96523+
description: Description of the workflow.
96524+
type: string
96525+
name:
96526+
description: Name of the workflow.
96527+
example: ""
96528+
type: string
96529+
published:
96530+
description: Set the workflow to published or unpublished. Workflows in an unpublished state will only be executable via manual runs. Automatic triggers such as Schedule will not execute the workflow until it is published.
96531+
type: boolean
96532+
spec:
96533+
$ref: "#/components/schemas/Spec"
96534+
nullable: true
96535+
tags:
96536+
description: Tags of the workflow.
96537+
items:
96538+
description: A tag string in `key:value` format.
96539+
type: string
96540+
type: array
96541+
updatedAt:
96542+
description: When the workflow was last updated.
96543+
format: date-time
96544+
readOnly: true
96545+
type: string
96546+
required:
96547+
- name
96548+
type: object
9646896549
WorkflowTriggerWrapper:
9646996550
description: "Schema for a Workflow-based trigger."
9647096551
properties:
@@ -170668,6 +170749,120 @@ paths:
170668170749
- manage_log_reports
170669170750
- product_analytics_saved_widgets_write
170670170751
/api/v2/workflows:
170752+
get:
170753+
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).
170754+
operationId: ListWorkflows
170755+
parameters:
170756+
- description: The maximum number of workflows to return per page.
170757+
example: 50
170758+
in: query
170759+
name: limit
170760+
required: false
170761+
schema:
170762+
default: 50
170763+
format: int64
170764+
type: integer
170765+
- description: The page number to return, starting from 0.
170766+
example: 0
170767+
in: query
170768+
name: page
170769+
required: false
170770+
schema:
170771+
default: 0
170772+
format: int64
170773+
type: integer
170774+
- 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`."
170775+
example: "-updatedAt"
170776+
in: query
170777+
name: sort
170778+
required: false
170779+
schema:
170780+
type: string
170781+
- 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`), it is instead treated as a `key:value` tag filter."
170782+
example: deploy
170783+
in: query
170784+
name: filter[query]
170785+
required: false
170786+
schema:
170787+
type: string
170788+
- description: Filter the returned workflows by one or more trigger types, such as `monitor`, `schedule`, or `githubWebhook`. Repeat the parameter to filter by multiple trigger types.
170789+
example:
170790+
- monitor
170791+
explode: true
170792+
in: query
170793+
name: filter[triggerType]
170794+
required: false
170795+
schema:
170796+
items:
170797+
type: string
170798+
type: array
170799+
- description: Whether to include unpublished workflows in the response.
170800+
in: query
170801+
name: filter[includeUnpublished]
170802+
required: false
170803+
schema:
170804+
default: false
170805+
type: boolean
170806+
- 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`.
170807+
in: query
170808+
name: filter[includeSpecs]
170809+
required: false
170810+
schema:
170811+
default: false
170812+
type: boolean
170813+
responses:
170814+
"200":
170815+
content:
170816+
application/json:
170817+
examples:
170818+
default:
170819+
value:
170820+
data:
170821+
- attributes:
170822+
createdAt: "2024-01-01T00:00:00+00:00"
170823+
description: A sample workflow.
170824+
name: Example Workflow
170825+
published: true
170826+
spec: {}
170827+
tags:
170828+
- team:infra
170829+
updatedAt: "2024-01-01T00:00:00+00:00"
170830+
id: 00000000-0000-0000-0000-000000000002
170831+
relationships:
170832+
creator:
170833+
data:
170834+
id: 00000000-0000-0000-0000-000000000009
170835+
type: users
170836+
owner:
170837+
data:
170838+
id: 00000000-0000-0000-0000-000000000009
170839+
type: users
170840+
type: workflows
170841+
meta:
170842+
page:
170843+
totalCount: 1
170844+
totalFilteredCount: 1
170845+
schema:
170846+
$ref: "#/components/schemas/ListWorkflowsResponse"
170847+
description: OK
170848+
"400":
170849+
$ref: "#/components/responses/BadRequestResponse"
170850+
"403":
170851+
$ref: "#/components/responses/ForbiddenResponse"
170852+
"429":
170853+
$ref: "#/components/responses/TooManyRequestsResponse"
170854+
summary: List workflows
170855+
tags:
170856+
- Workflow Automation
170857+
x-pagination:
170858+
limitParam: limit
170859+
pageParam: page
170860+
pageStart: 0
170861+
resultsPath: data
170862+
"x-permission":
170863+
operator: OR
170864+
permissions:
170865+
- workflows_read
170671170866
post:
170672170867
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).
170673170868
operationId: CreateWorkflow

docs/datadog_api_client.v2.model.rst

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19135,6 +19135,27 @@ datadog\_api\_client.v2.model.list\_vulnerable\_assets\_response module
1913519135
:members:
1913619136
:show-inheritance:
1913719137

19138+
datadog\_api\_client.v2.model.list\_workflows\_response module
19139+
--------------------------------------------------------------
19140+
19141+
.. automodule:: datadog_api_client.v2.model.list_workflows_response
19142+
:members:
19143+
:show-inheritance:
19144+
19145+
datadog\_api\_client.v2.model.list\_workflows\_response\_meta module
19146+
--------------------------------------------------------------------
19147+
19148+
.. automodule:: datadog_api_client.v2.model.list_workflows_response_meta
19149+
:members:
19150+
:show-inheritance:
19151+
19152+
datadog\_api\_client.v2.model.list\_workflows\_response\_meta\_page module
19153+
--------------------------------------------------------------------------
19154+
19155+
.. automodule:: datadog_api_client.v2.model.list_workflows_response_meta_page
19156+
:members:
19157+
:show-inheritance:
19158+
1913819159
datadog\_api\_client.v2.model.llm\_obs\_annotated\_interaction\_by\_trace\_item module
1913919160
--------------------------------------------------------------------------------------
1914019161

@@ -42088,6 +42109,20 @@ datadog\_api\_client.v2.model.workflow\_list\_instances\_response\_meta\_page mo
4208842109
:members:
4208942110
:show-inheritance:
4209042111

42112+
datadog\_api\_client.v2.model.workflow\_list\_item module
42113+
---------------------------------------------------------
42114+
42115+
.. automodule:: datadog_api_client.v2.model.workflow_list_item
42116+
:members:
42117+
:show-inheritance:
42118+
42119+
datadog\_api\_client.v2.model.workflow\_list\_item\_attributes module
42120+
---------------------------------------------------------------------
42121+
42122+
.. automodule:: datadog_api_client.v2.model.workflow_list_item_attributes
42123+
:members:
42124+
:show-inheritance:
42125+
4209142126
datadog\_api\_client.v2.model.workflow\_trigger\_wrapper module
4209242127
---------------------------------------------------------------
4209342128

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
"""
2+
List workflows returns "OK" response
3+
"""
4+
5+
from datadog_api_client import ApiClient, Configuration
6+
from datadog_api_client.v2.api.workflow_automation_api import WorkflowAutomationApi
7+
8+
configuration = Configuration()
9+
with ApiClient(configuration) as api_client:
10+
api_instance = WorkflowAutomationApi(api_client)
11+
response = api_instance.list_workflows()
12+
13+
print(response)
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
"""
2+
List workflows returns "OK" response with pagination
3+
"""
4+
5+
from datadog_api_client import ApiClient, Configuration
6+
from datadog_api_client.v2.api.workflow_automation_api import WorkflowAutomationApi
7+
8+
configuration = Configuration()
9+
with ApiClient(configuration) as api_client:
10+
api_instance = WorkflowAutomationApi(api_client)
11+
items = api_instance.list_workflows_with_pagination(
12+
limit=2,
13+
filter_query="Example-Workflow-Automation",
14+
)
15+
for item in items:
16+
print(item)

0 commit comments

Comments
 (0)