Skip to content

Commit cf2cb9f

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
and
ci.datadog-api-spec
authored
Add trigger API documentation for workflow automation (#1687)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com> Co-authored-by: api-clients-generation-pipeline[bot] <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com>
1 parent 929c755 commit cf2cb9f

File tree

45 files changed

+2439
-4
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+2439
-4
lines changed

.apigentools-info

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.6",
7-
"regenerated": "2024-07-30 17:01:11.256926",
8-
"spec_repo_commit": "4380003d"
7+
"regenerated": "2024-07-30 19:24:57.172113",
8+
"spec_repo_commit": "edbd396a"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2024-07-30 17:01:11.275395",
13-
"spec_repo_commit": "4380003d"
12+
"regenerated": "2024-07-30 19:24:57.190109",
13+
"spec_repo_commit": "edbd396a"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

+222
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,13 @@ components:
358358
required: true
359359
schema:
360360
type: string
361+
InstanceId:
362+
description: The ID of the workflow instance.
363+
in: path
364+
name: instance_id
365+
required: true
366+
schema:
367+
type: string
361368
MetricID:
362369
description: The name of the log-based metric.
363370
in: path
@@ -543,6 +550,13 @@ components:
543550
schema:
544551
example: 00000000-0000-9999-0000-000000000000
545552
type: string
553+
WorkflowId:
554+
description: The ID of the workflow.
555+
in: path
556+
name: workflow_id
557+
required: true
558+
schema:
559+
type: string
546560
requestBodies: {}
547561
responses:
548562
BadRequestResponse:
@@ -23831,6 +23845,107 @@ components:
2383123845
- PAST_SIX_MONTHS
2383223846
- PAST_ONE_YEAR
2383323847
- ALERT
23848+
WorkflowInstanceCreateMeta:
23849+
description: Additional information for creating a workflow instance.
23850+
properties:
23851+
payload:
23852+
additionalProperties: {}
23853+
description: The input parameters to the workflow.
23854+
type: object
23855+
type: object
23856+
WorkflowInstanceCreateRequest:
23857+
description: Request used to create a workflow instance.
23858+
properties:
23859+
meta:
23860+
$ref: '#/components/schemas/WorkflowInstanceCreateMeta'
23861+
type: object
23862+
WorkflowInstanceCreateResponse:
23863+
additionalProperties: {}
23864+
description: Response returned upon successful workflow instance creation.
23865+
properties:
23866+
data:
23867+
$ref: '#/components/schemas/WorkflowInstanceCreateResponseData'
23868+
type: object
23869+
WorkflowInstanceCreateResponseData:
23870+
additionalProperties: {}
23871+
description: Data about the created workflow instance.
23872+
properties:
23873+
id:
23874+
description: The ID of the workflow execution. It can be used to fetch the
23875+
execution status.
23876+
type: string
23877+
type: object
23878+
WorkflowInstanceListItem:
23879+
additionalProperties: {}
23880+
description: An item in the workflow instances list.
23881+
properties:
23882+
id:
23883+
description: The ID of the workflow instance
23884+
type: string
23885+
type: object
23886+
WorkflowListInstancesResponse:
23887+
additionalProperties: {}
23888+
description: Response returned when listing workflow instances.
23889+
properties:
23890+
data:
23891+
description: A list of workflow instances.
23892+
items:
23893+
$ref: '#/components/schemas/WorkflowInstanceListItem'
23894+
type: array
23895+
meta:
23896+
$ref: '#/components/schemas/WorkflowListInstancesResponseMeta'
23897+
type: object
23898+
WorkflowListInstancesResponseMeta:
23899+
additionalProperties: {}
23900+
description: Metadata about the instances list
23901+
properties:
23902+
page:
23903+
$ref: '#/components/schemas/WorkflowListInstancesResponseMetaPage'
23904+
type: object
23905+
WorkflowListInstancesResponseMetaPage:
23906+
additionalProperties: {}
23907+
description: Page information for the list instances response.
23908+
properties:
23909+
totalCount:
23910+
description: The total count of items.
23911+
format: int64
23912+
type: integer
23913+
type: object
23914+
WorklflowCancelInstanceResponse:
23915+
description: Information about the canceled instance.
23916+
properties:
23917+
data:
23918+
$ref: '#/components/schemas/WorklflowCancelInstanceResponseData'
23919+
type: object
23920+
WorklflowCancelInstanceResponseData:
23921+
description: Data about the canceled instance.
23922+
properties:
23923+
id:
23924+
description: The id of the canceled instance
23925+
type: string
23926+
type: object
23927+
WorklflowGetInstanceResponse:
23928+
additionalProperties: {}
23929+
description: The state of the given workflow instance.
23930+
properties:
23931+
data:
23932+
$ref: '#/components/schemas/WorklflowGetInstanceResponseData'
23933+
type: object
23934+
WorklflowGetInstanceResponseData:
23935+
additionalProperties: {}
23936+
description: The data of the instance response.
23937+
properties:
23938+
attributes:
23939+
$ref: '#/components/schemas/WorklflowGetInstanceResponseDataAttributes'
23940+
type: object
23941+
WorklflowGetInstanceResponseDataAttributes:
23942+
additionalProperties: {}
23943+
description: The attributes of the instance response data.
23944+
properties:
23945+
id:
23946+
description: The id of the instance.
23947+
type: string
23948+
type: object
2383423949
securitySchemes:
2383523950
AuthZ:
2383623951
description: This API uses OAuth 2 with the implicit grant flow.
@@ -37850,6 +37965,108 @@ paths:
3785037965
summary: Get user memberships
3785137966
tags:
3785237967
- Teams
37968+
/api/v2/workflows/{workflow_id}/instances:
37969+
get:
37970+
description: List all instances of a given workflow.
37971+
operationId: ListWorkflowInstances
37972+
parameters:
37973+
- $ref: '#/components/parameters/WorkflowId'
37974+
- $ref: '#/components/parameters/PageSize'
37975+
- $ref: '#/components/parameters/PageNumber'
37976+
responses:
37977+
'200':
37978+
content:
37979+
application/json:
37980+
schema:
37981+
$ref: '#/components/schemas/WorkflowListInstancesResponse'
37982+
description: OK
37983+
'400':
37984+
$ref: '#/components/responses/BadRequestResponse'
37985+
'403':
37986+
$ref: '#/components/responses/ForbiddenResponse'
37987+
'429':
37988+
$ref: '#/components/responses/TooManyRequestsResponse'
37989+
summary: List workflow instances
37990+
tags:
37991+
- Workflow Automation
37992+
post:
37993+
description: Execute the given workflow
37994+
operationId: CreateWorkflowInstance
37995+
parameters:
37996+
- $ref: '#/components/parameters/WorkflowId'
37997+
requestBody:
37998+
content:
37999+
application/json:
38000+
schema:
38001+
$ref: '#/components/schemas/WorkflowInstanceCreateRequest'
38002+
required: true
38003+
responses:
38004+
'200':
38005+
content:
38006+
application/json:
38007+
schema:
38008+
$ref: '#/components/schemas/WorkflowInstanceCreateResponse'
38009+
description: Created
38010+
'400':
38011+
$ref: '#/components/responses/BadRequestResponse'
38012+
'403':
38013+
$ref: '#/components/responses/ForbiddenResponse'
38014+
'429':
38015+
$ref: '#/components/responses/TooManyRequestsResponse'
38016+
summary: Execute a workflow
38017+
tags:
38018+
- Workflow Automation
38019+
x-codegen-request-body-name: body
38020+
/api/v2/workflows/{workflow_id}/instances/{instance_id}:
38021+
get:
38022+
description: Get a specific execution of a given workflow.
38023+
operationId: GetWorkflowInstance
38024+
parameters:
38025+
- $ref: '#/components/parameters/WorkflowId'
38026+
- $ref: '#/components/parameters/InstanceId'
38027+
responses:
38028+
'200':
38029+
content:
38030+
application/json:
38031+
schema:
38032+
$ref: '#/components/schemas/WorklflowGetInstanceResponse'
38033+
description: OK
38034+
'400':
38035+
$ref: '#/components/responses/BadRequestResponse'
38036+
'403':
38037+
$ref: '#/components/responses/ForbiddenResponse'
38038+
'404':
38039+
$ref: '#/components/responses/NotFoundResponse'
38040+
'429':
38041+
$ref: '#/components/responses/TooManyRequestsResponse'
38042+
summary: Get a workflow instance
38043+
tags:
38044+
- Workflow Automation
38045+
/api/v2/workflows/{workflow_id}/instances/{instance_id}/cancel:
38046+
put:
38047+
description: Cancels a specific execution of a given workflow.
38048+
operationId: CancelWorkflowInstance
38049+
parameters:
38050+
- $ref: '#/components/parameters/WorkflowId'
38051+
- $ref: '#/components/parameters/InstanceId'
38052+
responses:
38053+
'200':
38054+
content:
38055+
application/json:
38056+
schema:
38057+
$ref: '#/components/schemas/WorklflowCancelInstanceResponse'
38058+
description: OK
38059+
'400':
38060+
$ref: '#/components/responses/BadRequestResponse'
38061+
'403':
38062+
$ref: '#/components/responses/ForbiddenResponse'
38063+
'404':
38064+
$ref: '#/components/responses/NotFoundResponse'
38065+
'429':
38066+
$ref: '#/components/responses/TooManyRequestsResponse'
38067+
summary: Cancel a workflow instance
38068+
tags:
38069+
- Workflow Automation
3785338070
security:
3785438071
- apiKeyAuth: []
3785538072
appKeyAuth: []
@@ -38221,4 +38438,9 @@ tags:
3822138438
externalDocs:
3822238439
url: https://docs.datadoghq.com/account_management/users
3822338440
name: Users
38441+
- description: Automate your teams operational processes with Datadog Workflow Automation.
38442+
externalDocs:
38443+
description: Find out more at
38444+
url: https://docs.datadoghq.com/service_management/workflows/
38445+
name: Workflow Automation
3822438446
x-group-parameters: true
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"2024-07-24T18:39:57.489Z"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
{
2+
"log": {
3+
"_recordingName": "Workflow Automation/Cancel a workflow instance returns \"Bad Request\" response",
4+
"creator": {
5+
"comment": "persister:fs",
6+
"name": "Polly.JS",
7+
"version": "6.0.5"
8+
},
9+
"entries": [
10+
{
11+
"_id": "98b0f3208080a6600c1990114cba0bd8",
12+
"_order": 0,
13+
"cache": {},
14+
"request": {
15+
"bodySize": 0,
16+
"cookies": [],
17+
"headers": [
18+
{
19+
"_fromType": "array",
20+
"name": "accept",
21+
"value": "application/json"
22+
}
23+
],
24+
"headersSize": 568,
25+
"httpVersion": "HTTP/1.1",
26+
"method": "PUT",
27+
"queryString": [],
28+
"url": "https://api.datadoghq.com/api/v2/workflows/malformed/instances/malformed/cancel"
29+
},
30+
"response": {
31+
"bodySize": 105,
32+
"content": {
33+
"mimeType": "application/json",
34+
"size": 105,
35+
"text": "{\"errors\":[{\"code\":\"INVALID_FIELD_VALUE\",\"detail\":\"value <no value> is invalid for field workflow_id\"}]}\n"
36+
},
37+
"cookies": [],
38+
"headers": [
39+
{
40+
"name": "content-type",
41+
"value": "application/json"
42+
}
43+
],
44+
"headersSize": 647,
45+
"httpVersion": "HTTP/1.1",
46+
"redirectURL": "",
47+
"status": 400,
48+
"statusText": "Bad Request"
49+
},
50+
"startedDateTime": "2024-07-24T18:39:57.498Z",
51+
"time": 193
52+
}
53+
],
54+
"pages": [],
55+
"version": "1.2"
56+
}
57+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"2024-07-24T18:39:57.698Z"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
{
2+
"log": {
3+
"_recordingName": "Workflow Automation/Cancel a workflow instance returns \"Not Found\" response",
4+
"creator": {
5+
"comment": "persister:fs",
6+
"name": "Polly.JS",
7+
"version": "6.0.5"
8+
},
9+
"entries": [
10+
{
11+
"_id": "0f7c001df65a23839d1229ec52bc73cb",
12+
"_order": 0,
13+
"cache": {},
14+
"request": {
15+
"bodySize": 0,
16+
"cookies": [],
17+
"headers": [
18+
{
19+
"_fromType": "array",
20+
"name": "accept",
21+
"value": "application/json"
22+
}
23+
],
24+
"headersSize": 622,
25+
"httpVersion": "HTTP/1.1",
26+
"method": "PUT",
27+
"queryString": [],
28+
"url": "https://api.datadoghq.com/api/v2/workflows/0233a3b7-b7ba-425e-a8cc-375ca2020b5b/instances/e0c64dc8-f946-4ae8-8d79-54569031ce67/cancel"
29+
},
30+
"response": {
31+
"bodySize": 110,
32+
"content": {
33+
"mimeType": "application/json",
34+
"size": 110,
35+
"text": "{\"errors\":[{\"code\":\"INSTANCE_NOT_FOUND\",\"detail\":\"instance e0c64dc8-f946-4ae8-8d79-54569031ce67 not found\"}]}\n"
36+
},
37+
"cookies": [],
38+
"headers": [
39+
{
40+
"name": "content-type",
41+
"value": "application/json"
42+
}
43+
],
44+
"headersSize": 647,
45+
"httpVersion": "HTTP/1.1",
46+
"redirectURL": "",
47+
"status": 404,
48+
"statusText": "Not Found"
49+
},
50+
"startedDateTime": "2024-07-24T18:39:57.700Z",
51+
"time": 118
52+
}
53+
],
54+
"pages": [],
55+
"version": "1.2"
56+
}
57+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"2024-07-24T18:39:57.827Z"

0 commit comments

Comments
 (0)