aspera-cli 4.27.5 → 4.29.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (249) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data/BUGS.md +5 -10
  4. data/CHANGELOG.md +301 -4
  5. data/CODE_OF_CONDUCT.md +18 -0
  6. data/CONTRIBUTING.md +139 -58
  7. data/GOVERNANCE.md +30 -0
  8. data/LICENSE +201 -0
  9. data/README.md +103 -26
  10. data/SECURITY.md +70 -0
  11. data/bin/ascli +8 -5
  12. data/bin/asession +10 -7
  13. data/docs/README.md +2551 -772
  14. data/docs/test-mcp-with-ai.md +13 -11
  15. data/lib/aspera/agent/base.rb +23 -2
  16. data/lib/aspera/agent/connect.rb +16 -12
  17. data/lib/aspera/agent/desktop.rb +10 -7
  18. data/lib/aspera/agent/direct.rb +34 -22
  19. data/lib/aspera/agent/factory.rb +8 -4
  20. data/lib/aspera/agent/httpgw.rb +7 -5
  21. data/lib/aspera/agent/node.rb +15 -7
  22. data/lib/aspera/agent/transferd.rb +167 -43
  23. data/lib/aspera/api/alee.rb +4 -1
  24. data/lib/aspera/api/aoc.rb +14 -11
  25. data/lib/aspera/api/ats.rb +4 -2
  26. data/lib/aspera/api/cos_node.rb +8 -5
  27. data/lib/aspera/api/faspex.rb +16 -9
  28. data/lib/aspera/api/httpgw.rb +9 -6
  29. data/lib/aspera/api/node.rb +23 -19
  30. data/lib/aspera/ascmd.rb +8 -5
  31. data/lib/aspera/ascp/installation.rb +84 -42
  32. data/lib/aspera/ascp/log.schema.yaml +1084 -0
  33. data/lib/aspera/ascp/log_analyzer/advice.rb +97 -0
  34. data/lib/aspera/ascp/log_analyzer/diagnostics.rb +344 -0
  35. data/lib/aspera/ascp/log_analyzer/lines.rb +75 -0
  36. data/lib/aspera/ascp/log_analyzer/log_file.rb +593 -0
  37. data/lib/aspera/ascp/log_analyzer/records.rb +379 -0
  38. data/lib/aspera/ascp/log_analyzer/rules.rb +172 -0
  39. data/lib/aspera/ascp/log_analyzer/session.rb +782 -0
  40. data/lib/aspera/ascp/log_analyzer.rb +354 -0
  41. data/lib/aspera/ascp/management.rb +102 -48
  42. data/lib/aspera/ascp/session_errors.rb +217 -0
  43. data/lib/aspera/assert.rb +4 -0
  44. data/lib/aspera/cli/ascp_actions.rb +16 -37
  45. data/lib/aspera/cli/ascp_logs_actions.rb +176 -0
  46. data/lib/aspera/cli/async_transfer_store.rb +7 -4
  47. data/lib/aspera/cli/bootstrapper.rb +37 -34
  48. data/lib/aspera/cli/command_line.rb +24 -6
  49. data/lib/aspera/cli/command_registry.rb +49 -4
  50. data/lib/aspera/cli/command_spec.rb +34 -4
  51. data/lib/aspera/cli/completion/ascli.bash +53 -5
  52. data/lib/aspera/cli/completion/ascli.fish +27 -8
  53. data/lib/aspera/cli/completion/ascli.ps1 +63 -0
  54. data/lib/aspera/cli/completion/ascli.zsh +36 -4
  55. data/lib/aspera/cli/completion_actions.rb +594 -0
  56. data/lib/aspera/cli/context.rb +9 -4
  57. data/lib/aspera/cli/deprecation.rb +5 -2
  58. data/lib/aspera/cli/error.rb +45 -0
  59. data/lib/aspera/cli/extended_value.rb +83 -24
  60. data/lib/aspera/cli/formatter.rb +142 -73
  61. data/lib/aspera/cli/gem_checker.rb +9 -6
  62. data/lib/aspera/cli/hints.rb +22 -11
  63. data/lib/aspera/cli/http.rb +17 -13
  64. data/lib/aspera/cli/info.rb +17 -6
  65. data/lib/aspera/cli/mailer.rb +7 -4
  66. data/lib/aspera/cli/mcp/http_servlet.rb +155 -0
  67. data/lib/aspera/cli/mcp/secrets.rb +146 -0
  68. data/lib/aspera/cli/mcp/tool.rb +232 -0
  69. data/lib/aspera/cli/option_declarator.rb +10 -4
  70. data/lib/aspera/cli/option_registry.rb +6 -3
  71. data/lib/aspera/cli/option_types.rb +17 -2
  72. data/lib/aspera/cli/option_value.rb +72 -11
  73. data/lib/aspera/cli/options.schema.yaml +856 -81
  74. data/lib/aspera/cli/parser.rb +64 -31
  75. data/lib/aspera/cli/plugins/alee.rb +7 -4
  76. data/lib/aspera/cli/plugins/aoc.rb +250 -44
  77. data/lib/aspera/cli/plugins/ats.rb +9 -8
  78. data/lib/aspera/cli/plugins/base.rb +51 -25
  79. data/lib/aspera/cli/plugins/basic_auth.rb +5 -2
  80. data/lib/aspera/cli/plugins/config.rb +207 -141
  81. data/lib/aspera/cli/plugins/console.rb +9 -4
  82. data/lib/aspera/cli/plugins/cos.rb +8 -4
  83. data/lib/aspera/cli/plugins/factory.rb +22 -8
  84. data/lib/aspera/cli/plugins/faspex5.rb +37 -44
  85. data/lib/aspera/cli/plugins/faspio.rb +41 -8
  86. data/lib/aspera/cli/plugins/httpgw.rb +8 -4
  87. data/lib/aspera/cli/plugins/mcp.rb +186 -121
  88. data/lib/aspera/cli/plugins/node.rb +41 -34
  89. data/lib/aspera/cli/plugins/oauth.rb +5 -1
  90. data/lib/aspera/cli/plugins/orchestrator.rb +572 -59
  91. data/lib/aspera/cli/plugins/preview.rb +69 -44
  92. data/lib/aspera/cli/plugins/server.rb +66 -12
  93. data/lib/aspera/cli/plugins/shares.rb +288 -48
  94. data/lib/aspera/cli/plugins/transferd.rb +223 -0
  95. data/lib/aspera/cli/preset_actions.rb +155 -33
  96. data/lib/aspera/cli/preset_manager.rb +72 -16
  97. data/lib/aspera/cli/prompt.rb +7 -2
  98. data/lib/aspera/cli/result.rb +28 -11
  99. data/lib/aspera/cli/runner.rb +193 -80
  100. data/lib/aspera/cli/secret_finder.rb +4 -1
  101. data/lib/aspera/cli/security.rb +204 -0
  102. data/lib/aspera/cli/special_values.rb +4 -1
  103. data/lib/aspera/cli/sync_actions.rb +13 -10
  104. data/lib/aspera/cli/table_fitter.rb +119 -0
  105. data/lib/aspera/cli/terminal_formatter.rb +32 -40
  106. data/lib/aspera/cli/transfer_actions.rb +11 -8
  107. data/lib/aspera/cli/transfer_agent.rb +31 -19
  108. data/lib/aspera/cli/transfer_progress.rb +13 -45
  109. data/lib/aspera/cli/vault_actions.rb +45 -0
  110. data/lib/aspera/cli/vault_manager.rb +197 -50
  111. data/lib/aspera/cli/version.rb +4 -1
  112. data/lib/aspera/cli/web_secret.html.erb +61 -0
  113. data/lib/aspera/cli/web_secret.rb +222 -0
  114. data/lib/aspera/cli/wizard.rb +58 -45
  115. data/lib/aspera/command_line_builder.rb +35 -5
  116. data/lib/aspera/command_line_converter.rb +4 -1
  117. data/lib/aspera/coverage.rb +103 -33
  118. data/lib/aspera/data_repository.rb +42 -25
  119. data/lib/aspera/dot_container.rb +4 -1
  120. data/lib/aspera/duration.rb +45 -0
  121. data/lib/aspera/environment.rb +106 -33
  122. data/lib/aspera/exec_spec.rb +9 -5
  123. data/lib/aspera/faspex_gw.rb +105 -35
  124. data/lib/aspera/faspex_postproc.rb +193 -47
  125. data/lib/aspera/formatter_interface.rb +4 -2
  126. data/lib/aspera/graphql.rb +5 -1
  127. data/lib/aspera/hash_ext.rb +3 -0
  128. data/lib/aspera/id_generator.rb +6 -3
  129. data/lib/aspera/json_rpc/client.rb +55 -35
  130. data/lib/aspera/json_rpc/version.rb +4 -0
  131. data/lib/aspera/line_logger.rb +4 -1
  132. data/lib/aspera/link_header.rb +4 -1
  133. data/lib/aspera/log.rb +20 -10
  134. data/lib/aspera/markdown.rb +155 -115
  135. data/lib/aspera/mime.rb +9 -0
  136. data/lib/aspera/nagios.rb +9 -5
  137. data/lib/aspera/node_emulator.rb +111 -112
  138. data/lib/aspera/oauth/client/base.rb +163 -0
  139. data/lib/aspera/oauth/{boot.rb → client/boot.rb} +8 -4
  140. data/lib/aspera/oauth/{factory.rb → client/factory.rb} +13 -3
  141. data/lib/aspera/oauth/{generic.rb → client/generic.rb} +5 -1
  142. data/lib/aspera/oauth/{json_credentials.rb → client/json_credentials.rb} +4 -1
  143. data/lib/aspera/oauth/{jwt.rb → client/jwt.rb} +6 -3
  144. data/lib/aspera/oauth/client/shares_web.rb +85 -0
  145. data/lib/aspera/oauth/{url_json.rb → client/url_json.rb} +4 -1
  146. data/lib/aspera/oauth/client/web.rb +84 -0
  147. data/lib/aspera/oauth/server/authorize.html.erb +34 -0
  148. data/lib/aspera/oauth/server/pkce.rb +427 -0
  149. data/lib/aspera/orchestrator_workflow_checker.rb +679 -0
  150. data/lib/aspera/persistency_action_once.rb +5 -3
  151. data/lib/aspera/persistency_folder.rb +6 -3
  152. data/lib/aspera/preview/file_types.rb +6 -3
  153. data/lib/aspera/preview/generator.rb +9 -5
  154. data/lib/aspera/preview/options.schema.yaml +3 -3
  155. data/lib/aspera/preview/terminal.rb +11 -6
  156. data/lib/aspera/preview/utils.rb +6 -4
  157. data/lib/aspera/products/connect.rb +5 -2
  158. data/lib/aspera/products/desktop.rb +4 -1
  159. data/lib/aspera/products/other.rb +4 -2
  160. data/lib/aspera/products/transferd.rb +6 -2
  161. data/lib/aspera/products/transferd_service.rb +610 -0
  162. data/lib/aspera/proxy_auto_config.js +2 -2
  163. data/lib/aspera/proxy_auto_config.rb +5 -2
  164. data/lib/aspera/rainbow.rb +30 -1
  165. data/lib/aspera/rest/aspera_errors.rb +55 -60
  166. data/lib/aspera/rest/call_error.rb +3 -0
  167. data/lib/aspera/rest/client.rb +42 -42
  168. data/lib/aspera/rest/error_analyzer.rb +14 -2
  169. data/lib/aspera/rest/list.rb +14 -10
  170. data/lib/aspera/rest/parameters.rb +3 -0
  171. data/lib/aspera/rest/util.rb +13 -4
  172. data/lib/aspera/rest.rb +9 -7
  173. data/lib/aspera/schema/IBM Aspera Faspex API-5.0-enhanced.yaml +9 -11
  174. data/lib/aspera/schema/IBM Aspera Orchestrator API-v1-enhanced.yaml +4089 -0
  175. data/lib/aspera/schema/IBM Aspera faspio Gateway API-1.0.0-enhanced.yaml +1097 -0
  176. data/lib/aspera/schema/IBM Aspera on Cloud API-0.2.6-enhanced.yaml +11 -11
  177. data/lib/aspera/schema/IBM Aspera on Cloud Automation API-1.0.5-enhanced.yaml +2437 -1437
  178. data/lib/aspera/schema/IBM_Aspera_Shares.yaml +819 -7
  179. data/lib/aspera/schema/async_tables.yaml +11 -10
  180. data/lib/aspera/schema/documentation.rb +56 -78
  181. data/lib/aspera/schema/reader.rb +46 -11
  182. data/lib/aspera/schema/registry.rb +45 -24
  183. data/lib/aspera/schema/transferd-config.schema.json +333 -0
  184. data/lib/aspera/schema/validator.rb +4 -1
  185. data/lib/aspera/sealed_hash.rb +166 -0
  186. data/lib/aspera/secret/hider.rb +201 -0
  187. data/lib/aspera/secret/reference.rb +150 -0
  188. data/lib/aspera/secret/resolver.rb +212 -0
  189. data/lib/aspera/secret/store/base.rb +153 -0
  190. data/lib/aspera/secret/store/encrypted_hash.rb +329 -0
  191. data/lib/aspera/secret/store/factory.rb +103 -0
  192. data/lib/aspera/secret/store/hashicorp_vault.rb +390 -0
  193. data/lib/aspera/secret/store/keeper.rb +141 -0
  194. data/lib/aspera/secret/store/macos_security.rb +284 -0
  195. data/lib/aspera/secret/store/one_password_api.rb +99 -0
  196. data/lib/aspera/secret/store/one_password_base.rb +42 -0
  197. data/lib/aspera/secret/store/one_password_cli.rb +110 -0
  198. data/lib/aspera/secret/store/secret_service.rb +125 -0
  199. data/lib/aspera/secret/strength.rb +119 -0
  200. data/lib/aspera/servlet_helpers.rb +114 -0
  201. data/lib/aspera/ssh.rb +10 -7
  202. data/lib/aspera/ssl.rb +5 -2
  203. data/lib/aspera/string_ext.rb +3 -0
  204. data/lib/aspera/sync/args.schema.yaml +6 -1
  205. data/lib/aspera/sync/conf.schema.yaml +25 -10
  206. data/lib/aspera/sync/database.rb +3 -0
  207. data/lib/aspera/sync/operations.rb +34 -12
  208. data/lib/aspera/temp_file_manager.rb +85 -22
  209. data/lib/aspera/timer_limiter.rb +3 -0
  210. data/lib/aspera/transfer/error.rb +4 -1
  211. data/lib/aspera/transfer/faux_file.rb +4 -1
  212. data/lib/aspera/transfer/parameters.rb +22 -14
  213. data/lib/aspera/transfer/result.rb +3 -0
  214. data/lib/aspera/transfer/resumer.rb +6 -4
  215. data/lib/aspera/transfer/spec.rb +45 -18
  216. data/lib/aspera/transfer/spec.schema.yaml +8 -5
  217. data/lib/aspera/transfer/units.rb +75 -0
  218. data/lib/aspera/uri_reader.rb +57 -7
  219. data/lib/aspera/web_auth/index.html.erb +20 -0
  220. data/lib/aspera/web_auth/paste.rb +109 -0
  221. data/lib/aspera/web_auth/receiver.rb +50 -0
  222. data/lib/aspera/web_auth/relay.rb +76 -0
  223. data/lib/aspera/web_auth/reply.html.erb +150 -0
  224. data/lib/aspera/web_auth/server.rb +59 -14
  225. data/lib/aspera/web_page.html.erb +262 -0
  226. data/lib/aspera/web_page.rb +66 -0
  227. data/lib/aspera/web_server_simple.rb +82 -13
  228. data/lib/aspera/yaml.rb +5 -1
  229. data/llms.txt +81 -0
  230. data/skills/ascli/SKILL.md +88 -0
  231. data.tar.gz.sig +0 -0
  232. metadata +116 -48
  233. metadata.gz.sig +0 -0
  234. data/lib/aspera/cli/mcp_tool.rb +0 -189
  235. data/lib/aspera/keychain/base.rb +0 -25
  236. data/lib/aspera/keychain/encrypted_hash.rb +0 -188
  237. data/lib/aspera/keychain/factory.rb +0 -59
  238. data/lib/aspera/keychain/hashicorp_vault.rb +0 -74
  239. data/lib/aspera/keychain/macos_security.rb +0 -171
  240. data/lib/aspera/keychain/one_password_api.rb +0 -86
  241. data/lib/aspera/keychain/one_password_base.rb +0 -34
  242. data/lib/aspera/keychain/one_password_cli.rb +0 -98
  243. data/lib/aspera/oauth/base.rb +0 -141
  244. data/lib/aspera/oauth/web.rb +0 -57
  245. data/lib/aspera/oauth.rb +0 -9
  246. data/lib/aspera/schema/IBM Aspera Orchestrator API-v1.yaml +0 -1784
  247. data/lib/aspera/schema/IBM Aspera faspio Gateway API-1.0.0.yaml +0 -249
  248. data/lib/aspera/secret_hider.rb +0 -117
  249. data/lib/aspera/web_auth/index.html +0 -147
@@ -0,0 +1,4089 @@
1
+ # DO NOT EDIT THIS FILE MANUALLY
2
+ # This file is automatically downloaded from:
3
+ # https://raw.githubusercontent.com/laurent-martin/aspera-api-examples/refs/heads/main/openapi/IBM%20Aspera%20Orchestrator%20API-v1-enhanced.yaml
4
+ # Use 'rake tools:openapi' to update this file
5
+
6
+ openapi: 3.1.0
7
+ info:
8
+ title: Aspera Orchestrator API
9
+ version: v1
10
+ license:
11
+ name: (c) IBM. All rights reserved
12
+ url: https://ibm.com
13
+ description: |
14
+ API documentation for Aspera Orchestrator 4.1.6, checked against its source code (`config/routes.rb` and `ApiController`).
15
+
16
+ ## Authentication
17
+
18
+ The API supports two authentication modes:
19
+
20
+ ### JWT Authentication (Recommended)
21
+
22
+ When JWT authentication is enabled (default):
23
+
24
+ 1. Obtain a JWT token by calling POST /api/login with your credentials
25
+ 2. Include the token in subsequent requests using the Authorization header:
26
+ `Authorization: Bearer <your_token>`
27
+
28
+ ### Credentials in Each Request (When JWT is Disabled)
29
+
30
+ If JWT authentication is disabled in your Orchestrator configuration (`/api/login` then returns 403), give the credentials with every API request, either:
31
+
32
+ - as query parameters `login` and `password`, e.g. `/api/workflows_list?login=admin&password=<PASSWORD>&format=json`
33
+ - as query parameters `login` and `api_key` (the API key of the user)
34
+ - with HTTP Basic authentication
35
+
36
+ **Note:** Check your Orchestrator configuration to determine which authentication mode is active.
37
+
38
+ ## Routes
39
+
40
+ - Some endpoints have their own route, `/api/<endpoint>`, with the HTTP method given here.
41
+ - Every endpoint can also be called as `/api/<endpoint>/<id>`, with any HTTP method, where `<id>` is its main identifier.
42
+ Endpoints without their own route can only be called this way: when `id` is not used by the endpoint, any value works, for example `0`.
43
+ - Parameters can be given in the query, or in a JSON or form body.
44
+
45
+ ## Response format
46
+
47
+ Most endpoints return XML by default.
48
+ For JSON, add `format=json`, or the extension `.json` to the last segment of the path (e.g. `/api/work_order_status/123.json`).
49
+
50
+ ## Errors
51
+
52
+ Errors are returned with HTTP status 200, or 404 when the server option `strict_api_validation` is set.
53
+ The body is `<error time=... action=... id=...>message and backtrace</error>`, or in JSON `{"error": {"action": ..., "time": ..., "id": ..., "description": ...}}`.
54
+ servers:
55
+ - url: https://158.176.9.141/aspera/orchestrator
56
+ description: 'Configured host: 158.176.9.141'
57
+ - url: https://orchestrator.aspera-emea.com/aspera/orchestrator
58
+ description: 'Configured host: orchestrator.aspera-emea.com'
59
+ security:
60
+ - bearerAuth: []
61
+ - basicAuth: []
62
+ - loginQuery: []
63
+ passwordQuery: []
64
+ - loginQuery: []
65
+ apiKeyQuery: []
66
+ paths:
67
+ /api/login:
68
+ post:
69
+ operationId: login
70
+ security: []
71
+ summary: Authenticate and obtain JWT token
72
+ tags:
73
+ - Authentication
74
+ requestBody:
75
+ required: true
76
+ content:
77
+ application/json:
78
+ schema:
79
+ description: '`username`, with either `password` or `api_key` (the API key of that user)'
80
+ oneOf:
81
+ - title: Username and password
82
+ type: object
83
+ required:
84
+ - username
85
+ - password
86
+ properties:
87
+ username:
88
+ type: string
89
+ description: User login name
90
+ password:
91
+ type: string
92
+ format: password
93
+ description: User password
94
+ additionalProperties: false
95
+ - title: Username and API key
96
+ type: object
97
+ required:
98
+ - username
99
+ - api_key
100
+ properties:
101
+ username:
102
+ type: string
103
+ description: User login name
104
+ api_key:
105
+ type: string
106
+ description: API key of the user
107
+ additionalProperties: false
108
+ examples:
109
+ credentials:
110
+ summary: Username and password
111
+ value:
112
+ username: admin
113
+ password: <PASSWORD>
114
+ api_key:
115
+ summary: Username and API key
116
+ value:
117
+ username: admin
118
+ api_key: <API_KEY>
119
+ responses:
120
+ '200':
121
+ description: Successfully authenticated
122
+ content:
123
+ application/json:
124
+ schema:
125
+ type: object
126
+ properties:
127
+ message:
128
+ type: string
129
+ examples:
130
+ - Logged in successfully
131
+ user:
132
+ type: object
133
+ properties:
134
+ id:
135
+ type: integer
136
+ login:
137
+ type: string
138
+ email:
139
+ type: string
140
+ token:
141
+ type: string
142
+ description: JWT token for subsequent API calls
143
+ '401':
144
+ description: Invalid credentials
145
+ '403':
146
+ description: Secure API auth disabled
147
+ /api/workflows_list:
148
+ get:
149
+ operationId: workflows_list
150
+ summary: List all workflows
151
+ tags:
152
+ - Workflows
153
+ parameters:
154
+ - $ref: '#/components/parameters/Format'
155
+ responses:
156
+ '200':
157
+ description: List of workflows
158
+ content:
159
+ application/json:
160
+ schema:
161
+ type: object
162
+ properties:
163
+ workflows:
164
+ type: object
165
+ properties:
166
+ time:
167
+ type: string
168
+ description: UTC time
169
+ action:
170
+ type: string
171
+ const: list
172
+ id:
173
+ type: integer
174
+ workflow:
175
+ type: array
176
+ items:
177
+ type: object
178
+ properties:
179
+ id:
180
+ type: integer
181
+ name:
182
+ type: string
183
+ full_name:
184
+ type: string
185
+ description: Name with the folder path
186
+ folder_id:
187
+ type: [integer, 'null']
188
+ portable_id:
189
+ type: [string, 'null']
190
+ published_status:
191
+ type: string
192
+ enum:
193
+ - published
194
+ - draft
195
+ published_revision_id:
196
+ type: [integer, string]
197
+ description: '`-` when not published'
198
+ latest_revision_id:
199
+ type: [integer, string]
200
+ description: '`-` when there is no whiteboard'
201
+ last_modification:
202
+ type: string
203
+ format: date-time
204
+ comments:
205
+ type: [string, 'null']
206
+ '401':
207
+ $ref: '#/components/responses/UnauthorizedError'
208
+ default:
209
+ $ref: '#/components/responses/Error'
210
+ /api/workflows_status:
211
+ get:
212
+ operationId: workflows_status
213
+ summary: Running status of workflows
214
+ tags:
215
+ - Workflows
216
+ parameters:
217
+ - name: id
218
+ in: query
219
+ schema:
220
+ type: string
221
+ description: Workflow ID or portable ID. Not set, or `0`, for all workflows.
222
+ - $ref: '#/components/parameters/Format'
223
+ responses:
224
+ '200':
225
+ description: Workflow status information
226
+ content:
227
+ application/json:
228
+ schema:
229
+ type: object
230
+ properties:
231
+ workflows:
232
+ type: object
233
+ properties:
234
+ time:
235
+ type: string
236
+ description: UTC time
237
+ action:
238
+ type: string
239
+ const: status
240
+ id:
241
+ type: integer
242
+ workflow:
243
+ type: array
244
+ items:
245
+ type: object
246
+ properties:
247
+ id:
248
+ type: integer
249
+ name:
250
+ type: string
251
+ status:
252
+ type: string
253
+ enum:
254
+ - running
255
+ - not running
256
+ last_activity:
257
+ type: string
258
+ description: Last update of the running work orders, or `-`
259
+ '401':
260
+ $ref: '#/components/responses/UnauthorizedError'
261
+ default:
262
+ $ref: '#/components/responses/Error'
263
+ /api/workflow_details/{id}:
264
+ get:
265
+ operationId: workflow_details
266
+ summary: Number of work orders of a workflow, by status
267
+ tags:
268
+ - Workflows
269
+ parameters:
270
+ - name: id
271
+ in: path
272
+ required: true
273
+ schema:
274
+ type: integer
275
+ description: Workflow ID
276
+ - name: start_date
277
+ in: query
278
+ schema:
279
+ type: string
280
+ description: Count work orders created after this date
281
+ - name: end_date
282
+ in: query
283
+ schema:
284
+ type: string
285
+ description: Count work orders created before this date
286
+ - $ref: '#/components/parameters/Format'
287
+ responses:
288
+ '200':
289
+ description: Work order counts by status
290
+ content:
291
+ application/json:
292
+ schema:
293
+ type: object
294
+ properties:
295
+ workflows:
296
+ type: object
297
+ properties:
298
+ time:
299
+ type: string
300
+ description: UTC time
301
+ action:
302
+ type: string
303
+ const: status
304
+ id:
305
+ type: integer
306
+ workflow:
307
+ type: object
308
+ properties:
309
+ name:
310
+ type: string
311
+ id:
312
+ type: integer
313
+ statuses:
314
+ type: array
315
+ items:
316
+ type: object
317
+ properties:
318
+ count:
319
+ type: integer
320
+ last_activity:
321
+ type: string
322
+ format: date-time
323
+ workflow_name:
324
+ type: string
325
+ status:
326
+ type: string
327
+ '401':
328
+ $ref: '#/components/responses/UnauthorizedError'
329
+ default:
330
+ $ref: '#/components/responses/Error'
331
+ /api/workflow_inputs_spec/{id}:
332
+ get:
333
+ operationId: workflow_inputs_spec
334
+ summary: Runtime parameters of a workflow
335
+ tags:
336
+ - Workflows
337
+ parameters:
338
+ - name: id
339
+ in: path
340
+ required: true
341
+ schema:
342
+ type: string
343
+ description: Workflow ID or portable ID, or `0` to use `workflow_name`, or `-1` to use `portable_id`
344
+ - name: workflow_name
345
+ in: query
346
+ schema:
347
+ type: string
348
+ description: Workflow name, when `id` is `0`
349
+ - name: portable_id
350
+ in: query
351
+ schema:
352
+ type: string
353
+ description: Workflow portable ID, when `id` is `-1`
354
+ - $ref: '#/components/parameters/Format'
355
+ responses:
356
+ '200':
357
+ description: Runtime parameters
358
+ content:
359
+ application/json:
360
+ schema:
361
+ type: object
362
+ properties:
363
+ workflow_inputs_spec:
364
+ type: object
365
+ properties:
366
+ time:
367
+ type: string
368
+ description: UTC time
369
+ action:
370
+ type: string
371
+ const: inputs_spec
372
+ workflow_name:
373
+ type: string
374
+ workflow_id:
375
+ type: integer
376
+ parameter:
377
+ type: array
378
+ items:
379
+ type: object
380
+ properties:
381
+ id:
382
+ type: integer
383
+ name:
384
+ type: string
385
+ value_type:
386
+ type: string
387
+ optional:
388
+ type: [boolean, 'null']
389
+ value:
390
+ type: string
391
+ description: Default value, for an optional parameter
392
+ '401':
393
+ $ref: '#/components/responses/UnauthorizedError'
394
+ default:
395
+ $ref: '#/components/responses/Error'
396
+ /api/workflow_outputs_spec/{id}:
397
+ get:
398
+ operationId: workflow_outputs_spec
399
+ summary: Outputs of the steps of a workflow
400
+ tags:
401
+ - Workflows
402
+ parameters:
403
+ - name: id
404
+ in: path
405
+ required: true
406
+ schema:
407
+ type: string
408
+ description: Workflow ID or portable ID (also accepted as query parameter `workflow_id`)
409
+ - name: workflow_id
410
+ in: query
411
+ schema:
412
+ type: string
413
+ description: Workflow ID or portable ID, takes precedence over `id`
414
+ - $ref: '#/components/parameters/Format'
415
+ responses:
416
+ '200':
417
+ description: Outputs of the workflow
418
+ content:
419
+ application/json:
420
+ schema:
421
+ type: object
422
+ properties:
423
+ workflow_outputs_spec:
424
+ type: object
425
+ properties:
426
+ time:
427
+ type: string
428
+ description: UTC time
429
+ action:
430
+ type: string
431
+ const: outputs_spec
432
+ output:
433
+ type: array
434
+ items:
435
+ type: object
436
+ properties:
437
+ context_id:
438
+ type: integer
439
+ name:
440
+ type: string
441
+ description: '`<step name>:<output name>`'
442
+ workflow_id:
443
+ type: integer
444
+ step_name:
445
+ type: string
446
+ variable_name:
447
+ type: string
448
+ value_type:
449
+ type: string
450
+ variable_type:
451
+ type: string
452
+ '401':
453
+ $ref: '#/components/responses/UnauthorizedError'
454
+ default:
455
+ $ref: '#/components/responses/Error'
456
+ /api/import_workflow:
457
+ post:
458
+ operationId: import_workflow
459
+ summary: Import a workflow
460
+ description: Always creates a new workflow. The response is the new workflow as JSON, whatever the format.
461
+ tags:
462
+ - Workflows
463
+ requestBody:
464
+ required: true
465
+ content:
466
+ multipart/form-data:
467
+ schema:
468
+ type: object
469
+ required:
470
+ - import_file
471
+ - import_file_name
472
+ properties:
473
+ import_file:
474
+ type: string
475
+ contentMediaType: application/octet-stream
476
+ description: The workflow file to import (.wkf or .yml)
477
+ import_file_name:
478
+ type: string
479
+ pattern: (wkf|yml)$
480
+ description: File name ending with `wkf` or `yml`. The file is saved under this name in the import folder of the server.
481
+ examples:
482
+ - my_workflow.wkf
483
+ folder_id:
484
+ type: integer
485
+ description: Folder of the new workflow
486
+ link_to_subworkflows:
487
+ type: string
488
+ description: Link to existing sub-workflows instead of importing them. Any value, including `false`, is taken as true.
489
+ publish_workflow:
490
+ type: string
491
+ description: '`true` or `1` to publish the workflow after import. Default: server option `publish_api_imported_workflow`.'
492
+ format:
493
+ type: string
494
+ enum:
495
+ - xml
496
+ - json
497
+ default: xml
498
+ responses:
499
+ '200':
500
+ description: The new workflow (JSON)
501
+ content:
502
+ application/json:
503
+ schema:
504
+ $ref: '#/components/schemas/Workflow'
505
+ '401':
506
+ $ref: '#/components/responses/UnauthorizedError'
507
+ default:
508
+ $ref: '#/components/responses/Error'
509
+ '500':
510
+ description: Import failed
511
+ content:
512
+ application/json:
513
+ schema:
514
+ type: object
515
+ properties:
516
+ error:
517
+ type: string
518
+ message:
519
+ type: string
520
+ details:
521
+ type: string
522
+ description: Error message
523
+ /api/find_constraints:
524
+ get:
525
+ operationId: find_constraints
526
+ summary: Find workflow import constraints
527
+ description: 'Analyzes a workflow file present on the Orchestrator host, and returns the list expected by `import_with_constraints`, with the possible choices for each conflict with existing sub-workflows, global templates and remote nodes, and the plugins that are not enabled. The file existence is not checked: a wrong path returns the same empty lists as a file without conflict.'
528
+ tags:
529
+ - Workflows
530
+ parameters:
531
+ - name: file
532
+ in: query
533
+ required: true
534
+ schema:
535
+ type: string
536
+ description: Path of the workflow file (`.yml` or `.wkf`) on the Orchestrator host
537
+ - name: wf_id
538
+ in: query
539
+ schema:
540
+ type: integer
541
+ description: ID of an existing workflow, to import the file as a new revision of it
542
+ responses:
543
+ '200':
544
+ description: 'Array of six objects, in the order expected by `import_with_constraints`: `filename`, `add as revision`, `subwf constraints`, `action template constraints`, `remote node constraints`, and `missing plugins` with `Auto-enable missing plugins?`.'
545
+ content:
546
+ application/json:
547
+ schema:
548
+ type: array
549
+ minItems: 6
550
+ maxItems: 6
551
+ prefixItems:
552
+ - type: object
553
+ properties:
554
+ filename:
555
+ type: string
556
+ - type: object
557
+ properties:
558
+ add as revision:
559
+ type: [string, 'null']
560
+ description: The `wf_id` parameter
561
+ - type: object
562
+ properties:
563
+ subwf constraints:
564
+ type: object
565
+ description: Sub-workflow name to possible choices
566
+ additionalProperties:
567
+ type: array
568
+ items:
569
+ type: string
570
+ - type: object
571
+ properties:
572
+ action template constraints:
573
+ type: object
574
+ description: Global template name to possible choices
575
+ additionalProperties:
576
+ type: array
577
+ items:
578
+ type: string
579
+ - type: object
580
+ properties:
581
+ remote node constraints:
582
+ type: object
583
+ description: Remote node name to possible choices
584
+ additionalProperties:
585
+ type: array
586
+ items:
587
+ type: string
588
+ - type: object
589
+ properties:
590
+ missing plugins:
591
+ type: [array, 'null']
592
+ description: Plugins to enable, or `null`
593
+ Auto-enable missing plugins?:
594
+ type: [array, 'null']
595
+ description: '`[true, false]` when plugins are missing, else `null`'
596
+ items: false
597
+ '401':
598
+ $ref: '#/components/responses/UnauthorizedError'
599
+ default:
600
+ $ref: '#/components/responses/Error'
601
+ /api/import_with_constraints:
602
+ post:
603
+ operationId: import_with_constraints
604
+ summary: Import workflow with constraint resolution
605
+ description: 'Imports a workflow file present on the Orchestrator host, as a new workflow or as a new revision of an existing workflow. The workflow is not published. Orchestrator does not check what `find_constraints` reports: if plugins to enable are listed and `Auto-enable missing plugins?` is not `true`, the call fails with an internal error; a conflict without choice is imported as a copy, without error. `Auto-enable missing plugins?` must be a JSON boolean: the string `"false"` is taken as true.'
606
+ tags:
607
+ - Workflows
608
+ requestBody:
609
+ required: true
610
+ content:
611
+ application/json:
612
+ schema:
613
+ type: array
614
+ description: Array of six objects with one key each, in this order
615
+ minItems: 6
616
+ maxItems: 6
617
+ prefixItems:
618
+ - type: object
619
+ required:
620
+ - filename
621
+ properties:
622
+ filename:
623
+ type: string
624
+ description: Path of the workflow file on the Orchestrator host
625
+ additionalProperties: false
626
+ - type: object
627
+ required:
628
+ - add as revision
629
+ properties:
630
+ add as revision:
631
+ type: [integer, string, 'null']
632
+ description: ID or portable ID of the workflow to add a revision to, or `null` for a new workflow
633
+ additionalProperties: false
634
+ - type: object
635
+ required:
636
+ - subwf constraints
637
+ properties:
638
+ subwf constraints:
639
+ type: object
640
+ description: Sub-workflow name to choice
641
+ additionalProperties:
642
+ type: string
643
+ enum:
644
+ - Map to the Existing Sub-Workflow
645
+ - Create a new Sub-Workflow with a unique name
646
+ - Add a new revision to the existing Sub-Workflow
647
+ additionalProperties: false
648
+ - type: object
649
+ required:
650
+ - action template constraints
651
+ properties:
652
+ action template constraints:
653
+ type: object
654
+ description: Global template name to choice
655
+ additionalProperties:
656
+ type: string
657
+ enum:
658
+ - Map to the existing Global Template
659
+ - Create a new Global Template with a different name
660
+ - Override the existing Global Template with this new template
661
+ additionalProperties: false
662
+ - type: object
663
+ required:
664
+ - remote node constraints
665
+ properties:
666
+ remote node constraints:
667
+ type: object
668
+ description: Remote node name to choice
669
+ additionalProperties:
670
+ type: string
671
+ enum:
672
+ - Map to the existing Remote Node
673
+ - Create a new Remote Node with a different name
674
+ - Override the Existing Remote Node with this importing node
675
+ additionalProperties: false
676
+ - type: object
677
+ required:
678
+ - Auto-enable missing plugins?
679
+ properties:
680
+ Auto-enable missing plugins?:
681
+ type: boolean
682
+ additionalProperties: false
683
+ items: false
684
+ examples:
685
+ - - filename: /opt/aspera/orchestrator/var/run/orchestrator/workflows/import/my_workflow.yml
686
+ - add as revision: 239
687
+ - subwf constraints: {}
688
+ - action template constraints:
689
+ Search Files: Map to the existing Global Template
690
+ - remote node constraints:
691
+ Baton: Map to the existing Remote Node
692
+ - Auto-enable missing plugins?: true
693
+ responses:
694
+ '200':
695
+ description: The workflow that was imported (JSON)
696
+ content:
697
+ application/json:
698
+ schema:
699
+ $ref: '#/components/schemas/Workflow'
700
+ '401':
701
+ $ref: '#/components/responses/UnauthorizedError'
702
+ default:
703
+ $ref: '#/components/responses/Error'
704
+ '500':
705
+ description: Internal error, e.g. plugins to enable and not auto-enabled, or a file that cannot be read
706
+ /api/publish_workflow:
707
+ post:
708
+ operationId: publish_workflow
709
+ summary: Publish a workflow
710
+ description: Publishes the last whiteboard revision. The result is `true`, or `false` when the whiteboard has no `error_free` value.
711
+ tags:
712
+ - Workflows
713
+ parameters:
714
+ - name: id
715
+ in: query
716
+ schema:
717
+ type: string
718
+ description: Workflow ID or portable ID (also accepted in a JSON body, or in the path `/api/publish_workflow/<id>`)
719
+ example: '123'
720
+ - $ref: '#/components/parameters/Format'
721
+ requestBody:
722
+ content:
723
+ application/json:
724
+ schema:
725
+ type: object
726
+ properties:
727
+ id:
728
+ type: string
729
+ description: Workflow ID or portable ID
730
+ responses:
731
+ '200':
732
+ description: '`true` or `false` (JSON), or `<WorkflowPublish><Success>true</Success></WorkflowPublish>` (XML)'
733
+ content:
734
+ application/json:
735
+ schema:
736
+ type: boolean
737
+ '401':
738
+ $ref: '#/components/responses/UnauthorizedError'
739
+ default:
740
+ $ref: '#/components/responses/Error'
741
+ /api/export_workflow/{id}:
742
+ get:
743
+ operationId: export_workflow
744
+ summary: Export a workflow
745
+ description: Returns the workflow file (`.yml`), or a package (`.wkf`) with its sub-workflows and remote nodes.
746
+ tags:
747
+ - Workflows
748
+ parameters:
749
+ - name: id
750
+ in: path
751
+ required: true
752
+ schema:
753
+ type: string
754
+ description: Workflow ID or portable ID
755
+ - name: export_with_dependencies
756
+ in: query
757
+ schema:
758
+ type: string
759
+ description: Export a package with dependencies. Any non-empty value, including `false`, enables it.
760
+ responses:
761
+ '200':
762
+ description: The workflow file
763
+ content:
764
+ application/octet-stream:
765
+ schema:
766
+ type: string
767
+ format: binary
768
+ '401':
769
+ $ref: '#/components/responses/UnauthorizedError'
770
+ default:
771
+ $ref: '#/components/responses/Error'
772
+ /api/list_by_subworkflow/{id}:
773
+ get:
774
+ operationId: list_by_subworkflow
775
+ summary: Published workflows that use a sub-workflow
776
+ tags:
777
+ - Workflows
778
+ parameters:
779
+ - name: id
780
+ in: path
781
+ required: true
782
+ schema:
783
+ type: integer
784
+ description: Sub-workflow ID (or query parameter `sub_wf_id`, which takes precedence)
785
+ - name: sub_wf_id
786
+ in: query
787
+ schema:
788
+ type: integer
789
+ description: Sub-workflow ID
790
+ - $ref: '#/components/parameters/Format'
791
+ responses:
792
+ '200':
793
+ description: IDs of the parent workflows
794
+ content:
795
+ application/json:
796
+ schema:
797
+ type: object
798
+ properties:
799
+ parent_workflows:
800
+ type: array
801
+ items:
802
+ type: string
803
+ '401':
804
+ $ref: '#/components/responses/UnauthorizedError'
805
+ default:
806
+ $ref: '#/components/responses/Error'
807
+ /api/retrieve_steps/{id}:
808
+ get:
809
+ operationId: retrieve_steps
810
+ summary: Steps of a type in published workflows, with their work orders
811
+ tags:
812
+ - Workflows
813
+ parameters:
814
+ - $ref: '#/components/parameters/AnyId'
815
+ - name: type
816
+ in: query
817
+ required: true
818
+ schema:
819
+ type: string
820
+ description: Step type (plugin class name), e.g. `CustomRuby`
821
+ - $ref: '#/components/parameters/Format'
822
+ responses:
823
+ '200':
824
+ description: List of steps
825
+ content:
826
+ application/json:
827
+ schema:
828
+ type: array
829
+ items:
830
+ type: object
831
+ properties:
832
+ step_id:
833
+ type: string
834
+ step_name:
835
+ type: string
836
+ step_status:
837
+ type: [string, 'null']
838
+ description: Status of the first prerequisite of the step
839
+ wf_id:
840
+ type: string
841
+ wo_id:
842
+ type: integer
843
+ wo_status:
844
+ type: string
845
+ '401':
846
+ $ref: '#/components/responses/UnauthorizedError'
847
+ default:
848
+ $ref: '#/components/responses/Error'
849
+ /api/work_orders_list/{id}:
850
+ get:
851
+ operationId: work_orders_list
852
+ summary: List work orders of a workflow
853
+ tags:
854
+ - Work Orders
855
+ parameters:
856
+ - name: id
857
+ in: path
858
+ required: true
859
+ schema:
860
+ type: string
861
+ description: Workflow ID, portable ID or name, or `all` for all workflows
862
+ - name: status
863
+ in: query
864
+ schema:
865
+ type: string
866
+ description: 'Filter by work order status, comma-separated (case insensitive): `Initializing`, `Initialized`, `Created`, `Ready`, `In Progress`, `Complete`, `Rolled-back`, `Canceled`, `Paused`, `Cut-off`, `Failed`, `Error`, `Destroyed`, `Cleared`, `Flagged`. Not set: all but `Rolled-back`, `Cut-off`, `Ready`, `Destroyed`, `Cleared`, `Flagged` and `Unknown`.'
867
+ examples:
868
+ - Failed,Canceled
869
+ - name: priority
870
+ in: query
871
+ schema:
872
+ type: string
873
+ enum:
874
+ - low
875
+ - medium
876
+ - high
877
+ - preemptive
878
+ description: 'Filter by priority (case insensitive): `low` (1), `medium` (2), `high` (3) or `preemptive` (below 1). Another value is ignored.'
879
+ - name: from_date
880
+ in: query
881
+ schema:
882
+ type: string
883
+ description: 'Work orders updated after this date. Format `<date> HH:MM:SS`, with `<date>` as `mm-dd-yyyy` (default), `mm/dd/yyyy` (server date format `american`), `dd-mm-yyyy` (`continental`) or `yyyy-mm-dd` (`swedish`). Another format is ignored.'
884
+ examples:
885
+ - 06-27-2015 02:40:59
886
+ - name: to_date
887
+ in: query
888
+ schema:
889
+ type: string
890
+ description: 'Work orders updated before this date. Format `<date> HH:MM:SS`, with `<date>` as `mm-dd-yyyy` (default), `mm/dd/yyyy` (server date format `american`), `dd-mm-yyyy` (`continental`) or `yyyy-mm-dd` (`swedish`). Another format is ignored.'
891
+ examples:
892
+ - 06-29-2015 02:40:59
893
+ - name: tag
894
+ in: query
895
+ style: form
896
+ explode: false
897
+ schema:
898
+ type: array
899
+ items:
900
+ type: string
901
+ description: Comma-separated list of tags, all required
902
+ - name: max_results
903
+ in: query
904
+ schema:
905
+ type: integer
906
+ description: Maximum number of work orders
907
+ - $ref: '#/components/parameters/Format'
908
+ responses:
909
+ '200':
910
+ description: List of work orders
911
+ content:
912
+ application/json:
913
+ schema:
914
+ type: object
915
+ properties:
916
+ work_orders:
917
+ type: array
918
+ items:
919
+ $ref: '#/components/schemas/WorkOrder'
920
+ '401':
921
+ $ref: '#/components/responses/UnauthorizedError'
922
+ default:
923
+ $ref: '#/components/responses/Error'
924
+ /api/work_order_status/{id}:
925
+ get:
926
+ operationId: work_order_status
927
+ summary: Get work order status
928
+ description: |
929
+ Returns the status of a work order and its work steps.
930
+
931
+ If the work order includes sub-workflows, only the sub-workflow status is displayed, not the steps within the sub-workflow.
932
+ tags:
933
+ - Work Orders
934
+ parameters:
935
+ - name: id
936
+ in: path
937
+ required: true
938
+ schema:
939
+ type: integer
940
+ description: Work order ID
941
+ - $ref: '#/components/parameters/Format'
942
+ responses:
943
+ '200':
944
+ description: Work order status
945
+ content:
946
+ application/json:
947
+ schema:
948
+ type: object
949
+ properties:
950
+ work_order:
951
+ allOf:
952
+ - $ref: '#/components/schemas/WorkOrder'
953
+ properties:
954
+ percent_complete:
955
+ type: integer
956
+ minimum: 0
957
+ maximum: 100
958
+ work_steps:
959
+ type: array
960
+ description: Steps with `step_id` greater than 0
961
+ items:
962
+ $ref: '#/components/schemas/WorkStepStatus'
963
+ '401':
964
+ $ref: '#/components/responses/UnauthorizedError'
965
+ default:
966
+ $ref: '#/components/responses/Error'
967
+ /api/work_order_output/{id}:
968
+ get:
969
+ operationId: work_order_output
970
+ summary: Outputs of a work order
971
+ description: |
972
+ All outputs, the outputs of a step (`step_name`), or the outputs of a given name (`variable_name`).
973
+ With both `step_name` and `variable_name`, JSON returns the value only.
974
+ Format `text` (or `string`) returns the values, one per line.
975
+ tags:
976
+ - Work Orders
977
+ parameters:
978
+ - name: id
979
+ in: path
980
+ required: true
981
+ schema:
982
+ type: integer
983
+ description: Work order ID (or query parameter `workorder_id`, which takes precedence)
984
+ - name: workorder_id
985
+ in: query
986
+ schema:
987
+ type: integer
988
+ description: Work order ID
989
+ - name: step_name
990
+ in: query
991
+ schema:
992
+ type: string
993
+ description: Only the outputs of this step
994
+ - name: variable_name
995
+ in: query
996
+ schema:
997
+ type: string
998
+ description: Only the outputs with this name
999
+ - name: detailed
1000
+ in: query
1001
+ schema:
1002
+ type: string
1003
+ enum:
1004
+ - 'true'
1005
+ - 'false'
1006
+ description: 'JSON: also the variable type, value type, work order ID and status of each output'
1007
+ - name: format
1008
+ in: query
1009
+ schema:
1010
+ type: string
1011
+ enum:
1012
+ - xml
1013
+ - json
1014
+ - text
1015
+ - string
1016
+ default: xml
1017
+ description: Response format
1018
+ responses:
1019
+ '200':
1020
+ description: Outputs
1021
+ content:
1022
+ application/json:
1023
+ schema:
1024
+ description: |
1025
+ - Without both `step_name` and `variable_name`: object `{"<step name>:<output name>": <value>}`
1026
+ - With `detailed=true`: array of `{"<step name>:<output name>": <value>, "variable_type", "value_type", "<work order name>:WorkOrder_ID", "<work order name>:WorkOrder_Status"}`
1027
+ - With both `step_name` and `variable_name`: the value only
1028
+ text/plain:
1029
+ schema:
1030
+ type: string
1031
+ description: Format `text` or `string`, one value per line
1032
+ '401':
1033
+ $ref: '#/components/responses/UnauthorizedError'
1034
+ default:
1035
+ $ref: '#/components/responses/Error'
1036
+ /api/work_order_cancel/{id}:
1037
+ get:
1038
+ operationId: work_order_cancel
1039
+ summary: Cancel a work order
1040
+ tags:
1041
+ - Work Orders
1042
+ parameters:
1043
+ - name: id
1044
+ in: path
1045
+ required: true
1046
+ schema:
1047
+ type: integer
1048
+ description: Work order ID
1049
+ - name: force
1050
+ in: query
1051
+ schema:
1052
+ type: string
1053
+ description: Force the cancellation (any value except `false`)
1054
+ - $ref: '#/components/parameters/Format'
1055
+ responses:
1056
+ '200':
1057
+ description: The work order
1058
+ content:
1059
+ application/json:
1060
+ schema:
1061
+ $ref: '#/components/schemas/WorkOrder'
1062
+ '401':
1063
+ $ref: '#/components/responses/UnauthorizedError'
1064
+ default:
1065
+ $ref: '#/components/responses/Error'
1066
+ /api/work_order_reset/{id}:
1067
+ get:
1068
+ operationId: work_order_reset
1069
+ summary: Reset a work order
1070
+ tags:
1071
+ - Work Orders
1072
+ parameters:
1073
+ - name: id
1074
+ in: path
1075
+ required: true
1076
+ schema:
1077
+ type: integer
1078
+ description: Work order ID
1079
+ - $ref: '#/components/parameters/Format'
1080
+ responses:
1081
+ '200':
1082
+ description: The work order and its work steps
1083
+ content:
1084
+ application/json:
1085
+ schema:
1086
+ $ref: '#/components/schemas/WorkOrderWithSteps'
1087
+ '401':
1088
+ $ref: '#/components/responses/UnauthorizedError'
1089
+ default:
1090
+ $ref: '#/components/responses/Error'
1091
+ /api/reset/{id}.{format}:
1092
+ post:
1093
+ operationId: reset
1094
+ summary: Reset a work order (XML result)
1095
+ description: Same as `work_order_reset`, implemented by the work order pages. The response is always XML.
1096
+ tags:
1097
+ - Work Orders
1098
+ parameters:
1099
+ - name: id
1100
+ in: path
1101
+ required: true
1102
+ schema:
1103
+ type: integer
1104
+ description: Work order ID
1105
+ - name: format
1106
+ in: path
1107
+ required: true
1108
+ schema:
1109
+ type: string
1110
+ const: xml
1111
+ description: Required by the route
1112
+ responses:
1113
+ '200':
1114
+ description: The work order (XML)
1115
+ '401':
1116
+ $ref: '#/components/responses/UnauthorizedError'
1117
+ /api/work_order_destroy/{id}:
1118
+ get:
1119
+ operationId: work_order_destroy
1120
+ summary: Delete a work order and its dependents
1121
+ tags:
1122
+ - Work Orders
1123
+ parameters:
1124
+ - name: id
1125
+ in: path
1126
+ required: true
1127
+ schema:
1128
+ type: integer
1129
+ description: Work order ID
1130
+ - $ref: '#/components/parameters/Format'
1131
+ responses:
1132
+ '200':
1133
+ description: Confirmation message
1134
+ content:
1135
+ application/json:
1136
+ schema:
1137
+ type: string
1138
+ examples:
1139
+ - " Work order '123' was deleted"
1140
+ '401':
1141
+ $ref: '#/components/responses/UnauthorizedError'
1142
+ default:
1143
+ $ref: '#/components/responses/Error'
1144
+ /api/initiate:
1145
+ post:
1146
+ operationId: initiate
1147
+ summary: Initiate a new work order
1148
+ description: |
1149
+ Starts a new work order for the specified workflow.
1150
+
1151
+ Runtime input values are passed under the `external_parameters` key.
1152
+ To discover what parameters a workflow accepts, call `/api/workflow_inputs_spec/{workflow_id}` first.
1153
+ With format `json`, the keys of a JSON body are also merged into the runtime parameters.
1154
+ tags:
1155
+ - Work Orders
1156
+ parameters:
1157
+ - $ref: '#/components/parameters/Format'
1158
+ - name: synchronous
1159
+ in: query
1160
+ schema:
1161
+ type: string
1162
+ enum:
1163
+ - 'true'
1164
+ - 'false'
1165
+ description: '`true`: wait for the end of the work order'
1166
+ - name: timeout
1167
+ in: query
1168
+ schema:
1169
+ type: integer
1170
+ minimum: 0
1171
+ description: 'With `synchronous`, maximum wait in seconds (0 or not set: no limit)'
1172
+ - name: explicit_output
1173
+ in: query
1174
+ schema:
1175
+ type: string
1176
+ description: Return only this output, as `<step name>:<output name>`
1177
+ - name: explicit_output_step
1178
+ in: query
1179
+ schema:
1180
+ type: string
1181
+ description: Return only an output of this step (with `explicit_output_variable`)
1182
+ - name: explicit_output_variable
1183
+ in: query
1184
+ schema:
1185
+ type: string
1186
+ description: Name of the output to return (with `explicit_output_step`)
1187
+ - name: on_error_return_code
1188
+ in: query
1189
+ schema:
1190
+ type: integer
1191
+ description: HTTP status to return when the work order ends with status `Error`
1192
+ - name: on_failed_return_code
1193
+ in: query
1194
+ schema:
1195
+ type: integer
1196
+ description: HTTP status to return when the work order ends with status `Failed`
1197
+ - name: tags
1198
+ in: query
1199
+ style: form
1200
+ explode: false
1201
+ schema:
1202
+ type: array
1203
+ items:
1204
+ type: string
1205
+ description: Comma-separated tags of the work order
1206
+ - name: preemptive_level
1207
+ in: query
1208
+ schema:
1209
+ type: integer
1210
+ description: Priority of the work order (its opposite is used)
1211
+ - name: wo_id_only
1212
+ in: query
1213
+ schema:
1214
+ type: string
1215
+ enum:
1216
+ - 'true'
1217
+ - 'false'
1218
+ description: '`true`: return only the work order ID'
1219
+ requestBody:
1220
+ required: true
1221
+ content:
1222
+ application/json:
1223
+ schema:
1224
+ type: object
1225
+ required:
1226
+ - workflow_id
1227
+ properties:
1228
+ workflow_id:
1229
+ type: string
1230
+ description: ID, portable ID or name of the workflow to execute
1231
+ examples:
1232
+ - '123'
1233
+ external_parameters:
1234
+ type: object
1235
+ description: Runtime parameters of the workflow (name to value)
1236
+ additionalProperties: true
1237
+ responses:
1238
+ '200':
1239
+ description: Work order initiated (or the status given by `on_error_return_code`, `on_failed_return_code`)
1240
+ content:
1241
+ application/json:
1242
+ schema:
1243
+ anyOf:
1244
+ - title: Work order
1245
+ allOf:
1246
+ - $ref: '#/components/schemas/WorkOrderWithSteps'
1247
+ properties:
1248
+ parameters:
1249
+ type: object
1250
+ description: Runtime parameters of the work order
1251
+ additionalProperties: true
1252
+ - title: Output value
1253
+ description: With `explicit_output`, or `explicit_output_step` and `explicit_output_variable`
1254
+ '400':
1255
+ description: Workflow not found or not published, or missing required parameters
1256
+ content:
1257
+ application/json:
1258
+ schema:
1259
+ oneOf:
1260
+ - $ref: '#/components/schemas/Error'
1261
+ - title: Missing parameters
1262
+ type: object
1263
+ required:
1264
+ - work_order
1265
+ - missing_parameters
1266
+ properties:
1267
+ work_order:
1268
+ allOf:
1269
+ - $ref: '#/components/schemas/WorkOrder'
1270
+ properties:
1271
+ status:
1272
+ const: Not started
1273
+ status_details:
1274
+ const: Missing required parameters
1275
+ missing_parameters:
1276
+ type: array
1277
+ items:
1278
+ type: string
1279
+ '401':
1280
+ $ref: '#/components/responses/UnauthorizedError'
1281
+ /api/work_step_status/{id}:
1282
+ get:
1283
+ operationId: work_step_status
1284
+ summary: Status, inputs and outputs of a work step, or change its status
1285
+ description: |
1286
+ Returns the work step with its inputs and outputs,
1287
+ or only the value of an output (`output_name`), or only the status (`status_only`, as plain text).
1288
+ With `set_status` or `set_status_details`, modifies the work step and returns its new status.
1289
+ tags:
1290
+ - Work Steps
1291
+ parameters:
1292
+ - name: id
1293
+ in: path
1294
+ required: true
1295
+ schema:
1296
+ type: string
1297
+ description: Work step ID, or `work_order` to use `work_order_id` and `step_name`
1298
+ - name: work_order_id
1299
+ in: query
1300
+ schema:
1301
+ type: integer
1302
+ description: Work order ID, when `id` is `work_order`
1303
+ - name: step_name
1304
+ in: query
1305
+ schema:
1306
+ type: string
1307
+ description: Step name, when `id` is `work_order`
1308
+ - name: output_name
1309
+ in: query
1310
+ schema:
1311
+ type: string
1312
+ description: Return only the value of this output
1313
+ - name: status_only
1314
+ in: query
1315
+ schema:
1316
+ type: string
1317
+ description: Return only the status (any value except `false`)
1318
+ - name: set_status
1319
+ in: query
1320
+ schema:
1321
+ type: string
1322
+ description: New status of the work step
1323
+ - name: set_status_details
1324
+ in: query
1325
+ schema:
1326
+ type: string
1327
+ description: New status details of the work step
1328
+ - name: set_percent_complete
1329
+ in: query
1330
+ schema:
1331
+ type: integer
1332
+ minimum: 0
1333
+ maximum: 100
1334
+ description: New percentage of completion, with `set_status` or `set_status_details`
1335
+ - name: format
1336
+ in: query
1337
+ schema:
1338
+ type: string
1339
+ enum:
1340
+ - xml
1341
+ - json
1342
+ - txt
1343
+ default: xml
1344
+ description: Response format (`txt` for a value or a status as plain text)
1345
+ responses:
1346
+ '200':
1347
+ description: Work step status
1348
+ content:
1349
+ application/json:
1350
+ schema:
1351
+ anyOf:
1352
+ - title: Work step
1353
+ type: object
1354
+ properties:
1355
+ work_step:
1356
+ $ref: '#/components/schemas/WorkStep'
1357
+ outputs:
1358
+ type: array
1359
+ items:
1360
+ $ref: '#/components/schemas/StepVariable'
1361
+ inputs:
1362
+ type: array
1363
+ items:
1364
+ $ref: '#/components/schemas/StepVariable'
1365
+ carry_thrus:
1366
+ type: array
1367
+ description: Variables of other steps
1368
+ items:
1369
+ $ref: '#/components/schemas/StepVariable'
1370
+ - title: New status
1371
+ description: With `set_status` or `set_status_details`
1372
+ type: object
1373
+ properties:
1374
+ Work_step_id:
1375
+ type: integer
1376
+ Work_step_status:
1377
+ type: string
1378
+ Work_step_status_details:
1379
+ type: [string, 'null']
1380
+ Work_step_percent_complete:
1381
+ type: [integer, 'null']
1382
+ - title: Output value
1383
+ description: With `output_name`
1384
+ text/plain:
1385
+ schema:
1386
+ type: string
1387
+ description: 'Format `txt`: a value or a status. With `status_only`, the status is also plain text in format `json`.'
1388
+ '401':
1389
+ $ref: '#/components/responses/UnauthorizedError'
1390
+ default:
1391
+ $ref: '#/components/responses/Error'
1392
+ /api/work_step_cancel/{id}:
1393
+ get:
1394
+ operationId: work_step_cancel
1395
+ summary: Cancel a work step
1396
+ tags:
1397
+ - Work Steps
1398
+ parameters:
1399
+ - name: id
1400
+ in: path
1401
+ required: true
1402
+ schema:
1403
+ type: integer
1404
+ description: Work step ID
1405
+ - $ref: '#/components/parameters/Format'
1406
+ responses:
1407
+ '200':
1408
+ description: The work step
1409
+ content:
1410
+ application/json:
1411
+ schema:
1412
+ $ref: '#/components/schemas/WorkStep'
1413
+ '401':
1414
+ $ref: '#/components/responses/UnauthorizedError'
1415
+ default:
1416
+ $ref: '#/components/responses/Error'
1417
+ /api/workstep_reset/{id}:
1418
+ get:
1419
+ operationId: workstep_reset
1420
+ summary: Restart work orders from work steps
1421
+ tags:
1422
+ - Work Steps
1423
+ parameters:
1424
+ - name: id
1425
+ in: path
1426
+ required: true
1427
+ schema:
1428
+ type: array
1429
+ items:
1430
+ type: integer
1431
+ description: Work step ID, or comma-separated list of IDs
1432
+ - $ref: '#/components/parameters/Format'
1433
+ responses:
1434
+ '200':
1435
+ description: The restarted work orders
1436
+ content:
1437
+ application/json:
1438
+ schema:
1439
+ oneOf:
1440
+ - $ref: '#/components/schemas/WorkstepReset'
1441
+ - type: array
1442
+ description: For several work step IDs
1443
+ items:
1444
+ $ref: '#/components/schemas/WorkstepReset'
1445
+ '401':
1446
+ $ref: '#/components/responses/UnauthorizedError'
1447
+ default:
1448
+ $ref: '#/components/responses/Error'
1449
+ /api/queues_list:
1450
+ get:
1451
+ operationId: queues_list
1452
+ summary: List all queues
1453
+ tags:
1454
+ - Queues
1455
+ parameters:
1456
+ - $ref: '#/components/parameters/Format'
1457
+ responses:
1458
+ '200':
1459
+ description: List of queues
1460
+ content:
1461
+ application/json:
1462
+ schema:
1463
+ type: object
1464
+ properties:
1465
+ Queues:
1466
+ type: object
1467
+ properties:
1468
+ queue:
1469
+ type: array
1470
+ items:
1471
+ type: object
1472
+ properties:
1473
+ id:
1474
+ type: integer
1475
+ name:
1476
+ type: string
1477
+ displayed_name:
1478
+ type: [string, 'null']
1479
+ update_at:
1480
+ type: string
1481
+ format: date-time
1482
+ created_at:
1483
+ type: string
1484
+ format: date-time
1485
+ '401':
1486
+ $ref: '#/components/responses/UnauthorizedError'
1487
+ default:
1488
+ $ref: '#/components/responses/Error'
1489
+ /api/queued_items/{id}:
1490
+ get:
1491
+ operationId: queued_items
1492
+ summary: Items of a queue
1493
+ tags:
1494
+ - Queues
1495
+ parameters:
1496
+ - name: id
1497
+ in: path
1498
+ required: true
1499
+ schema:
1500
+ type: string
1501
+ description: Queue name
1502
+ - $ref: '#/components/parameters/Format'
1503
+ responses:
1504
+ '200':
1505
+ description: Queued items
1506
+ content:
1507
+ application/json:
1508
+ schema:
1509
+ $ref: '#/components/schemas/QueuedItems'
1510
+ '401':
1511
+ $ref: '#/components/responses/UnauthorizedError'
1512
+ default:
1513
+ $ref: '#/components/responses/Error'
1514
+ /api/queue_item/{id}:
1515
+ get:
1516
+ operationId: queue_item
1517
+ summary: Add an item to a queue
1518
+ tags:
1519
+ - Queues
1520
+ parameters:
1521
+ - name: id
1522
+ in: path
1523
+ required: true
1524
+ schema:
1525
+ type: string
1526
+ description: Queue name
1527
+ - name: queued_item
1528
+ in: query
1529
+ required: true
1530
+ schema:
1531
+ type: string
1532
+ description: Item to queue
1533
+ - name: description
1534
+ in: query
1535
+ schema:
1536
+ type: string
1537
+ description: Description of the item
1538
+ - name: priority
1539
+ in: query
1540
+ schema:
1541
+ type: integer
1542
+ description: Priority of the item
1543
+ - name: weight
1544
+ in: query
1545
+ schema:
1546
+ type: integer
1547
+ description: Weight of the item
1548
+ - name: tags
1549
+ in: query
1550
+ style: form
1551
+ explode: false
1552
+ schema:
1553
+ type: array
1554
+ items:
1555
+ type: string
1556
+ description: Comma-separated tags
1557
+ - $ref: '#/components/parameters/Format'
1558
+ responses:
1559
+ '200':
1560
+ description: The queued item
1561
+ content:
1562
+ application/json:
1563
+ schema:
1564
+ type: object
1565
+ properties:
1566
+ item:
1567
+ type: string
1568
+ description: The queued item, as given in `queued_item`
1569
+ description:
1570
+ type: string
1571
+ rank:
1572
+ type: integer
1573
+ priority:
1574
+ type: integer
1575
+ weight:
1576
+ type: integer
1577
+ id:
1578
+ type: integer
1579
+ '401':
1580
+ $ref: '#/components/responses/UnauthorizedError'
1581
+ default:
1582
+ $ref: '#/components/responses/Error'
1583
+ /api/lookup_queued_item:
1584
+ get:
1585
+ operationId: lookup_queued_item
1586
+ summary: Find queued items
1587
+ description: By item ID, by item (optionally in a queue), or by description (optionally in a queue). Same response as `queued_items`.
1588
+ tags:
1589
+ - Queues
1590
+ parameters:
1591
+ - name: queued_item_id
1592
+ in: query
1593
+ schema:
1594
+ type: integer
1595
+ description: ID of the queued item
1596
+ - name: queued_item
1597
+ in: query
1598
+ schema:
1599
+ type: string
1600
+ description: Queued item
1601
+ - name: queue_desc
1602
+ in: query
1603
+ schema:
1604
+ type: string
1605
+ description: Description of the queued item
1606
+ - name: queue_name
1607
+ in: query
1608
+ schema:
1609
+ type: string
1610
+ description: Queue name, to restrict the search by `queued_item` or `queue_desc`
1611
+ - $ref: '#/components/parameters/Format'
1612
+ responses:
1613
+ '200':
1614
+ description: Queued items found
1615
+ content:
1616
+ application/json:
1617
+ schema:
1618
+ $ref: '#/components/schemas/QueuedItems'
1619
+ '401':
1620
+ $ref: '#/components/responses/UnauthorizedError'
1621
+ default:
1622
+ $ref: '#/components/responses/Error'
1623
+ /api/reorder_queued_item:
1624
+ get:
1625
+ operationId: reorder_queued_item
1626
+ summary: Move a queued item
1627
+ tags:
1628
+ - Queues
1629
+ parameters:
1630
+ - name: operation
1631
+ in: query
1632
+ required: true
1633
+ schema:
1634
+ type: string
1635
+ enum:
1636
+ - up
1637
+ - down
1638
+ - first
1639
+ - last
1640
+ description: Move
1641
+ - name: queued_item_id
1642
+ in: query
1643
+ schema:
1644
+ type: integer
1645
+ description: ID of the queued item
1646
+ - name: queued_item
1647
+ in: query
1648
+ schema:
1649
+ type: string
1650
+ description: Queued item, when `queued_item_id` is not given
1651
+ - name: queue_name
1652
+ in: query
1653
+ schema:
1654
+ type: string
1655
+ description: Queue name, to find `queued_item`
1656
+ - $ref: '#/components/parameters/Format'
1657
+ responses:
1658
+ '200':
1659
+ description: The moved item
1660
+ content:
1661
+ application/json:
1662
+ schema:
1663
+ $ref: '#/components/schemas/QueuedItems'
1664
+ '401':
1665
+ $ref: '#/components/responses/UnauthorizedError'
1666
+ default:
1667
+ $ref: '#/components/responses/Error'
1668
+ /api/bulk_reorder_queue:
1669
+ get:
1670
+ operationId: bulk_reorder_queue
1671
+ summary: Move several queued items
1672
+ tags:
1673
+ - Queues
1674
+ parameters:
1675
+ - name: queued_item_ids
1676
+ in: query
1677
+ style: form
1678
+ explode: false
1679
+ required: true
1680
+ schema:
1681
+ type: array
1682
+ items:
1683
+ type: integer
1684
+ description: Comma-separated IDs of queued items
1685
+ - name: operation
1686
+ in: query
1687
+ required: true
1688
+ schema:
1689
+ type: string
1690
+ enum:
1691
+ - up
1692
+ - down
1693
+ - first
1694
+ - last
1695
+ description: Move
1696
+ - $ref: '#/components/parameters/Format'
1697
+ responses:
1698
+ '200':
1699
+ description: The moved items
1700
+ content:
1701
+ application/json:
1702
+ schema:
1703
+ type: object
1704
+ properties:
1705
+ queued_items:
1706
+ type: array
1707
+ items:
1708
+ type: object
1709
+ properties:
1710
+ queued_item:
1711
+ $ref: '#/components/schemas/QueuedItem'
1712
+ queue_data:
1713
+ $ref: '#/components/schemas/QueueMetadata'
1714
+ '401':
1715
+ $ref: '#/components/responses/UnauthorizedError'
1716
+ default:
1717
+ $ref: '#/components/responses/Error'
1718
+ /api/delete_queued_item:
1719
+ get:
1720
+ operationId: delete_queued_item
1721
+ summary: Delete a queued item
1722
+ tags:
1723
+ - Queues
1724
+ parameters:
1725
+ - name: queue_name
1726
+ in: query
1727
+ required: true
1728
+ schema:
1729
+ type: string
1730
+ description: Queue name
1731
+ - name: queued_item_id
1732
+ in: query
1733
+ required: true
1734
+ schema:
1735
+ type: integer
1736
+ description: ID of the queued item
1737
+ - $ref: '#/components/parameters/Format'
1738
+ responses:
1739
+ '200':
1740
+ description: Confirmation message
1741
+ content:
1742
+ application/json:
1743
+ schema:
1744
+ type: string
1745
+ description: Plain text, not JSON-encoded, although the content type is `application/json`
1746
+ examples:
1747
+ - Item with id 21 was succesfully deleted.
1748
+ '401':
1749
+ $ref: '#/components/responses/UnauthorizedError'
1750
+ default:
1751
+ $ref: '#/components/responses/Error'
1752
+ /api/monitor_snapshot:
1753
+ get:
1754
+ operationId: monitor_snapshot
1755
+ summary: Status of the monitors
1756
+ tags:
1757
+ - Monitors
1758
+ parameters:
1759
+ - name: id
1760
+ in: query
1761
+ schema:
1762
+ type: string
1763
+ enum:
1764
+ - workflows
1765
+ - workorders
1766
+ - folders
1767
+ - nodes
1768
+ - scripts
1769
+ description: 'Only monitors of this type (also in the path `/api/monitor_snapshot/<type>`). Not set: all.'
1770
+ - $ref: '#/components/parameters/Format'
1771
+ responses:
1772
+ '200':
1773
+ description: Monitor snapshot data
1774
+ content:
1775
+ application/json:
1776
+ schema:
1777
+ type: object
1778
+ properties:
1779
+ monitor:
1780
+ type: object
1781
+ properties:
1782
+ monitor_workflows:
1783
+ type: object
1784
+ description: Empty when there is no monitor
1785
+ properties:
1786
+ monitor_workflow:
1787
+ type: array
1788
+ items:
1789
+ type: object
1790
+ properties:
1791
+ id:
1792
+ type: integer
1793
+ workflow_id:
1794
+ type: integer
1795
+ workflow_name:
1796
+ type: string
1797
+ last_activity:
1798
+ type: string
1799
+ description: Last activity of the workflow or work order (`YYYY-MM-DD HH:MM:SS`), `-` if none. Only when active.
1800
+ active:
1801
+ type: boolean
1802
+ status:
1803
+ type: string
1804
+ description: 'Status of the monitor: `Monitoring Off`, `No Issues`, `Alerts`, `Warnings`, or `Fetching` (remote node monitor)'
1805
+ examples:
1806
+ - No Issues
1807
+ status_report:
1808
+ type: string
1809
+ description: Status text of the monitor, `-` when there is nothing to report. Only when active.
1810
+ last_polled:
1811
+ type: [string, 'null']
1812
+ format: date-time
1813
+ description: Time of the last refresh of the status. Only when active.
1814
+ monitor_workorders:
1815
+ type: object
1816
+ description: Empty when there is no monitor
1817
+ properties:
1818
+ monitor_workorder:
1819
+ type: array
1820
+ items:
1821
+ type: object
1822
+ properties:
1823
+ id:
1824
+ type: integer
1825
+ workflow_id:
1826
+ type: integer
1827
+ workflow_name:
1828
+ type: string
1829
+ last_activity:
1830
+ type: string
1831
+ description: Last activity of the workflow or work order (`YYYY-MM-DD HH:MM:SS`), `-` if none. Only when active.
1832
+ active:
1833
+ type: boolean
1834
+ status:
1835
+ type: string
1836
+ description: 'Status of the monitor: `Monitoring Off`, `No Issues`, `Alerts`, `Warnings`, or `Fetching` (remote node monitor)'
1837
+ examples:
1838
+ - No Issues
1839
+ status_report:
1840
+ type: string
1841
+ description: Status text of the monitor, `-` when there is nothing to report. Only when active.
1842
+ last_polled:
1843
+ type: [string, 'null']
1844
+ format: date-time
1845
+ description: Time of the last refresh of the status. Only when active.
1846
+ monitor_folders:
1847
+ type: object
1848
+ description: Empty when there is no monitor
1849
+ properties:
1850
+ monitor_folder:
1851
+ type: array
1852
+ items:
1853
+ type: object
1854
+ properties:
1855
+ id:
1856
+ type: integer
1857
+ folder:
1858
+ type: string
1859
+ description: Description of the monitor
1860
+ path:
1861
+ type: string
1862
+ content:
1863
+ type: string
1864
+ description: Number of files and folders, e.g. `3 files, 1 folders`, or `-`. Only when active.
1865
+ age_range:
1866
+ type: string
1867
+ description: Age of the youngest and oldest entries, with the aging unit of the monitor, or `-`. Only when active.
1868
+ active:
1869
+ type: boolean
1870
+ status:
1871
+ type: string
1872
+ description: 'Status of the monitor: `Monitoring Off`, `No Issues`, `Alerts`, `Warnings`, or `Fetching` (remote node monitor)'
1873
+ examples:
1874
+ - No Issues
1875
+ status_report:
1876
+ type: string
1877
+ description: Status text of the monitor, `-` when there is nothing to report. Only when active.
1878
+ last_polled:
1879
+ type: [string, 'null']
1880
+ format: date-time
1881
+ description: Time of the last refresh of the status. Only when active.
1882
+ monitor_nodes:
1883
+ type: object
1884
+ description: Empty when there is no monitor
1885
+ properties:
1886
+ monitor_node:
1887
+ type: array
1888
+ items:
1889
+ type: object
1890
+ properties:
1891
+ id:
1892
+ type: integer
1893
+ name:
1894
+ type: string
1895
+ remote_node:
1896
+ type: string
1897
+ active:
1898
+ type: boolean
1899
+ status:
1900
+ type: string
1901
+ description: 'Status of the monitor: `Monitoring Off`, `No Issues`, `Alerts`, `Warnings`, or `Fetching` (remote node monitor)'
1902
+ examples:
1903
+ - No Issues
1904
+ status_report:
1905
+ type: string
1906
+ description: Status text of the monitor, `-` when there is nothing to report. Only when active.
1907
+ last_polled:
1908
+ type: [string, 'null']
1909
+ format: date-time
1910
+ description: Time of the last refresh of the status. Only when active.
1911
+ monitor_scripts:
1912
+ type: object
1913
+ description: Empty when there is no monitor
1914
+ properties:
1915
+ monitor_script:
1916
+ type: array
1917
+ items:
1918
+ type: object
1919
+ properties:
1920
+ id:
1921
+ type: integer
1922
+ script:
1923
+ type: string
1924
+ description: Description of the monitor
1925
+ node:
1926
+ type: string
1927
+ path:
1928
+ type: string
1929
+ active:
1930
+ type: boolean
1931
+ status:
1932
+ type: string
1933
+ description: 'Status of the monitor: `Monitoring Off`, `No Issues`, `Alerts`, `Warnings`, or `Fetching` (remote node monitor)'
1934
+ examples:
1935
+ - No Issues
1936
+ status_report:
1937
+ type: string
1938
+ description: Status text of the monitor, `-` when there is nothing to report. Only when active.
1939
+ last_polled:
1940
+ type: [string, 'null']
1941
+ format: date-time
1942
+ description: Time of the last refresh of the status. Only when active.
1943
+ '401':
1944
+ $ref: '#/components/responses/UnauthorizedError'
1945
+ default:
1946
+ $ref: '#/components/responses/Error'
1947
+ /api/list_monitors/{id}:
1948
+ get:
1949
+ operationId: list_monitors
1950
+ summary: List the monitors of a type
1951
+ tags:
1952
+ - Monitors
1953
+ parameters:
1954
+ - $ref: '#/components/parameters/AnyId'
1955
+ - $ref: '#/components/parameters/MonitorType'
1956
+ - $ref: '#/components/parameters/Format'
1957
+ responses:
1958
+ '200':
1959
+ description: List of monitors
1960
+ content:
1961
+ application/json:
1962
+ schema:
1963
+ type: array
1964
+ description: All the attributes of the monitors. For type `workorder`, each monitor is in an object with key `monitor-workorder`. Remote node monitors give the names of the monitored remote nodes (`remote_node_name`).
1965
+ items:
1966
+ type: object
1967
+ description: Attributes of one monitor (depend on the monitor type)
1968
+ additionalProperties: true
1969
+ '401':
1970
+ $ref: '#/components/responses/UnauthorizedError'
1971
+ default:
1972
+ $ref: '#/components/responses/Error'
1973
+ /api/activate_monitor/{id}:
1974
+ get:
1975
+ operationId: activate_monitor
1976
+ summary: Activate a monitor
1977
+ tags:
1978
+ - Monitors
1979
+ parameters:
1980
+ - name: id
1981
+ in: path
1982
+ required: true
1983
+ schema:
1984
+ type: string
1985
+ description: Monitor ID or portable ID
1986
+ - name: portable_id
1987
+ in: query
1988
+ schema:
1989
+ type: string
1990
+ description: Portable ID of the monitor, used when the `id` segment is empty
1991
+ - $ref: '#/components/parameters/MonitorType'
1992
+ - $ref: '#/components/parameters/Format'
1993
+ responses:
1994
+ '200':
1995
+ description: Monitor activated
1996
+ content:
1997
+ application/json:
1998
+ schema:
1999
+ $ref: '#/components/schemas/MonitorChange'
2000
+ '401':
2001
+ $ref: '#/components/responses/UnauthorizedError'
2002
+ default:
2003
+ $ref: '#/components/responses/Error'
2004
+ /api/deactivate_monitor/{id}:
2005
+ get:
2006
+ operationId: deactivate_monitor
2007
+ summary: Deactivate a monitor
2008
+ tags:
2009
+ - Monitors
2010
+ parameters:
2011
+ - name: id
2012
+ in: path
2013
+ required: true
2014
+ schema:
2015
+ type: string
2016
+ description: Monitor ID or portable ID
2017
+ - name: portable_id
2018
+ in: query
2019
+ schema:
2020
+ type: string
2021
+ description: Portable ID of the monitor, used when the `id` segment is empty
2022
+ - $ref: '#/components/parameters/MonitorType'
2023
+ - $ref: '#/components/parameters/Format'
2024
+ responses:
2025
+ '200':
2026
+ description: Monitor deactivated
2027
+ content:
2028
+ application/json:
2029
+ schema:
2030
+ $ref: '#/components/schemas/MonitorChange'
2031
+ '401':
2032
+ $ref: '#/components/responses/UnauthorizedError'
2033
+ default:
2034
+ $ref: '#/components/responses/Error'
2035
+ /api/list_tasks/{id}:
2036
+ get:
2037
+ operationId: list_tasks
2038
+ summary: Tasks (user inputs) waiting for a user
2039
+ tags:
2040
+ - Tasks
2041
+ parameters:
2042
+ - name: id
2043
+ in: path
2044
+ required: true
2045
+ schema:
2046
+ type: string
2047
+ description: User login or ID, or `self`. Only an administrator can list the tasks of another user.
2048
+ - $ref: '#/components/parameters/Format'
2049
+ responses:
2050
+ '200':
2051
+ description: List of tasks
2052
+ content:
2053
+ application/json:
2054
+ schema:
2055
+ type: object
2056
+ properties:
2057
+ user:
2058
+ type: string
2059
+ description: Login of the user
2060
+ tasks:
2061
+ type: array
2062
+ items:
2063
+ allOf:
2064
+ - $ref: '#/components/schemas/Task'
2065
+ properties:
2066
+ event:
2067
+ type: string
2068
+ group:
2069
+ type: string
2070
+ description: Group the task is assigned to
2071
+ user:
2072
+ type: string
2073
+ description: User the task is assigned to
2074
+ requested_user_inputs:
2075
+ type: array
2076
+ items:
2077
+ type: object
2078
+ properties:
2079
+ name:
2080
+ type: string
2081
+ required:
2082
+ type: boolean
2083
+ value_type:
2084
+ type: string
2085
+ '401':
2086
+ $ref: '#/components/responses/UnauthorizedError'
2087
+ default:
2088
+ $ref: '#/components/responses/Error'
2089
+ /api/task_details/{id}:
2090
+ get:
2091
+ operationId: task_details
2092
+ summary: Details of a task
2093
+ tags:
2094
+ - Tasks
2095
+ parameters:
2096
+ - name: id
2097
+ in: path
2098
+ required: true
2099
+ schema:
2100
+ type: string
2101
+ pattern: ^(WO)?[0-9]+$
2102
+ description: Task ID, or `WO<work order ID>` for the user input of a work order
2103
+ - name: step_name
2104
+ in: query
2105
+ schema:
2106
+ type: string
2107
+ description: 'With `WO<id>`, step of the user input when the work order has several. Orchestrator 4.1.6 checks that `Step_name` is set and compares `step_name`: give both.'
2108
+ - name: Step_name
2109
+ in: query
2110
+ schema:
2111
+ type: string
2112
+ description: Same value as `step_name` (see `step_name`)
2113
+ - $ref: '#/components/parameters/Format'
2114
+ responses:
2115
+ '200':
2116
+ description: Task details
2117
+ content:
2118
+ application/json:
2119
+ schema:
2120
+ type: object
2121
+ properties:
2122
+ task:
2123
+ $ref: '#/components/schemas/Task'
2124
+ task_inputs:
2125
+ type: object
2126
+ description: Parameters received by the task (name to value)
2127
+ additionalProperties: true
2128
+ user_inputs:
2129
+ type: array
2130
+ items:
2131
+ $ref: '#/components/schemas/UserInput'
2132
+ '401':
2133
+ $ref: '#/components/responses/UnauthorizedError'
2134
+ default:
2135
+ $ref: '#/components/responses/Error'
2136
+ /api/submit_task/{id}:
2137
+ get:
2138
+ operationId: submit_task
2139
+ summary: Complete a task with the user inputs
2140
+ tags:
2141
+ - Tasks
2142
+ parameters:
2143
+ - name: id
2144
+ in: path
2145
+ required: true
2146
+ schema:
2147
+ type: integer
2148
+ description: Task ID
2149
+ - name: outputs
2150
+ in: query
2151
+ style: deepObject
2152
+ explode: true
2153
+ schema:
2154
+ $ref: '#/components/schemas/TaskUserInputs'
2155
+ description: Values of the user inputs, e.g. `outputs[Filename]=tron.avi`. All required inputs must be given.
2156
+ - name: input_provider
2157
+ in: query
2158
+ schema:
2159
+ type: string
2160
+ description: Login of the user who provides the inputs (administrator only)
2161
+ - $ref: '#/components/parameters/Format'
2162
+ responses:
2163
+ '200':
2164
+ description: The completed task
2165
+ content:
2166
+ application/json:
2167
+ schema:
2168
+ type: object
2169
+ properties:
2170
+ task:
2171
+ $ref: '#/components/schemas/Task'
2172
+ user_inputs:
2173
+ type: object
2174
+ description: Values of the user inputs (name to value)
2175
+ additionalProperties: true
2176
+ input_provider:
2177
+ type: string
2178
+ '401':
2179
+ $ref: '#/components/responses/UnauthorizedError'
2180
+ default:
2181
+ $ref: '#/components/responses/Error'
2182
+ /api/search_tasks/{id}:
2183
+ get:
2184
+ operationId: search_tasks
2185
+ summary: Search the tasks of the current user
2186
+ tags:
2187
+ - Tasks
2188
+ parameters:
2189
+ - $ref: '#/components/parameters/AnyId'
2190
+ - name: value
2191
+ in: query
2192
+ required: true
2193
+ schema:
2194
+ type: string
2195
+ description: Search key
2196
+ - $ref: '#/components/parameters/Format'
2197
+ responses:
2198
+ '200':
2199
+ description: Tasks found
2200
+ content:
2201
+ application/json:
2202
+ schema:
2203
+ type: array
2204
+ items:
2205
+ anyOf:
2206
+ - title: Task
2207
+ type: object
2208
+ properties:
2209
+ id:
2210
+ type: integer
2211
+ task:
2212
+ $ref: '#/components/schemas/Task'
2213
+ task_inputs:
2214
+ type: object
2215
+ description: Parameters received by the task (name to value)
2216
+ additionalProperties: true
2217
+ user_inputs:
2218
+ type: array
2219
+ items:
2220
+ $ref: '#/components/schemas/UserInput'
2221
+ - title: Task without access
2222
+ type: object
2223
+ properties:
2224
+ id:
2225
+ type: integer
2226
+ error:
2227
+ type: string
2228
+ '401':
2229
+ $ref: '#/components/responses/UnauthorizedError'
2230
+ default:
2231
+ $ref: '#/components/responses/Error'
2232
+ /api/plugin_version:
2233
+ get:
2234
+ operationId: plugin_version
2235
+ summary: Versions of the plugins
2236
+ tags:
2237
+ - Plugins
2238
+ parameters:
2239
+ - name: id
2240
+ in: query
2241
+ schema:
2242
+ type: string
2243
+ description: Only this plugin (action type), e.g. `ascp client` (also in the path `/api/plugin_version/<name>`)
2244
+ - $ref: '#/components/parameters/Format'
2245
+ responses:
2246
+ '200':
2247
+ description: Plugin versions
2248
+ content:
2249
+ application/json:
2250
+ schema:
2251
+ type: object
2252
+ properties:
2253
+ Plugin:
2254
+ type: array
2255
+ items:
2256
+ type: object
2257
+ properties:
2258
+ name:
2259
+ type: string
2260
+ version:
2261
+ type: string
2262
+ examples:
2263
+ - 1.2.3
2264
+ '401':
2265
+ $ref: '#/components/responses/UnauthorizedError'
2266
+ default:
2267
+ $ref: '#/components/responses/Error'
2268
+ /api/reload_plugin:
2269
+ get:
2270
+ operationId: reload_plugin
2271
+ summary: Reload a plugin, or all enabled plugins
2272
+ tags:
2273
+ - Plugins
2274
+ parameters:
2275
+ - name: action_type
2276
+ in: query
2277
+ schema:
2278
+ type: string
2279
+ description: 'Plugin class name, e.g. `Adi3Parser`. Not set: all enabled plugins.'
2280
+ - $ref: '#/components/parameters/Format'
2281
+ responses:
2282
+ '200':
2283
+ description: Reload status of each plugin
2284
+ content:
2285
+ application/json:
2286
+ schema:
2287
+ $ref: '#/components/schemas/PluginReloadStatus'
2288
+ '401':
2289
+ $ref: '#/components/responses/UnauthorizedError'
2290
+ default:
2291
+ $ref: '#/components/responses/Error'
2292
+ /api/reload_plugin_set:
2293
+ post:
2294
+ operationId: reload_plugin_set
2295
+ summary: Reload a set of plugins
2296
+ description: 'With format `json`, the body is `{"plugin_set": [...]}`; with format `xml`, `<plugin_set><action_type>...</action_type>...</plugin_set>`.'
2297
+ tags:
2298
+ - Plugins
2299
+ parameters:
2300
+ - $ref: '#/components/parameters/Format'
2301
+ requestBody:
2302
+ required: true
2303
+ content:
2304
+ application/json:
2305
+ schema:
2306
+ type: object
2307
+ required:
2308
+ - plugin_set
2309
+ properties:
2310
+ plugin_set:
2311
+ type: array
2312
+ description: Plugin class names
2313
+ items:
2314
+ type: string
2315
+ examples:
2316
+ - - Adi3Parser
2317
+ - AdiParser
2318
+ application/xml:
2319
+ schema:
2320
+ type: string
2321
+ examples:
2322
+ - <plugin_set><action_type>Adi3Parser</action_type></plugin_set>
2323
+ responses:
2324
+ '200':
2325
+ description: Reload status of each plugin
2326
+ content:
2327
+ application/json:
2328
+ schema:
2329
+ $ref: '#/components/schemas/PluginReloadStatus'
2330
+ '401':
2331
+ $ref: '#/components/responses/UnauthorizedError'
2332
+ default:
2333
+ $ref: '#/components/responses/Error'
2334
+ /api/enable_plugin/{id}:
2335
+ get:
2336
+ operationId: enable_plugin
2337
+ summary: Enable a plugin, or all plugins
2338
+ tags:
2339
+ - Plugins
2340
+ parameters:
2341
+ - $ref: '#/components/parameters/AnyId'
2342
+ - name: action_type
2343
+ in: query
2344
+ schema:
2345
+ type: string
2346
+ description: 'Plugin class name. Not set: all plugins.'
2347
+ - $ref: '#/components/parameters/Format'
2348
+ responses:
2349
+ '200':
2350
+ description: Installation ID
2351
+ content:
2352
+ application/json:
2353
+ schema:
2354
+ type: object
2355
+ properties:
2356
+ install_id:
2357
+ type: integer
2358
+ description: '`0` for all plugins'
2359
+ '401':
2360
+ $ref: '#/components/responses/UnauthorizedError'
2361
+ default:
2362
+ $ref: '#/components/responses/Error'
2363
+ /api/import_plugin/{id}:
2364
+ get:
2365
+ operationId: import_plugin
2366
+ summary: Import a plugin from a file on the Orchestrator host
2367
+ tags:
2368
+ - Plugins
2369
+ parameters:
2370
+ - $ref: '#/components/parameters/AnyId'
2371
+ - name: file
2372
+ in: query
2373
+ required: true
2374
+ schema:
2375
+ type: string
2376
+ description: Path of the plugin archive on the Orchestrator host
2377
+ - $ref: '#/components/parameters/Format'
2378
+ responses:
2379
+ '200':
2380
+ description: Class name of the imported plugin
2381
+ content:
2382
+ application/json:
2383
+ schema:
2384
+ type: object
2385
+ properties:
2386
+ action_type:
2387
+ type: string
2388
+ '401':
2389
+ $ref: '#/components/responses/UnauthorizedError'
2390
+ default:
2391
+ $ref: '#/components/responses/Error'
2392
+ /api/portlet_version:
2393
+ get:
2394
+ operationId: portlet_version
2395
+ summary: Versions of the portlets
2396
+ tags:
2397
+ - Portlets
2398
+ parameters:
2399
+ - name: id
2400
+ in: query
2401
+ schema:
2402
+ type: string
2403
+ description: Only this portlet (name), also in the path `/api/portlet_version/<name>`
2404
+ - $ref: '#/components/parameters/Format'
2405
+ responses:
2406
+ '200':
2407
+ description: Portlet versions
2408
+ content:
2409
+ application/json:
2410
+ schema:
2411
+ type: object
2412
+ properties:
2413
+ Portlet:
2414
+ type: array
2415
+ items:
2416
+ type: object
2417
+ properties:
2418
+ name:
2419
+ type: string
2420
+ version:
2421
+ type: string
2422
+ examples:
2423
+ - 1.2.3
2424
+ '401':
2425
+ $ref: '#/components/responses/UnauthorizedError'
2426
+ default:
2427
+ $ref: '#/components/responses/Error'
2428
+ /api/processes_status:
2429
+ get:
2430
+ operationId: processes_status
2431
+ summary: Status of the processes (engine, monitor, workers)
2432
+ tags:
2433
+ - System
2434
+ parameters:
2435
+ - $ref: '#/components/parameters/Format'
2436
+ responses:
2437
+ '200':
2438
+ description: Process status information
2439
+ content:
2440
+ application/json:
2441
+ schema:
2442
+ type: object
2443
+ description: Conversion of the XML, so all values are strings
2444
+ properties:
2445
+ processes:
2446
+ type: object
2447
+ properties:
2448
+ time:
2449
+ type: string
2450
+ action:
2451
+ type: string
2452
+ const: status
2453
+ engine_id:
2454
+ type: string
2455
+ node:
2456
+ description: A node, or a list when there are several
2457
+ oneOf:
2458
+ - $ref: '#/components/schemas/ProcessNode'
2459
+ - type: array
2460
+ items:
2461
+ $ref: '#/components/schemas/ProcessNode'
2462
+ '401':
2463
+ $ref: '#/components/responses/UnauthorizedError'
2464
+ default:
2465
+ $ref: '#/components/responses/Error'
2466
+ /api/control_process/{id}:
2467
+ get:
2468
+ operationId: control_process
2469
+ summary: Start, stop or kill a process
2470
+ description: Returns the status of the processes (in XML, the same as `processes_status`).
2471
+ tags:
2472
+ - System
2473
+ parameters:
2474
+ - name: id
2475
+ in: path
2476
+ required: true
2477
+ schema:
2478
+ type: string
2479
+ enum:
2480
+ - engine
2481
+ - monitor
2482
+ - worker
2483
+ description: Process type
2484
+ - name: command
2485
+ in: query
2486
+ required: true
2487
+ schema:
2488
+ type: string
2489
+ enum:
2490
+ - start
2491
+ - stop
2492
+ - kill
2493
+ - status
2494
+ description: Command (`status` does nothing but returns the status)
2495
+ - name: worker_id
2496
+ in: query
2497
+ style: form
2498
+ explode: false
2499
+ schema:
2500
+ type: array
2501
+ items:
2502
+ type: integer
2503
+ description: Comma-separated worker IDs, required for type `worker`
2504
+ - $ref: '#/components/parameters/Format'
2505
+ responses:
2506
+ '200':
2507
+ description: Status of the processes
2508
+ content:
2509
+ application/json:
2510
+ schema:
2511
+ type: object
2512
+ properties:
2513
+ processes:
2514
+ type: object
2515
+ properties:
2516
+ time:
2517
+ type: string
2518
+ action:
2519
+ type: string
2520
+ const: status
2521
+ engine_id:
2522
+ type: integer
2523
+ process:
2524
+ type: array
2525
+ items:
2526
+ type: object
2527
+ properties:
2528
+ class:
2529
+ type: string
2530
+ enum:
2531
+ - engine
2532
+ - monitor
2533
+ - node_mesh
2534
+ - worker
2535
+ id:
2536
+ type: integer
2537
+ description: Worker ID
2538
+ pid:
2539
+ type: [integer, string]
2540
+ description: '`-` when not running'
2541
+ status:
2542
+ type: string
2543
+ enum:
2544
+ - running
2545
+ - not running
2546
+ type:
2547
+ type: string
2548
+ description: Worker type
2549
+ enum:
2550
+ - normal
2551
+ - asynchronous
2552
+ - dedicated
2553
+ '401':
2554
+ $ref: '#/components/responses/UnauthorizedError'
2555
+ default:
2556
+ $ref: '#/components/responses/Error'
2557
+ /api/custom_api_call:
2558
+ get:
2559
+ operationId: custom_api_call
2560
+ summary: Store data in the shared state, for a database trigger
2561
+ description: The query parameters and the request body are stored in table `SharedState`, where a workflow can watch them with a database trigger. The response is always XML.
2562
+ tags:
2563
+ - System
2564
+ parameters:
2565
+ - name: identifier
2566
+ in: query
2567
+ schema:
2568
+ type: string
2569
+ description: 'Aggregate type of the shared state (default: `custom_api_call`)'
2570
+ - name: uniq_id
2571
+ in: query
2572
+ required: true
2573
+ schema:
2574
+ type: integer
2575
+ description: Aggregate ID of the shared state, an integer
2576
+ - name: object
2577
+ in: query
2578
+ schema:
2579
+ type: string
2580
+ description: JSON text of the object to store
2581
+ responses:
2582
+ '200':
2583
+ description: ID of the shared state (XML)
2584
+ '401':
2585
+ $ref: '#/components/responses/UnauthorizedError'
2586
+ default:
2587
+ $ref: '#/components/responses/Error'
2588
+ /api/execution_queue_stats/{id}:
2589
+ get:
2590
+ operationId: execution_queue_stats
2591
+ summary: Statistics of the execution queue of the engine
2592
+ tags:
2593
+ - System
2594
+ parameters:
2595
+ - $ref: '#/components/parameters/AnyId'
2596
+ - $ref: '#/components/parameters/Format'
2597
+ responses:
2598
+ '200':
2599
+ description: Queue statistics
2600
+ content:
2601
+ application/json:
2602
+ schema:
2603
+ type: object
2604
+ properties:
2605
+ next_polling_due:
2606
+ type: [integer, string]
2607
+ description: Seconds until the next polling, or `-`
2608
+ completed_items:
2609
+ type: integer
2610
+ unassigned_items:
2611
+ type: integer
2612
+ error_items:
2613
+ type: integer
2614
+ inprogress_synch_count:
2615
+ type: integer
2616
+ inprogress_asynch_count:
2617
+ type: integer
2618
+ created:
2619
+ type: integer
2620
+ description: Number of work orders with this status
2621
+ ready:
2622
+ type: integer
2623
+ initializing:
2624
+ type: integer
2625
+ initialized:
2626
+ type: integer
2627
+ in_progress:
2628
+ type: integer
2629
+ paused:
2630
+ type: integer
2631
+ time_executed:
2632
+ type: string
2633
+ engine_id:
2634
+ type: integer
2635
+ '401':
2636
+ $ref: '#/components/responses/UnauthorizedError'
2637
+ default:
2638
+ $ref: '#/components/responses/Error'
2639
+ /api/alerts/{id}:
2640
+ get:
2641
+ operationId: alerts
2642
+ summary: Alerts of the categories the user is subscribed to
2643
+ tags:
2644
+ - System
2645
+ parameters:
2646
+ - $ref: '#/components/parameters/AnyId'
2647
+ - name: count_only
2648
+ in: query
2649
+ schema:
2650
+ type: string
2651
+ enum:
2652
+ - 'true'
2653
+ - 'false'
2654
+ description: 'Return only the number of alerts: `{"count"}`'
2655
+ - name: category
2656
+ in: query
2657
+ schema:
2658
+ type: string
2659
+ enum:
2660
+ - WorkflowAlerts
2661
+ - UserAlerts
2662
+ - WorkorderAlerts
2663
+ - MonitorAlerts
2664
+ - PluginAlerts
2665
+ description: Only alerts of this category (case sensitive). With another value, no alert is returned.
2666
+ - $ref: '#/components/parameters/Format'
2667
+ responses:
2668
+ '200':
2669
+ description: List of alerts, or their number
2670
+ content:
2671
+ application/json:
2672
+ schema:
2673
+ oneOf:
2674
+ - title: Count
2675
+ description: With `count_only=true`
2676
+ type: object
2677
+ properties:
2678
+ count:
2679
+ type: integer
2680
+ - type: array
2681
+ items:
2682
+ $ref: '#/components/schemas/AlertNotification'
2683
+ '401':
2684
+ $ref: '#/components/responses/UnauthorizedError'
2685
+ default:
2686
+ $ref: '#/components/responses/Error'
2687
+ /api/remote_node_ping:
2688
+ get:
2689
+ operationId: remote_node_ping
2690
+ summary: Version and platform of this Orchestrator
2691
+ tags:
2692
+ - Remote Nodes
2693
+ parameters:
2694
+ - $ref: '#/components/parameters/Format'
2695
+ responses:
2696
+ '200':
2697
+ description: Orchestrator information
2698
+ content:
2699
+ application/json:
2700
+ schema:
2701
+ type: object
2702
+ properties:
2703
+ remote_orchestrator_info:
2704
+ type: object
2705
+ properties:
2706
+ orchestrator-version:
2707
+ type: string
2708
+ platform:
2709
+ type: string
2710
+ engine_id:
2711
+ type: integer
2712
+ '401':
2713
+ $ref: '#/components/responses/UnauthorizedError'
2714
+ default:
2715
+ $ref: '#/components/responses/Error'
2716
+ /api/test_step/{id}:
2717
+ get:
2718
+ operationId: test_step
2719
+ summary: Launch test cases for a workflow step
2720
+ description: |
2721
+ Launches test cases against a workflow and returns a **Test_run_id** UUID.
2722
+ Pass that UUID to `/api/test_step_status` to poll for results.
2723
+ tags:
2724
+ - Testing
2725
+ parameters:
2726
+ - name: id
2727
+ in: path
2728
+ required: true
2729
+ schema:
2730
+ type: string
2731
+ description: Workflow ID or portable ID to test
2732
+ example: my_workflow
2733
+ - name: step
2734
+ in: query
2735
+ style: form
2736
+ explode: false
2737
+ schema:
2738
+ type: array
2739
+ items:
2740
+ type: string
2741
+ description: Comma-separated step name(s) to test. Omit to test all steps.
2742
+ example:
2743
+ - Get file size
2744
+ - name: case
2745
+ in: query
2746
+ schema:
2747
+ type: string
2748
+ description: Test case name to run. Omit to run all cases for the step.
2749
+ example: File doesnt exist
2750
+ - name: synchronous
2751
+ in: query
2752
+ schema:
2753
+ type: string
2754
+ enum:
2755
+ - 'true'
2756
+ - 'false'
2757
+ description: '`true`: wait for all test cases to complete before returning'
2758
+ - $ref: '#/components/parameters/Format'
2759
+ responses:
2760
+ '200':
2761
+ description: Test run launched. Response contains `Test_run_id` UUID to use with `/api/test_step_status`.
2762
+ content:
2763
+ application/json:
2764
+ schema:
2765
+ $ref: '#/components/schemas/TestRun'
2766
+ '401':
2767
+ $ref: '#/components/responses/UnauthorizedError'
2768
+ default:
2769
+ $ref: '#/components/responses/Error'
2770
+ '404':
2771
+ description: Workflow not found
2772
+ /api/test_step_status/{id}:
2773
+ get:
2774
+ operationId: test_step_status
2775
+ summary: Get test step status
2776
+ description: |
2777
+ Poll the status of a test run previously launched by `/api/test_step`.
2778
+ The `id` parameter must be the **Test_run_id UUID** returned by that call, not a numeric workflow or step ID.
2779
+ tags:
2780
+ - Testing
2781
+ parameters:
2782
+ - name: id
2783
+ in: path
2784
+ required: true
2785
+ schema:
2786
+ type: string
2787
+ format: uuid
2788
+ description: Test run UUID returned by /api/test_step (e.g. 935e0080-97f5-0135-26f8-34363bc6aedc)
2789
+ example: 935e0080-97f5-0135-26f8-34363bc6aedc
2790
+ - $ref: '#/components/parameters/Format'
2791
+ responses:
2792
+ '200':
2793
+ description: Test status
2794
+ content:
2795
+ application/json:
2796
+ schema:
2797
+ $ref: '#/components/schemas/TestRun'
2798
+ '401':
2799
+ $ref: '#/components/responses/UnauthorizedError'
2800
+ default:
2801
+ $ref: '#/components/responses/Error'
2802
+ /api/work_order_stats/{id}:
2803
+ get:
2804
+ operationId: work_order_stats
2805
+ summary: Work order statistics, monthly or for a day
2806
+ description: Returns the text `No Statistics found. Change the filter and try again.` when there is none.
2807
+ tags:
2808
+ - Statistics
2809
+ parameters:
2810
+ - $ref: '#/components/parameters/AnyId'
2811
+ - name: workflow_id
2812
+ in: query
2813
+ schema:
2814
+ type: integer
2815
+ description: Only this workflow
2816
+ - name: label
2817
+ in: query
2818
+ schema:
2819
+ type: string
2820
+ description: Only work orders with this label
2821
+ - name: date
2822
+ in: query
2823
+ schema:
2824
+ type: string
2825
+ format: date
2826
+ description: 'Statistics of this day, e.g. `2017-04-04`. Not set: monthly statistics.'
2827
+ - $ref: '#/components/parameters/Format'
2828
+ responses:
2829
+ '200':
2830
+ description: Work order statistics
2831
+ content:
2832
+ application/json:
2833
+ schema:
2834
+ type: array
2835
+ description: By day (monthly statistics of the last 30 days), or by hour (statistics of a day). The sums are decimal strings.
2836
+ items:
2837
+ type: object
2838
+ properties:
2839
+ Date:
2840
+ type: string
2841
+ Last_hour:
2842
+ type: string
2843
+ format: date-time
2844
+ Complete_Work_Orders:
2845
+ type: [string, integer]
2846
+ Failed_Work_Orders:
2847
+ type: [string, integer]
2848
+ Errored_Work_Orders:
2849
+ type: [string, integer]
2850
+ Canceled_Work_Orders:
2851
+ type: [string, integer]
2852
+ Rolled_Back_Work_Orders:
2853
+ type: [string, integer]
2854
+ Destroyed_Work_Orders:
2855
+ type: [string, integer]
2856
+ Cleared_Work_Orders:
2857
+ type: [string, integer]
2858
+ Flagged_Work_Orders:
2859
+ type: [string, integer]
2860
+ Initializing_Work_Orders:
2861
+ type: [string, integer]
2862
+ Initialized_Work_Orders:
2863
+ type: [string, integer]
2864
+ Created_Work_Orders:
2865
+ type: [string, integer]
2866
+ Ready_Work_Orders:
2867
+ type: [string, integer]
2868
+ In_Progress_Work_Orders:
2869
+ type: [string, integer]
2870
+ Unknown_Work_Orders:
2871
+ type: [string, integer]
2872
+ text/plain:
2873
+ schema:
2874
+ type: string
2875
+ const: No Statistics found. Change the filter and try again.
2876
+ '401':
2877
+ $ref: '#/components/responses/UnauthorizedError'
2878
+ default:
2879
+ $ref: '#/components/responses/Error'
2880
+ /api/work_step_stats/{id}:
2881
+ get:
2882
+ operationId: work_step_stats
2883
+ summary: Work step statistics, monthly or for a day
2884
+ description: 'Returns the text `No Statistics found. Change the filter and try again.` when there is none. The filters are inserted as is in an SQL condition (`workflow_id in (...)`): give comma-separated numbers or quoted values.'
2885
+ tags:
2886
+ - Statistics
2887
+ parameters:
2888
+ - $ref: '#/components/parameters/AnyId'
2889
+ - name: workflow_id
2890
+ in: query
2891
+ style: form
2892
+ explode: false
2893
+ schema:
2894
+ type: array
2895
+ items:
2896
+ type: integer
2897
+ description: Comma-separated workflow IDs
2898
+ - name: step_id
2899
+ in: query
2900
+ style: form
2901
+ explode: false
2902
+ schema:
2903
+ type: array
2904
+ items:
2905
+ type: integer
2906
+ description: Comma-separated step IDs
2907
+ - name: step_type
2908
+ in: query
2909
+ style: form
2910
+ explode: false
2911
+ schema:
2912
+ type: array
2913
+ items:
2914
+ type: string
2915
+ description: Comma-separated step types, quoted (e.g. `'CustomRuby'`)
2916
+ - name: date
2917
+ in: query
2918
+ schema:
2919
+ type: string
2920
+ format: date
2921
+ description: 'Statistics of this day, e.g. `2017-04-04`. Not set: monthly statistics.'
2922
+ - $ref: '#/components/parameters/Format'
2923
+ responses:
2924
+ '200':
2925
+ description: Work step statistics
2926
+ content:
2927
+ application/json:
2928
+ schema:
2929
+ type: array
2930
+ description: By day (monthly statistics of the last 30 days), or by hour (statistics of a day). The sums are decimal strings.
2931
+ items:
2932
+ type: object
2933
+ properties:
2934
+ Date:
2935
+ type: string
2936
+ Last_hour:
2937
+ type: string
2938
+ format: date-time
2939
+ Completed_Steps:
2940
+ type: [string, integer]
2941
+ Failed_Steps:
2942
+ type: [string, integer]
2943
+ Errored_steps:
2944
+ type: [string, integer]
2945
+ Obsolete_Steps:
2946
+ type: [string, integer]
2947
+ Activating_Steps:
2948
+ type: [string, integer]
2949
+ In_Progress_Steps:
2950
+ type: [string, integer]
2951
+ Paused_Steps:
2952
+ type: [string, integer]
2953
+ Pausing_Steps:
2954
+ type: [string, integer]
2955
+ Canceling_Steps:
2956
+ type: [string, integer]
2957
+ Resuming_Steps:
2958
+ type: [string, integer]
2959
+ Rolling_Back_Steps:
2960
+ type: [string, integer]
2961
+ Undefined_Steps:
2962
+ type: [string, integer]
2963
+ text/plain:
2964
+ schema:
2965
+ type: string
2966
+ const: No Statistics found. Change the filter and try again.
2967
+ '401':
2968
+ $ref: '#/components/responses/UnauthorizedError'
2969
+ default:
2970
+ $ref: '#/components/responses/Error'
2971
+ /api/journal_files/{id}:
2972
+ get:
2973
+ operationId: journal_files
2974
+ summary: Files recorded in a journal book
2975
+ tags:
2976
+ - Journals
2977
+ parameters:
2978
+ - name: id
2979
+ in: path
2980
+ required: true
2981
+ schema:
2982
+ type: string
2983
+ description: Journal book name or ID
2984
+ - name: details
2985
+ in: query
2986
+ schema:
2987
+ type: string
2988
+ enum:
2989
+ - 'true'
2990
+ - 'false'
2991
+ description: '`false`: without the states (steps) of each file'
2992
+ - name: status
2993
+ in: query
2994
+ style: form
2995
+ explode: false
2996
+ schema:
2997
+ type: array
2998
+ items:
2999
+ type: string
3000
+ description: Comma-separated statuses, e.g. `In Progress,Processing complete`
3001
+ - name: file
3002
+ in: query
3003
+ style: form
3004
+ explode: false
3005
+ schema:
3006
+ type: array
3007
+ items:
3008
+ type: string
3009
+ description: Comma-separated file paths
3010
+ - name: package
3011
+ in: query
3012
+ style: form
3013
+ explode: false
3014
+ schema:
3015
+ type: array
3016
+ items:
3017
+ type: string
3018
+ description: Comma-separated package names (not with `package_id`)
3019
+ - name: package_id
3020
+ in: query
3021
+ style: form
3022
+ explode: false
3023
+ schema:
3024
+ type: array
3025
+ items:
3026
+ type: integer
3027
+ description: Comma-separated package IDs (not with `package`)
3028
+ - $ref: '#/components/parameters/Format'
3029
+ responses:
3030
+ '200':
3031
+ description: Journal entries
3032
+ content:
3033
+ application/json:
3034
+ schema:
3035
+ type: object
3036
+ properties:
3037
+ Journal:
3038
+ type: object
3039
+ properties:
3040
+ name:
3041
+ type: string
3042
+ id:
3043
+ type: integer
3044
+ description:
3045
+ type: [string, 'null']
3046
+ active:
3047
+ type: [boolean, 'null']
3048
+ Packages:
3049
+ type: array
3050
+ description: Only when the journal has packages
3051
+ items:
3052
+ type: object
3053
+ properties:
3054
+ name:
3055
+ type: string
3056
+ id:
3057
+ type: integer
3058
+ files:
3059
+ type: array
3060
+ items:
3061
+ $ref: '#/components/schemas/JournalFile'
3062
+ Files:
3063
+ type: array
3064
+ description: Files without package
3065
+ items:
3066
+ $ref: '#/components/schemas/JournalFile'
3067
+ '401':
3068
+ $ref: '#/components/responses/UnauthorizedError'
3069
+ default:
3070
+ $ref: '#/components/responses/Error'
3071
+ /api/add_resource/{id}:
3072
+ get:
3073
+ operationId: add_resource
3074
+ summary: Add a resource to a resource pool
3075
+ tags:
3076
+ - Resources
3077
+ parameters:
3078
+ - $ref: '#/components/parameters/AnyId'
3079
+ - $ref: '#/components/parameters/PoolName'
3080
+ - $ref: '#/components/parameters/ResourceName'
3081
+ - name: capacity
3082
+ in: query
3083
+ schema:
3084
+ type: integer
3085
+ default: 1
3086
+ description: Capacity of the resource
3087
+ - name: tags
3088
+ in: query
3089
+ style: form
3090
+ explode: false
3091
+ schema:
3092
+ type: array
3093
+ items:
3094
+ type: string
3095
+ description: Comma-separated tags
3096
+ - $ref: '#/components/parameters/Format'
3097
+ responses:
3098
+ '200':
3099
+ description: The new resource
3100
+ content:
3101
+ application/json:
3102
+ schema:
3103
+ type: object
3104
+ properties:
3105
+ ManagedResource:
3106
+ $ref: '#/components/schemas/ManagedResource'
3107
+ '401':
3108
+ $ref: '#/components/responses/UnauthorizedError'
3109
+ default:
3110
+ $ref: '#/components/responses/Error'
3111
+ /api/edit_resource_capacity/{id}:
3112
+ get:
3113
+ operationId: edit_resource_capacity
3114
+ summary: Change the capacity of a resource
3115
+ tags:
3116
+ - Resources
3117
+ parameters:
3118
+ - name: id
3119
+ in: path
3120
+ required: true
3121
+ schema:
3122
+ type: integer
3123
+ minimum: 1
3124
+ description: New capacity, a positive integer
3125
+ - $ref: '#/components/parameters/PoolName'
3126
+ - $ref: '#/components/parameters/ResourceName'
3127
+ - $ref: '#/components/parameters/Format'
3128
+ responses:
3129
+ '200':
3130
+ description: The resource
3131
+ content:
3132
+ application/json:
3133
+ schema:
3134
+ type: object
3135
+ properties:
3136
+ ManagedResource:
3137
+ $ref: '#/components/schemas/ManagedResource'
3138
+ '401':
3139
+ $ref: '#/components/responses/UnauthorizedError'
3140
+ default:
3141
+ $ref: '#/components/responses/Error'
3142
+ /api/edit_pool_capacity/{id}:
3143
+ get:
3144
+ operationId: edit_pool_capacity
3145
+ summary: Change the capacity of a resource pool
3146
+ tags:
3147
+ - Resources
3148
+ parameters:
3149
+ - name: id
3150
+ in: path
3151
+ required: true
3152
+ schema:
3153
+ type: integer
3154
+ minimum: 1
3155
+ description: New capacity, a positive integer
3156
+ - $ref: '#/components/parameters/PoolName'
3157
+ - $ref: '#/components/parameters/Format'
3158
+ responses:
3159
+ '200':
3160
+ description: The resources of the pool
3161
+ content:
3162
+ application/json:
3163
+ schema:
3164
+ type: object
3165
+ properties:
3166
+ ManagedResource:
3167
+ type: array
3168
+ items:
3169
+ $ref: '#/components/schemas/ManagedResource'
3170
+ '401':
3171
+ $ref: '#/components/responses/UnauthorizedError'
3172
+ default:
3173
+ $ref: '#/components/responses/Error'
3174
+ /api/resource_online/{id}:
3175
+ get:
3176
+ operationId: resource_online
3177
+ summary: Take a resource online
3178
+ tags:
3179
+ - Resources
3180
+ parameters:
3181
+ - $ref: '#/components/parameters/AnyId'
3182
+ - $ref: '#/components/parameters/PoolName'
3183
+ - $ref: '#/components/parameters/ResourceName'
3184
+ - $ref: '#/components/parameters/Format'
3185
+ responses:
3186
+ '200':
3187
+ description: The resource is online
3188
+ content:
3189
+ application/json:
3190
+ schema:
3191
+ type: object
3192
+ properties:
3193
+ ManagedResource:
3194
+ type: object
3195
+ description: Resource ID (with `>` replaced by `-`) to new status
3196
+ additionalProperties:
3197
+ const: Online
3198
+ '401':
3199
+ $ref: '#/components/responses/UnauthorizedError'
3200
+ default:
3201
+ $ref: '#/components/responses/Error'
3202
+ /api/resource_offline/{id}:
3203
+ get:
3204
+ operationId: resource_offline
3205
+ summary: Take a resource offline
3206
+ tags:
3207
+ - Resources
3208
+ parameters:
3209
+ - $ref: '#/components/parameters/AnyId'
3210
+ - $ref: '#/components/parameters/PoolName'
3211
+ - $ref: '#/components/parameters/ResourceName'
3212
+ - $ref: '#/components/parameters/Format'
3213
+ responses:
3214
+ '200':
3215
+ description: The resource is offline
3216
+ content:
3217
+ application/json:
3218
+ schema:
3219
+ type: object
3220
+ properties:
3221
+ ManagedResource:
3222
+ type: object
3223
+ description: Resource ID (with `>` replaced by `-`) to new status
3224
+ additionalProperties:
3225
+ const: Offline
3226
+ '401':
3227
+ $ref: '#/components/responses/UnauthorizedError'
3228
+ default:
3229
+ $ref: '#/components/responses/Error'
3230
+ /api/pool_status/{id}:
3231
+ get:
3232
+ operationId: pool_status
3233
+ summary: Resources of a resource pool and their status
3234
+ tags:
3235
+ - Resources
3236
+ parameters:
3237
+ - $ref: '#/components/parameters/AnyId'
3238
+ - name: name
3239
+ in: query
3240
+ required: true
3241
+ schema:
3242
+ type: string
3243
+ description: Name of the resource pool (with or without the suffix `__a` of the database)
3244
+ - $ref: '#/components/parameters/Format'
3245
+ responses:
3246
+ '200':
3247
+ description: Pool status
3248
+ content:
3249
+ application/json:
3250
+ schema:
3251
+ type: object
3252
+ properties:
3253
+ ManagedResource:
3254
+ type: array
3255
+ items:
3256
+ type: object
3257
+ properties:
3258
+ id:
3259
+ type: string
3260
+ description: Resource name
3261
+ taken:
3262
+ type: integer
3263
+ capacity:
3264
+ type: integer
3265
+ status:
3266
+ type: string
3267
+ '401':
3268
+ $ref: '#/components/responses/UnauthorizedError'
3269
+ default:
3270
+ $ref: '#/components/responses/Error'
3271
+ /api/create_user/{id}:
3272
+ post:
3273
+ operationId: create_user
3274
+ summary: Create a user
3275
+ description: The response is JSON unless format is `xml`.
3276
+ tags:
3277
+ - Users
3278
+ parameters:
3279
+ - $ref: '#/components/parameters/AnyId'
3280
+ - $ref: '#/components/parameters/Format'
3281
+ requestBody:
3282
+ required: true
3283
+ content:
3284
+ application/json:
3285
+ schema:
3286
+ type: object
3287
+ required:
3288
+ - login
3289
+ - password
3290
+ - email
3291
+ properties:
3292
+ login:
3293
+ type: string
3294
+ description: Login of the user
3295
+ password:
3296
+ type: string
3297
+ format: password
3298
+ first_name:
3299
+ type: string
3300
+ last_name:
3301
+ type: string
3302
+ email:
3303
+ type: string
3304
+ format: email
3305
+ description: Email of the user, unique
3306
+ phone:
3307
+ type: string
3308
+ SMS:
3309
+ type: string
3310
+ is_active:
3311
+ type: boolean
3312
+ default: false
3313
+ require_password_change_on_login:
3314
+ type: boolean
3315
+ default: false
3316
+ alternate_emails:
3317
+ type: array
3318
+ items:
3319
+ type: string
3320
+ format: email
3321
+ groups:
3322
+ type: array
3323
+ description: Names of existing groups
3324
+ items:
3325
+ type: string
3326
+ responses:
3327
+ '200':
3328
+ description: Confirmation message
3329
+ content:
3330
+ application/json:
3331
+ schema:
3332
+ type: object
3333
+ properties:
3334
+ create_user:
3335
+ type: object
3336
+ properties:
3337
+ success:
3338
+ type: string
3339
+ examples:
3340
+ - User 'jdoe' was successfully created.
3341
+ '401':
3342
+ $ref: '#/components/responses/UnauthorizedError'
3343
+ default:
3344
+ $ref: '#/components/responses/Error'
3345
+ components:
3346
+ securitySchemes:
3347
+ bearerAuth:
3348
+ type: http
3349
+ scheme: bearer
3350
+ bearerFormat: JWT
3351
+ description: JWT token obtained from /api/login endpoint
3352
+ basicAuth:
3353
+ type: http
3354
+ scheme: basic
3355
+ description: Login and password, when JWT authentication is disabled
3356
+ loginQuery:
3357
+ type: apiKey
3358
+ in: query
3359
+ name: login
3360
+ description: User login, with `password` or `api_key`, when JWT authentication is disabled
3361
+ passwordQuery:
3362
+ type: apiKey
3363
+ in: query
3364
+ name: password
3365
+ description: User password, when JWT authentication is disabled
3366
+ apiKeyQuery:
3367
+ type: apiKey
3368
+ in: query
3369
+ name: api_key
3370
+ description: API key of the user, when JWT authentication is disabled
3371
+ parameters:
3372
+ Format:
3373
+ name: format
3374
+ in: query
3375
+ schema:
3376
+ type: string
3377
+ enum:
3378
+ - xml
3379
+ - json
3380
+ default: xml
3381
+ description: Response format (also given by the extension `.json` or `.xml` of the path)
3382
+ AnyId:
3383
+ name: id
3384
+ in: path
3385
+ required: true
3386
+ schema:
3387
+ type: string
3388
+ default: '0'
3389
+ description: Not used by the endpoint, but required by the route (any value, e.g. `0`)
3390
+ MonitorType:
3391
+ name: monitor_type
3392
+ in: query
3393
+ required: true
3394
+ schema:
3395
+ type: string
3396
+ enum:
3397
+ - workflow
3398
+ - workorder
3399
+ - folder
3400
+ - node
3401
+ - script
3402
+ description: Type of monitor (also accepted `work_order`, `remotenode`, `remote_node`, `remotescript`, `remote_script`)
3403
+ PoolName:
3404
+ name: pool_name
3405
+ in: query
3406
+ required: true
3407
+ schema:
3408
+ type: string
3409
+ description: Name of the resource pool
3410
+ ResourceName:
3411
+ name: resource_name
3412
+ in: query
3413
+ required: true
3414
+ schema:
3415
+ type: string
3416
+ description: Name of the resource, e.g. an IP address
3417
+ schemas:
3418
+ Error:
3419
+ type: object
3420
+ description: 'Error of an API call in format `json`. In format `xml`: `<error time="..." action="..." id="...">message</error>`.'
3421
+ required:
3422
+ - error
3423
+ properties:
3424
+ error:
3425
+ type: object
3426
+ required:
3427
+ - action
3428
+ - time
3429
+ - id
3430
+ - description
3431
+ properties:
3432
+ action:
3433
+ type: string
3434
+ description: Called endpoint
3435
+ time:
3436
+ type: string
3437
+ description: UTC time
3438
+ examples:
3439
+ - '2026-10-21 08:30:00'
3440
+ id:
3441
+ type: string
3442
+ description: The `id` of the call, or `0`
3443
+ description:
3444
+ type: string
3445
+ description: Error message and backtrace
3446
+ Workflow:
3447
+ type: object
3448
+ description: Workflow (database record)
3449
+ properties:
3450
+ id:
3451
+ type: integer
3452
+ name:
3453
+ type: string
3454
+ portable_id:
3455
+ type: [string, 'null']
3456
+ created_by:
3457
+ type: [integer, 'null']
3458
+ description: User ID
3459
+ folder_id:
3460
+ type: [integer, 'null']
3461
+ generated_from:
3462
+ type: [integer, 'null']
3463
+ description: Published whiteboard, `null` for a draft
3464
+ revision_id:
3465
+ type: [integer, 'null']
3466
+ description: Published revision
3467
+ label:
3468
+ type: [string, 'null']
3469
+ run_as:
3470
+ type: [string, 'null']
3471
+ source_revision:
3472
+ type: [string, 'null']
3473
+ comments:
3474
+ type: [string, 'null']
3475
+ description:
3476
+ type: [string, 'null']
3477
+ tags:
3478
+ type: [string, 'null']
3479
+ templates:
3480
+ type: [string, 'null']
3481
+ max_running:
3482
+ type: [integer, 'null']
3483
+ cleanup_after_days:
3484
+ type: [integer, 'null']
3485
+ purge_after_days:
3486
+ type: [integer, 'null']
3487
+ user_lock:
3488
+ type: [boolean, 'null']
3489
+ locked_by:
3490
+ type: [integer, 'null']
3491
+ created_at:
3492
+ type: string
3493
+ format: date-time
3494
+ updated_at:
3495
+ type: string
3496
+ format: date-time
3497
+ WorkOrder:
3498
+ type: object
3499
+ description: Work order (database record)
3500
+ properties:
3501
+ id:
3502
+ type: integer
3503
+ name:
3504
+ type: [string, 'null']
3505
+ monitor_id:
3506
+ type: [integer, 'null']
3507
+ workflow_id:
3508
+ type: [integer, 'null']
3509
+ workflow_revision_id:
3510
+ type: [integer, 'null']
3511
+ workflow_name:
3512
+ type: [string, 'null']
3513
+ branched_from_order:
3514
+ type: [integer, 'null']
3515
+ description: Parent work order, for a sub-workflow
3516
+ branched_from:
3517
+ type: [integer, 'null']
3518
+ description: Parent work step, for a sub-workflow
3519
+ forked_at:
3520
+ type: [integer, 'null']
3521
+ derived_from:
3522
+ type: [integer, 'null']
3523
+ master_id:
3524
+ type: [integer, 'null']
3525
+ launched_by:
3526
+ type: [integer, 'null']
3527
+ description: User ID
3528
+ initiated_by:
3529
+ type: [integer, 'null']
3530
+ description: User ID
3531
+ running_as:
3532
+ type: [integer, 'null']
3533
+ priority:
3534
+ type: [integer, 'null']
3535
+ exec_priority:
3536
+ type: [number, 'null']
3537
+ higher_priority:
3538
+ type: [boolean, 'null']
3539
+ label:
3540
+ type: [string, 'null']
3541
+ status:
3542
+ type: [string, 'null']
3543
+ examples:
3544
+ - In Progress
3545
+ status_details:
3546
+ type: [string, 'null']
3547
+ comments:
3548
+ type: [string, 'null']
3549
+ tags:
3550
+ type: [string, 'null']
3551
+ description: Tags separated by `|`, e.g. `|tag1|tag2|`
3552
+ initiate_date:
3553
+ type: [string, 'null']
3554
+ format: date-time
3555
+ completion_date:
3556
+ type: [string, 'null']
3557
+ format: date-time
3558
+ max_running:
3559
+ type: [integer, 'null']
3560
+ cleanup_after_days:
3561
+ type: [integer, 'null']
3562
+ purge_after_days:
3563
+ type: [integer, 'null']
3564
+ created_at:
3565
+ type: string
3566
+ format: date-time
3567
+ updated_at:
3568
+ type: string
3569
+ format: date-time
3570
+ WorkStepBase:
3571
+ type: object
3572
+ description: Work step (database record), common columns
3573
+ properties:
3574
+ id:
3575
+ type: integer
3576
+ action_id:
3577
+ type: [integer, 'null']
3578
+ step_id:
3579
+ type: [integer, 'null']
3580
+ step_type:
3581
+ type: [string, 'null']
3582
+ description: Plugin class name, e.g. `CustomRuby`
3583
+ step_name:
3584
+ type: [string, 'null']
3585
+ work_step_name:
3586
+ type: [string, 'null']
3587
+ attempt:
3588
+ type: [integer, 'null']
3589
+ execution_timeout:
3590
+ type: [integer, 'null']
3591
+ group:
3592
+ type: [integer, 'null']
3593
+ percent_complete:
3594
+ type: [integer, 'null']
3595
+ rank:
3596
+ type: [integer, 'null']
3597
+ running_as:
3598
+ type: [integer, 'null']
3599
+ synch_filter:
3600
+ type: [integer, 'null']
3601
+ timeout:
3602
+ type: [integer, 'null']
3603
+ weight:
3604
+ type: [integer, 'null']
3605
+ activation_time:
3606
+ type: [number, 'null']
3607
+ on_timeout:
3608
+ type: [string, 'null']
3609
+ status:
3610
+ type: [string, 'null']
3611
+ status_details:
3612
+ type: [string, 'null']
3613
+ prerequisites:
3614
+ type: [string, 'null']
3615
+ episteps:
3616
+ type: [string, 'null']
3617
+ journaling:
3618
+ type: [string, 'null']
3619
+ work_inputs:
3620
+ type: [string, 'null']
3621
+ work_outputs:
3622
+ type: [string, 'null']
3623
+ activable_date:
3624
+ type: [string, 'null']
3625
+ format: date-time
3626
+ activation_date:
3627
+ type: [string, 'null']
3628
+ format: date-time
3629
+ original_activation_date:
3630
+ type: [string, 'null']
3631
+ format: date-time
3632
+ completion_date:
3633
+ type: [string, 'null']
3634
+ format: date-time
3635
+ created_at:
3636
+ type: string
3637
+ format: date-time
3638
+ updated_at:
3639
+ type: string
3640
+ format: date-time
3641
+ WorkStep:
3642
+ description: Work step (database record)
3643
+ allOf:
3644
+ - $ref: '#/components/schemas/WorkStepBase'
3645
+ properties:
3646
+ work_order_id:
3647
+ type: [integer, 'null']
3648
+ workflow_id:
3649
+ type: [integer, 'null']
3650
+ pre_processing:
3651
+ type: [string, 'null']
3652
+ post_processing:
3653
+ type: [string, 'null']
3654
+ WorkStepStatus:
3655
+ description: Work step in `work_order_status`, without `workflow_id`, `pre_processing` and `post_processing`
3656
+ allOf:
3657
+ - $ref: '#/components/schemas/WorkStepBase'
3658
+ properties:
3659
+ percent_complete:
3660
+ type: integer
3661
+ description: 0 for a running step, 100 for a finished step, when not set
3662
+ category:
3663
+ type: string
3664
+ description: Category of the plugin, e.g. `Basic/Ruby`, or `-`
3665
+ work_order_id:
3666
+ type: [integer, string]
3667
+ description: 'Only for steps of type `SubWorkflow`, `WorkflowLauncher` and `FederatedWorkflow`: the launched work order, or `-`'
3668
+ node_id:
3669
+ type: string
3670
+ description: 'Only for `FederatedWorkflow`: execution node, or `-`'
3671
+ address:
3672
+ type: string
3673
+ description: 'Only for `FederatedWorkflow`: execution address, or `-`'
3674
+ WorkOrderWithSteps:
3675
+ type: object
3676
+ properties:
3677
+ work_order:
3678
+ $ref: '#/components/schemas/WorkOrder'
3679
+ work_steps:
3680
+ type: array
3681
+ items:
3682
+ $ref: '#/components/schemas/WorkStep'
3683
+ WorkstepReset:
3684
+ allOf:
3685
+ - $ref: '#/components/schemas/WorkOrderWithSteps'
3686
+ properties:
3687
+ workstep_reset:
3688
+ const: true
3689
+ StepVariable:
3690
+ type: object
3691
+ description: Input or output of a work step
3692
+ properties:
3693
+ value:
3694
+ type: [string, integer, number, boolean, array, object, 'null']
3695
+ description: 'Value, of the type given by `type`: integer for `int`, number for `float`, boolean for `flag`, array for `array`, object for `hash`, string for the others'
3696
+ name:
3697
+ type: string
3698
+ id:
3699
+ type: integer
3700
+ type:
3701
+ type: string
3702
+ description: Value type
3703
+ QueuedItem:
3704
+ type: object
3705
+ description: Item of a queue (database record, without the columns of the queue)
3706
+ properties:
3707
+ id:
3708
+ type: integer
3709
+ queued_item:
3710
+ type: [string, integer, number, boolean, array, object, 'null']
3711
+ description: The queued item, decoded from YAML. A string for an item added with `queue_item`, any type for an item added by a workflow.
3712
+ item_description:
3713
+ type: [string, 'null']
3714
+ priority:
3715
+ type: [integer, 'null']
3716
+ weight:
3717
+ type: [integer, 'null']
3718
+ position:
3719
+ type: [integer, 'null']
3720
+ rank:
3721
+ type: [integer, 'null']
3722
+ description: Position in the queue, from 0
3723
+ originator_type:
3724
+ type: [string, 'null']
3725
+ originator_id:
3726
+ type: [integer, 'null']
3727
+ tags:
3728
+ type: [string, 'null']
3729
+ created_at:
3730
+ type: string
3731
+ format: date-time
3732
+ updated_at:
3733
+ type: string
3734
+ format: date-time
3735
+ QueueMetadata:
3736
+ type: object
3737
+ properties:
3738
+ id:
3739
+ type: string
3740
+ description: Queue name given in the call (`queued_items` only)
3741
+ name:
3742
+ type: string
3743
+ description: Displayed name of the queue
3744
+ comments:
3745
+ type: [string, 'null']
3746
+ administrators:
3747
+ type: object
3748
+ properties:
3749
+ groups:
3750
+ type: array
3751
+ items:
3752
+ type: integer
3753
+ users:
3754
+ type: array
3755
+ items:
3756
+ type: integer
3757
+ paused:
3758
+ type: [boolean, 'null']
3759
+ QueuedItems:
3760
+ type: object
3761
+ properties:
3762
+ queued_items:
3763
+ type: array
3764
+ items:
3765
+ $ref: '#/components/schemas/QueuedItem'
3766
+ queue_metadata:
3767
+ $ref: '#/components/schemas/QueueMetadata'
3768
+ Task:
3769
+ type: object
3770
+ description: Task, i.e. a user input waiting for a user (database record)
3771
+ properties:
3772
+ id:
3773
+ type: integer
3774
+ state_id:
3775
+ type: [integer, 'null']
3776
+ description: Work step ID
3777
+ user_input_id:
3778
+ type: [integer, 'null']
3779
+ role_id:
3780
+ type: [integer, 'null']
3781
+ description: Group ID
3782
+ user_id:
3783
+ type: [integer, 'null']
3784
+ status:
3785
+ type: [string, 'null']
3786
+ completed_by:
3787
+ type: [integer, 'null']
3788
+ description: User ID
3789
+ created_at:
3790
+ type: string
3791
+ format: date-time
3792
+ updated_at:
3793
+ type: string
3794
+ format: date-time
3795
+ UserInput:
3796
+ type: object
3797
+ properties:
3798
+ name:
3799
+ type: string
3800
+ type:
3801
+ type: string
3802
+ description: Value type
3803
+ enum: [int, float, string, array, hash, flag, date, object, pwd, attachment]
3804
+ value:
3805
+ type: [string, integer, number, boolean, array, object, 'null']
3806
+ description: 'Current value, of the type given by `type`: integer for `int`, number for `float`, boolean for `flag`, array for `array`, object for `hash`, string for the others'
3807
+ required:
3808
+ type: boolean
3809
+ TaskUserInputs:
3810
+ type: object
3811
+ description: >-
3812
+ Values of the user inputs of a task: one key per user input, as listed in `user_inputs` of `task_details` (`name`, `type`, `required`).
3813
+ All inputs with `required: true` must be given, else Orchestrator refuses with `Missing data for <names>`.
3814
+ Values are sent as text and converted by Orchestrator to the type of the input:
3815
+ `int` (e.g. `-12`), `float` (e.g. `1.5`), `flag` (`true` or `false`), `date` (e.g. `2026-01-31 10:00:00`),
3816
+ `hash` (JSON or Ruby hash, starts with `{`), `array` (JSON array, or items separated by `;`),
3817
+ `string`, `object` (YAML), `pwd` (password).
3818
+ For an input with `required: true`, a value that does not match the type is refused (`Invalid output type(s)`).
3819
+ An input not given is overwritten with the conversion of the text `nil` (e.g. `0` for an `int`).
3820
+ additionalProperties: true
3821
+ examples:
3822
+ - Retries: '3'
3823
+ Ratio: '1.5'
3824
+ Filename: tron.avi
3825
+ Files: '["a.mov","b.mov"]'
3826
+ Options: '{"quality":"high"}'
3827
+ Approved: 'true'
3828
+ Deadline: '2026-01-31 10:00:00'
3829
+ Metadata: 'title: Tron'
3830
+ Secret: <SECRET>
3831
+ MonitorChange:
3832
+ type: object
3833
+ properties:
3834
+ action:
3835
+ type: string
3836
+ enum:
3837
+ - activate_monitor
3838
+ - deactivate_monitor
3839
+ time:
3840
+ type: string
3841
+ description: Local time
3842
+ id:
3843
+ type: string
3844
+ description: Monitor ID
3845
+ description:
3846
+ type: string
3847
+ enum:
3848
+ - activated
3849
+ - deactivated
3850
+ PluginReloadStatus:
3851
+ type: object
3852
+ description: 'Plugin class name, or `All Plugins`, to `true`, `false` or an error message'
3853
+ additionalProperties:
3854
+ type: [boolean, string]
3855
+ ProcessNode:
3856
+ type: object
3857
+ properties:
3858
+ id:
3859
+ type: string
3860
+ name:
3861
+ type: string
3862
+ current:
3863
+ type: string
3864
+ enum:
3865
+ - 'true'
3866
+ - 'false'
3867
+ process:
3868
+ type: array
3869
+ items:
3870
+ type: object
3871
+ properties:
3872
+ class:
3873
+ type: string
3874
+ enum:
3875
+ - engine
3876
+ - monitor
3877
+ - process_manager
3878
+ - node_mesh
3879
+ - worker
3880
+ id:
3881
+ type: string
3882
+ description: Worker ID
3883
+ pid:
3884
+ type: string
3885
+ description: '`-` when not running'
3886
+ status:
3887
+ type: string
3888
+ type:
3889
+ type: string
3890
+ description: Worker type
3891
+ enum:
3892
+ - normal
3893
+ - asynchronous
3894
+ - dedicated
3895
+ AlertNotification:
3896
+ type: object
3897
+ properties:
3898
+ id:
3899
+ type: integer
3900
+ category_id:
3901
+ type: [integer, 'null']
3902
+ description: 'Category: 1 `WorkflowAlerts`, 2 `UserAlerts`, 3 `WorkorderAlerts`, 4 `MonitorAlerts`, 5 `PluginAlerts`'
3903
+ alert_header:
3904
+ type: [string, 'null']
3905
+ alert_description:
3906
+ type: [string, 'null']
3907
+ created_at:
3908
+ type: string
3909
+ format: date-time
3910
+ updated_at:
3911
+ type: string
3912
+ format: date-time
3913
+ TestRun:
3914
+ type: object
3915
+ properties:
3916
+ Test_run_id:
3917
+ type: string
3918
+ format: uuid
3919
+ Workflow_id:
3920
+ type: [integer, 'null']
3921
+ Test_cases_launched:
3922
+ type: integer
3923
+ Steps:
3924
+ type: array
3925
+ description: Only when synchronous, and in `test_step_status`
3926
+ items:
3927
+ type: object
3928
+ properties:
3929
+ Step_name:
3930
+ type: string
3931
+ Result:
3932
+ type: boolean
3933
+ Test_cases:
3934
+ type: array
3935
+ items:
3936
+ type: object
3937
+ properties:
3938
+ Id:
3939
+ type: integer
3940
+ Name:
3941
+ type: string
3942
+ status:
3943
+ type: string
3944
+ Status_details:
3945
+ type: [string, 'null']
3946
+ Result_message:
3947
+ type: [string, 'null']
3948
+ Last_update:
3949
+ type: string
3950
+ format: date-time
3951
+ Inputs:
3952
+ type: object
3953
+ description: Inputs of the test case (name to value), empty if none
3954
+ additionalProperties: true
3955
+ Outputs:
3956
+ type: object
3957
+ description: Outputs of the test case (name to value), `null` values until the test case has run
3958
+ additionalProperties: true
3959
+ Result:
3960
+ type: [boolean, 'null']
3961
+ Result:
3962
+ type: boolean
3963
+ description: Only when synchronous, and in `test_step_status`
3964
+ JournalFile:
3965
+ type: object
3966
+ properties:
3967
+ file_id:
3968
+ type: integer
3969
+ file:
3970
+ type: string
3971
+ status:
3972
+ type: [string, 'null']
3973
+ status_details:
3974
+ type: [string, 'null']
3975
+ created_at:
3976
+ type: string
3977
+ format: date-time
3978
+ updated_at:
3979
+ type: string
3980
+ format: date-time
3981
+ states:
3982
+ type: array
3983
+ description: Steps that processed the file, unless `details=false`
3984
+ items:
3985
+ type: object
3986
+ properties:
3987
+ path:
3988
+ type: [string, 'null']
3989
+ status:
3990
+ type: [string, 'null']
3991
+ status_details:
3992
+ type: [string, 'null']
3993
+ progress:
3994
+ type: [integer, 'null']
3995
+ work_step_id:
3996
+ type: [integer, 'null']
3997
+ work_order_id:
3998
+ type: [integer, 'null']
3999
+ step_name:
4000
+ type: [string, 'null']
4001
+ workflow_id:
4002
+ type: [integer, 'null']
4003
+ workflow_name:
4004
+ type: [string, 'null']
4005
+ created_at:
4006
+ type: string
4007
+ format: date-time
4008
+ ManagedResource:
4009
+ type: object
4010
+ description: Resource of a resource pool (database record)
4011
+ properties:
4012
+ id:
4013
+ type: integer
4014
+ resource_id:
4015
+ type: string
4016
+ resource_name:
4017
+ type: string
4018
+ description: Pool name, with the suffix `__a`
4019
+ status:
4020
+ type: [string, 'null']
4021
+ max:
4022
+ type: [integer, 'null']
4023
+ description: Capacity
4024
+ reserved:
4025
+ type: [integer, 'null']
4026
+ properties:
4027
+ type: [string, 'null']
4028
+ tags:
4029
+ type: [string, 'null']
4030
+ created_at:
4031
+ type: string
4032
+ format: date-time
4033
+ updated_at:
4034
+ type: string
4035
+ format: date-time
4036
+ responses:
4037
+ UnauthorizedError:
4038
+ description: Authentication required or token invalid
4039
+ content:
4040
+ application/json:
4041
+ schema:
4042
+ anyOf:
4043
+ - title: JWT authentication
4044
+ type: object
4045
+ properties:
4046
+ error:
4047
+ type: string
4048
+ examples:
4049
+ - Unauthorized
4050
+ - $ref: '#/components/schemas/Error'
4051
+ Error:
4052
+ description: 'Error: status 403 when access is denied, else 404 when the server option `strict_api_validation` is set, else 200 (see Errors in the introduction)'
4053
+ content:
4054
+ application/json:
4055
+ schema:
4056
+ $ref: '#/components/schemas/Error'
4057
+ tags:
4058
+ - name: Authentication
4059
+ description: Obtain JWT tokens for API access. All other endpoints require authentication.
4060
+ - name: Workflows
4061
+ description: Import, export, publish and inspect workflow definitions.
4062
+ - name: Work Orders
4063
+ description: Initiate and track workflow executions. Each work order is one execution of a workflow.
4064
+ - name: Work Steps
4065
+ description: Status and control of the steps of a work order.
4066
+ - name: Queues
4067
+ description: Managed queues (plugin Queue stager) and their items.
4068
+ - name: Monitors
4069
+ description: Monitors of workflows, work orders, folders, remote nodes and scripts.
4070
+ - name: Tasks
4071
+ description: User inputs (tasks) waiting for an operator.
4072
+ - name: Plugins
4073
+ description: Versions, import, enabling and reloading of action plugins.
4074
+ - name: Portlets
4075
+ description: Versions of the portlets of the web interface.
4076
+ - name: System
4077
+ description: Processes, execution queue, alerts, and shared state for external applications.
4078
+ - name: Remote Nodes
4079
+ description: Information on this Orchestrator, used by remote Orchestrator nodes.
4080
+ - name: Testing
4081
+ description: Test cases of workflow steps.
4082
+ - name: Statistics
4083
+ description: Statistics of work orders and work steps.
4084
+ - name: Journals
4085
+ description: Journal books and the files recorded in them.
4086
+ - name: Resources
4087
+ description: Resource pools (plugin Load manager) and their resources.
4088
+ - name: Users
4089
+ description: User accounts.