Skip to content

Commit 8ca8c4f

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 4596b18 of spec repo
1 parent 6d40c6d commit 8ca8c4f

17 files changed

Lines changed: 922 additions & 1 deletion

.generator/schemas/v2/openapi.yaml

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