Skip to content

Commit 1198faf

Browse files
authored
Merge pull request #1112 from akeneo/CEX-721
CEX-721: Workflow Execution start endpoint documentation
2 parents c5b95c7 + 9624d15 commit 1198faf

File tree

7 files changed

+116
-1
lines changed

7 files changed

+116
-1
lines changed
Lines changed: 1 addition & 0 deletions
Loading

content/swagger/akeneo-web-api.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

content/swagger/definitions.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -538,6 +538,8 @@ UiExtensionWithoutRequired:
538538

539539
Workflow:
540540
$ref: ./resources/workflows/definitions/workflow.yaml
541+
WorkflowExecution:
542+
$ref: ./resources/workflows/definitions/workflow_execution.yaml
541543
WorkflowStepAssignee:
542544
$ref: ./resources/workflows/definitions/assignee.yaml
543545
WorkflowTask:

content/swagger/paths.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,8 @@
211211
$ref: ./resources/workflows/routes/workflows.yaml
212212
/api/rest/v1/workflows/{uuid}:
213213
$ref: ./resources/workflows/routes/workflows_uuid.yaml
214+
/api/rest/v1/workflows/executions:
215+
$ref: ./resources/workflows/routes/workflows_executions.yaml
214216
/api/rest/v1/workflows/steps/{uuid}/assignees:
215217
$ref: ./resources/workflows/routes/workflows_steps_uuid_assignees.yaml
216218
/api/rest/v1/workflows/tasks:
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
type: array
2+
items:
3+
type: object
4+
required:
5+
- workflow
6+
x-validation-constraint: "Either product or product_model must be provided, but not both"
7+
properties:
8+
workflow:
9+
type: object
10+
required: [ "uuid" ]
11+
properties:
12+
uuid:
13+
type: string
14+
format: uuid
15+
description: Workflow UUID
16+
example: 6f37476a-04c2-46c0-b6d0-e18316959068
17+
product:
18+
type: object
19+
required: [ "uuid" ]
20+
properties:
21+
uuid:
22+
type: string
23+
format: uuid
24+
description: Product UUID
25+
example: 87654321-4321-4321-4321-210987654321
26+
product_model:
27+
type: object
28+
required: [ "code" ]
29+
properties:
30+
code:
31+
type: string
32+
description: Product model code
33+
example: model_1234
34+
example: [
35+
{
36+
"workflow": {
37+
"uuid": "6f37476a-04c2-46c0-b6d0-e18316959068"
38+
},
39+
"product": {
40+
"uuid": "87654321-4321-4321-4321-210987654321"
41+
}
42+
},
43+
{
44+
"workflow": {
45+
"uuid": "6f37476a-04c2-46c0-b6d0-e18316959068"
46+
},
47+
"product_model": {
48+
"code": "model_1234"
49+
}
50+
}
51+
]
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
post:
2+
summary: Execute workflow actions
3+
operationId: "post_workflows_executions"
4+
tags:
5+
- Workflow execution
6+
x-versions:
7+
- "SaaS"
8+
x-ee: true
9+
description: This endpoint allows you to start workflow executions for products and/or product models. For each item in the array, you must provide either a product UUID or a product model code, but not both.
10+
parameters:
11+
- name: body
12+
in: body
13+
schema:
14+
$ref: "#/definitions/WorkflowExecution"
15+
responses:
16+
201:
17+
description: Created
18+
x-details: All workflow executions were successfully started
19+
207:
20+
description: Multi-Status
21+
x-details: Workflow executions started with some errors
22+
schema:
23+
type: object
24+
properties:
25+
code:
26+
type: integer
27+
description: HTTP status code
28+
example: 207
29+
message:
30+
type: string
31+
description: Status message
32+
example: "Workflow executions started with some errors"
33+
processed:
34+
type: integer
35+
description: Number of processed elements
36+
example: 2
37+
errors:
38+
type: array
39+
description: List of errors that occurred during processing
40+
items:
41+
type: object
42+
properties:
43+
index:
44+
type: integer
45+
description: Index of the element that caused an error
46+
example: 3
47+
message:
48+
type: string
49+
description: Error message
50+
example: "Cannot start workflow execution: Workflow not found"
51+
400:
52+
$ref: "#/responses/400Error"
53+
401:
54+
$ref: "#/responses/401Error"
55+
403:
56+
$ref: "#/responses/403Error"
57+
406:
58+
$ref: "#/responses/406Error"

tasks/reference.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ function determineCategory(tag){
8585
case 'Jobs':
8686
return 'Jobs';
8787
case 'Workflow':
88+
case 'Workflow execution':
8889
case 'Workflow task':
8990
return 'Workflows';
9091
default:

0 commit comments

Comments
 (0)