step_rest_client 1.0.0__py3-none-any.whl

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 (117) hide show
  1. step_rest_client/__init__.py +136 -0
  2. step_rest_client/api/__init__.py +26 -0
  3. step_rest_client/api/assets_api.py +7960 -0
  4. step_rest_client/api/attributes_api.py +340 -0
  5. step_rest_client/api/background_process_types_api.py +640 -0
  6. step_rest_client/api/background_processes_api.py +1577 -0
  7. step_rest_client/api/classifications_api.py +7991 -0
  8. step_rest_client/api/data_container_types_api.py +340 -0
  9. step_rest_client/api/data_type_groups_api.py +340 -0
  10. step_rest_client/api/entities_api.py +8680 -0
  11. step_rest_client/api/event_processors_api.py +3337 -0
  12. step_rest_client/api/export_api.py +383 -0
  13. step_rest_client/api/gateway_integration_endpoints_api.py +1232 -0
  14. step_rest_client/api/import_api.py +390 -0
  15. step_rest_client/api/inbound_integration_endpoints_api.py +2815 -0
  16. step_rest_client/api/lists_of_values_api.py +642 -0
  17. step_rest_client/api/object_types_api.py +340 -0
  18. step_rest_client/api/outbound_integration_endpoints_api.py +3655 -0
  19. step_rest_client/api/products_api.py +8007 -0
  20. step_rest_client/api/reference_types_api.py +340 -0
  21. step_rest_client/api/reporting_api.py +707 -0
  22. step_rest_client/api/units_api.py +340 -0
  23. step_rest_client/api/workflow_tasks_api.py +1887 -0
  24. step_rest_client/api/workflows_api.py +1270 -0
  25. step_rest_client/api_client.py +797 -0
  26. step_rest_client/api_response.py +21 -0
  27. step_rest_client/configuration.py +597 -0
  28. step_rest_client/exceptions.py +216 -0
  29. step_rest_client/models/__init__.py +98 -0
  30. step_rest_client/models/amount.py +89 -0
  31. step_rest_client/models/and_condition.py +107 -0
  32. step_rest_client/models/approval_response.py +87 -0
  33. step_rest_client/models/approval_status.py +99 -0
  34. step_rest_client/models/asset.py +129 -0
  35. step_rest_client/models/attribute.py +120 -0
  36. step_rest_client/models/attribute_link.py +102 -0
  37. step_rest_client/models/background_process.py +139 -0
  38. step_rest_client/models/background_process_attachment_metadata.py +105 -0
  39. step_rest_client/models/background_process_identification.py +89 -0
  40. step_rest_client/models/background_process_type.py +89 -0
  41. step_rest_client/models/classification.py +135 -0
  42. step_rest_client/models/condition.py +265 -0
  43. step_rest_client/models/data_container.py +139 -0
  44. step_rest_client/models/data_container_entry.py +117 -0
  45. step_rest_client/models/data_container_object_condition.py +181 -0
  46. step_rest_client/models/data_container_type.py +106 -0
  47. step_rest_client/models/data_type_group.py +108 -0
  48. step_rest_client/models/endpoint_statistics.py +109 -0
  49. step_rest_client/models/endpoint_status.py +99 -0
  50. step_rest_client/models/entity.py +142 -0
  51. step_rest_client/models/error.py +91 -0
  52. step_rest_client/models/event_processor.py +93 -0
  53. step_rest_client/models/event_processor_statistics.py +97 -0
  54. step_rest_client/models/event_processor_status.py +99 -0
  55. step_rest_client/models/event_queue_status.py +89 -0
  56. step_rest_client/models/execution_report_entry.py +103 -0
  57. step_rest_client/models/export_specification.py +89 -0
  58. step_rest_client/models/find_similar_business_rule_result.py +91 -0
  59. step_rest_client/models/find_similar_entities_request.py +95 -0
  60. step_rest_client/models/find_similar_entities_response.py +103 -0
  61. step_rest_client/models/find_similar_entities_response_record.py +95 -0
  62. step_rest_client/models/find_similar_execution_report.py +103 -0
  63. step_rest_client/models/gateway_integration_endpoint.py +93 -0
  64. step_rest_client/models/has_data_container_object_condition.py +106 -0
  65. step_rest_client/models/has_reference_to_condition.py +108 -0
  66. step_rest_client/models/id_condition.py +105 -0
  67. step_rest_client/models/inbound_integration_endpoint.py +93 -0
  68. step_rest_client/models/incoming_reference_entry.py +118 -0
  69. step_rest_client/models/list_of_values.py +110 -0
  70. step_rest_client/models/list_of_values_entry.py +91 -0
  71. step_rest_client/models/lov_value_condition.py +100 -0
  72. step_rest_client/models/match_and_merge_execution_report.py +119 -0
  73. step_rest_client/models/match_and_merge_general_execution_report.py +91 -0
  74. step_rest_client/models/match_and_merge_potential_duplicate.py +93 -0
  75. step_rest_client/models/match_and_merge_record_in.py +95 -0
  76. step_rest_client/models/match_and_merge_record_out.py +117 -0
  77. step_rest_client/models/match_and_merge_response.py +103 -0
  78. step_rest_client/models/multi_data_container.py +101 -0
  79. step_rest_client/models/multi_reference.py +97 -0
  80. step_rest_client/models/multi_value.py +103 -0
  81. step_rest_client/models/name_condition.py +107 -0
  82. step_rest_client/models/numeric_value_condition.py +111 -0
  83. step_rest_client/models/object_type.py +104 -0
  84. step_rest_client/models/object_type_condition.py +96 -0
  85. step_rest_client/models/or_condition.py +107 -0
  86. step_rest_client/models/outbound_integration_endpoint.py +93 -0
  87. step_rest_client/models/product.py +150 -0
  88. step_rest_client/models/query.py +91 -0
  89. step_rest_client/models/query_result.py +99 -0
  90. step_rest_client/models/reference.py +139 -0
  91. step_rest_client/models/reference_entry.py +141 -0
  92. step_rest_client/models/reference_metadata_condition.py +181 -0
  93. step_rest_client/models/reference_type.py +114 -0
  94. step_rest_client/models/rejected_by_business_condition.py +93 -0
  95. step_rest_client/models/simple_below_condition.py +105 -0
  96. step_rest_client/models/single_data_container.py +97 -0
  97. step_rest_client/models/single_reference.py +93 -0
  98. step_rest_client/models/single_value.py +103 -0
  99. step_rest_client/models/status_flag.py +89 -0
  100. step_rest_client/models/text_value_condition.py +111 -0
  101. step_rest_client/models/trigger_workflow_event.py +93 -0
  102. step_rest_client/models/unit.py +104 -0
  103. step_rest_client/models/value.py +137 -0
  104. step_rest_client/models/value_entry.py +91 -0
  105. step_rest_client/models/workflow.py +91 -0
  106. step_rest_client/models/workflow_event.py +89 -0
  107. step_rest_client/models/workflow_instance.py +87 -0
  108. step_rest_client/models/workflow_instance_creation.py +93 -0
  109. step_rest_client/models/workflow_node.py +99 -0
  110. step_rest_client/models/workflow_task.py +113 -0
  111. step_rest_client/models/workflow_task_query.py +101 -0
  112. step_rest_client/py.typed +0 -0
  113. step_rest_client/rest.py +258 -0
  114. step_rest_client-1.0.0.dist-info/METADATA +23 -0
  115. step_rest_client-1.0.0.dist-info/RECORD +117 -0
  116. step_rest_client-1.0.0.dist-info/WHEEL +5 -0
  117. step_rest_client-1.0.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,1270 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ STEP REST API V2
5
+
6
+ <h1>About</h1><p>The STEP REST API V2 provides read and write access to a set of core STEP objects using the HTTP operations GET, PUT, POST, PATCH and DELETE.</p><h1>Resource Representation</h1><p>With the exception of a few resource operations for retrieving and uploading binary data, all request and response bodies are JSON, compliant with the schema documented here.</p><h1>Context and Workspace</h1><p>All requests are handled in a specific STEP context and workspace and both can be specified via query parameters available for all resource operations. A context must always be specified while requests per default will be handled in the &quot;Main&quot; workspace.</p><h1>Polymorphism</h1><p>In STEP, attributes, reference types and data container types can all be either single- or multivalued. The STEP REST API V2 uses polymorphism to address this complexity with resources that include values, references and data containers specified to produce and consume a common &quot;abstract&quot; supertype that always will be one of either the single- or multivalued subtype.<br/>As an example, the GET /entities/{id}/values/{attributeId} resource operation is specified to return a &quot;Value&quot; but as evident from the model, the &quot;Value&quot; will always be &quot;oneOf&quot; either &quot;SingleValue&quot;, that has a &quot;value&quot; property for which the value is an object, or &quot;MultiValue&quot;, that has a &quot;values&quot; property for which the value is an array.<br/>Clients are advised to use the presence or absence of the plural array property (&quot;values&quot;, &quot;references&quot; and &quot;dataContainers&quot;) to determine the concrete type.</p><h1>Authentication</h1><p>The REST API is protected by HTTP Basic Authentication or if OAuth2-based authentication is enabled (SaaS customers only), by Bearer Authentication. With Basic Authentication, user name and password are supplied with each request and it is therefore highly recommended to only use the API in conjunction with HTTPS. For more information about OAuth2-based authentication for SaaS customers, please see the STEP Authentication Guide.</p><h1>Versioning</h1><p>The STEP REST API V2 is versioned using semantic versioning. Stibo Systems reserve the right to make non-breaking, minor / patch changes in any release without warning and clients must be coded / configured to be 'tolerant' and capable of handling such changes.</p><p>Examples of breaking, major changes:</p><ul><li>Renaming of a property</li><li>Removal of a property</li><li>Property type change</li><li>Addition of new property required for write operations</li><li>Marking existing property as required for write operations</li><li>Removal of resource or resource operation</li><li>Materially different behavior for existing resource operation</li></ul><p>Examples of non-breaking, minor / patch changes:</p><ul><li>Addition of new properties in request responses</li><li>Addition of new query parameter not required for write operations</li><li>Addition of new resource or resource operation</li><li>Bug fixes that do not change the schema or resource operations as described here</li><li>Inclusion of a response body for resource operations specified to return a 200 response with no body</li><li>Change of response &quot;Model&quot; / &quot;schema&quot; to type extending the previously specified type</li><li>Renaming a &quot;Model&quot; / &quot;schema&quot; type</li></ul><p>In addition, error message texts may change without warning within the same version. Client program logic should not depend upon the message content.</p><h1>Error Handling</h1><p>The STEP REST API V2 responds with standard HTTP status codes, with 2** responses indicating a success, 4** responses indicating a client error and 5** indicating a server error. Notice that this specification does not specify common error responses like 500 (internal server error) or 401 (unauthorized) for the individual resource operations. Clients should however be capable of handling such responses.</p><p>Error responses have a JSON response body (see Error schema below) containing HTTP status code information in addition to a message providing details about the error. As mentioned above, client program logic should not depend upon the message content.</p><p>The specific status codes used in the API are:</p><ul><li>200 (OK): Success, response may or may not have a body</li><li>201 (Created): Entity successfully created, response may or may not have a body</li><li>400 (Bad request): The server cannot or will not process the request due to an apparent client error</li><li>401 (Unauthorized): Returned only in relation to failed authentication</li><li>404 (Not Found): Returned only in relation to objects specified via path parameters (variable parts of the URL). If STEP objects referenced in request bodies or via query parameters cannot be found, the response will be 400.</li><li>429 (Too Many Requests): Clients are per default limited to 100 requests per second. Returned if the rate limit is exceeded.</li><li>500 (Internal Server Error): Unexpected error (could potentially cover an issue that rightfully should be a 400)</li></ul>
7
+
8
+ The version of the OpenAPI document: 1.3.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+ import warnings
15
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
16
+ from typing import Any, Dict, List, Optional, Tuple, Union
17
+ from typing_extensions import Annotated
18
+
19
+ from pydantic import Field, StrictStr
20
+ from typing import List, Optional
21
+ from typing_extensions import Annotated
22
+ from step_rest_client.models.workflow import Workflow
23
+ from step_rest_client.models.workflow_instance import WorkflowInstance
24
+ from step_rest_client.models.workflow_instance_creation import WorkflowInstanceCreation
25
+
26
+ from step_rest_client.api_client import ApiClient, RequestSerialized
27
+ from step_rest_client.api_response import ApiResponse
28
+ from step_rest_client.rest import RESTResponseType
29
+
30
+
31
+ class WorkflowsApi:
32
+ """NOTE: This class is auto generated by OpenAPI Generator
33
+ Ref: https://openapi-generator.tech
34
+
35
+ Do not edit the class manually.
36
+ """
37
+
38
+ def __init__(self, api_client=None) -> None:
39
+ if api_client is None:
40
+ api_client = ApiClient.get_default()
41
+ self.api_client = api_client
42
+
43
+
44
+ @validate_call
45
+ def workflows_get(
46
+ self,
47
+ context: Annotated[StrictStr, Field(description="ID of the context in which to perform the operation")],
48
+ workspace: Annotated[Optional[StrictStr], Field(description="ID of the workspace in which to perform the operation. Defaults to \"Main\".")] = None,
49
+ _request_timeout: Union[
50
+ None,
51
+ Annotated[StrictFloat, Field(gt=0)],
52
+ Tuple[
53
+ Annotated[StrictFloat, Field(gt=0)],
54
+ Annotated[StrictFloat, Field(gt=0)]
55
+ ]
56
+ ] = None,
57
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
58
+ _content_type: Optional[StrictStr] = None,
59
+ _headers: Optional[Dict[StrictStr, Any]] = None,
60
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
61
+ ) -> List[str]:
62
+ """Returns IDs of available workflows
63
+
64
+ Operation for retrieving an array of IDs of the available workflows
65
+
66
+ :param context: ID of the context in which to perform the operation (required)
67
+ :type context: str
68
+ :param workspace: ID of the workspace in which to perform the operation. Defaults to \"Main\".
69
+ :type workspace: str
70
+ :param _request_timeout: timeout setting for this request. If one
71
+ number provided, it will be total request
72
+ timeout. It can also be a pair (tuple) of
73
+ (connection, read) timeouts.
74
+ :type _request_timeout: int, tuple(int, int), optional
75
+ :param _request_auth: set to override the auth_settings for an a single
76
+ request; this effectively ignores the
77
+ authentication in the spec for a single request.
78
+ :type _request_auth: dict, optional
79
+ :param _content_type: force content-type for the request.
80
+ :type _content_type: str, Optional
81
+ :param _headers: set to override the headers for a single
82
+ request; this effectively ignores the headers
83
+ in the spec for a single request.
84
+ :type _headers: dict, optional
85
+ :param _host_index: set to override the host_index for a single
86
+ request; this effectively ignores the host_index
87
+ in the spec for a single request.
88
+ :type _host_index: int, optional
89
+ :return: Returns the result object.
90
+ """ # noqa: E501
91
+
92
+ _param = self._workflows_get_serialize(
93
+ context=context,
94
+ workspace=workspace,
95
+ _request_auth=_request_auth,
96
+ _content_type=_content_type,
97
+ _headers=_headers,
98
+ _host_index=_host_index
99
+ )
100
+
101
+ _response_types_map: Dict[str, Optional[str]] = {
102
+ '200': "List[str]",
103
+ '400': "Error",
104
+ }
105
+ response_data = self.api_client.call_api(
106
+ *_param,
107
+ _request_timeout=_request_timeout
108
+ )
109
+ response_data.read()
110
+ return self.api_client.response_deserialize(
111
+ response_data=response_data,
112
+ response_types_map=_response_types_map,
113
+ ).data
114
+
115
+
116
+ @validate_call
117
+ def workflows_get_with_http_info(
118
+ self,
119
+ context: Annotated[StrictStr, Field(description="ID of the context in which to perform the operation")],
120
+ workspace: Annotated[Optional[StrictStr], Field(description="ID of the workspace in which to perform the operation. Defaults to \"Main\".")] = None,
121
+ _request_timeout: Union[
122
+ None,
123
+ Annotated[StrictFloat, Field(gt=0)],
124
+ Tuple[
125
+ Annotated[StrictFloat, Field(gt=0)],
126
+ Annotated[StrictFloat, Field(gt=0)]
127
+ ]
128
+ ] = None,
129
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
130
+ _content_type: Optional[StrictStr] = None,
131
+ _headers: Optional[Dict[StrictStr, Any]] = None,
132
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
133
+ ) -> ApiResponse[List[str]]:
134
+ """Returns IDs of available workflows
135
+
136
+ Operation for retrieving an array of IDs of the available workflows
137
+
138
+ :param context: ID of the context in which to perform the operation (required)
139
+ :type context: str
140
+ :param workspace: ID of the workspace in which to perform the operation. Defaults to \"Main\".
141
+ :type workspace: str
142
+ :param _request_timeout: timeout setting for this request. If one
143
+ number provided, it will be total request
144
+ timeout. It can also be a pair (tuple) of
145
+ (connection, read) timeouts.
146
+ :type _request_timeout: int, tuple(int, int), optional
147
+ :param _request_auth: set to override the auth_settings for an a single
148
+ request; this effectively ignores the
149
+ authentication in the spec for a single request.
150
+ :type _request_auth: dict, optional
151
+ :param _content_type: force content-type for the request.
152
+ :type _content_type: str, Optional
153
+ :param _headers: set to override the headers for a single
154
+ request; this effectively ignores the headers
155
+ in the spec for a single request.
156
+ :type _headers: dict, optional
157
+ :param _host_index: set to override the host_index for a single
158
+ request; this effectively ignores the host_index
159
+ in the spec for a single request.
160
+ :type _host_index: int, optional
161
+ :return: Returns the result object.
162
+ """ # noqa: E501
163
+
164
+ _param = self._workflows_get_serialize(
165
+ context=context,
166
+ workspace=workspace,
167
+ _request_auth=_request_auth,
168
+ _content_type=_content_type,
169
+ _headers=_headers,
170
+ _host_index=_host_index
171
+ )
172
+
173
+ _response_types_map: Dict[str, Optional[str]] = {
174
+ '200': "List[str]",
175
+ '400': "Error",
176
+ }
177
+ response_data = self.api_client.call_api(
178
+ *_param,
179
+ _request_timeout=_request_timeout
180
+ )
181
+ response_data.read()
182
+ return self.api_client.response_deserialize(
183
+ response_data=response_data,
184
+ response_types_map=_response_types_map,
185
+ )
186
+
187
+
188
+ @validate_call
189
+ def workflows_get_without_preload_content(
190
+ self,
191
+ context: Annotated[StrictStr, Field(description="ID of the context in which to perform the operation")],
192
+ workspace: Annotated[Optional[StrictStr], Field(description="ID of the workspace in which to perform the operation. Defaults to \"Main\".")] = None,
193
+ _request_timeout: Union[
194
+ None,
195
+ Annotated[StrictFloat, Field(gt=0)],
196
+ Tuple[
197
+ Annotated[StrictFloat, Field(gt=0)],
198
+ Annotated[StrictFloat, Field(gt=0)]
199
+ ]
200
+ ] = None,
201
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
202
+ _content_type: Optional[StrictStr] = None,
203
+ _headers: Optional[Dict[StrictStr, Any]] = None,
204
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
205
+ ) -> RESTResponseType:
206
+ """Returns IDs of available workflows
207
+
208
+ Operation for retrieving an array of IDs of the available workflows
209
+
210
+ :param context: ID of the context in which to perform the operation (required)
211
+ :type context: str
212
+ :param workspace: ID of the workspace in which to perform the operation. Defaults to \"Main\".
213
+ :type workspace: str
214
+ :param _request_timeout: timeout setting for this request. If one
215
+ number provided, it will be total request
216
+ timeout. It can also be a pair (tuple) of
217
+ (connection, read) timeouts.
218
+ :type _request_timeout: int, tuple(int, int), optional
219
+ :param _request_auth: set to override the auth_settings for an a single
220
+ request; this effectively ignores the
221
+ authentication in the spec for a single request.
222
+ :type _request_auth: dict, optional
223
+ :param _content_type: force content-type for the request.
224
+ :type _content_type: str, Optional
225
+ :param _headers: set to override the headers for a single
226
+ request; this effectively ignores the headers
227
+ in the spec for a single request.
228
+ :type _headers: dict, optional
229
+ :param _host_index: set to override the host_index for a single
230
+ request; this effectively ignores the host_index
231
+ in the spec for a single request.
232
+ :type _host_index: int, optional
233
+ :return: Returns the result object.
234
+ """ # noqa: E501
235
+
236
+ _param = self._workflows_get_serialize(
237
+ context=context,
238
+ workspace=workspace,
239
+ _request_auth=_request_auth,
240
+ _content_type=_content_type,
241
+ _headers=_headers,
242
+ _host_index=_host_index
243
+ )
244
+
245
+ _response_types_map: Dict[str, Optional[str]] = {
246
+ '200': "List[str]",
247
+ '400': "Error",
248
+ }
249
+ response_data = self.api_client.call_api(
250
+ *_param,
251
+ _request_timeout=_request_timeout
252
+ )
253
+ return response_data.response
254
+
255
+
256
+ def _workflows_get_serialize(
257
+ self,
258
+ context,
259
+ workspace,
260
+ _request_auth,
261
+ _content_type,
262
+ _headers,
263
+ _host_index,
264
+ ) -> RequestSerialized:
265
+
266
+ _host = None
267
+
268
+ _collection_formats: Dict[str, str] = {
269
+ }
270
+
271
+ _path_params: Dict[str, str] = {}
272
+ _query_params: List[Tuple[str, str]] = []
273
+ _header_params: Dict[str, Optional[str]] = _headers or {}
274
+ _form_params: List[Tuple[str, str]] = []
275
+ _files: Dict[
276
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
277
+ ] = {}
278
+ _body_params: Optional[bytes] = None
279
+
280
+ # process the path parameters
281
+ # process the query parameters
282
+ if context is not None:
283
+
284
+ _query_params.append(('context', context))
285
+
286
+ if workspace is not None:
287
+
288
+ _query_params.append(('workspace', workspace))
289
+
290
+ # process the header parameters
291
+ # process the form parameters
292
+ # process the body parameter
293
+
294
+
295
+ # set the HTTP header `Accept`
296
+ if 'Accept' not in _header_params:
297
+ _header_params['Accept'] = self.api_client.select_header_accept(
298
+ [
299
+ 'application/json'
300
+ ]
301
+ )
302
+
303
+
304
+ # authentication setting
305
+ _auth_settings: List[str] = [
306
+ 'basicAuth'
307
+ ]
308
+
309
+ return self.api_client.param_serialize(
310
+ method='GET',
311
+ resource_path='/workflows',
312
+ path_params=_path_params,
313
+ query_params=_query_params,
314
+ header_params=_header_params,
315
+ body=_body_params,
316
+ post_params=_form_params,
317
+ files=_files,
318
+ auth_settings=_auth_settings,
319
+ collection_formats=_collection_formats,
320
+ _host=_host,
321
+ _request_auth=_request_auth
322
+ )
323
+
324
+
325
+
326
+
327
+ @validate_call
328
+ def workflows_id_get(
329
+ self,
330
+ id: Annotated[StrictStr, Field(description="ID of the workflow")],
331
+ context: Annotated[StrictStr, Field(description="ID of the context in which to perform the operation")],
332
+ workspace: Annotated[Optional[StrictStr], Field(description="ID of the workspace in which to perform the operation. Defaults to \"Main\".")] = None,
333
+ _request_timeout: Union[
334
+ None,
335
+ Annotated[StrictFloat, Field(gt=0)],
336
+ Tuple[
337
+ Annotated[StrictFloat, Field(gt=0)],
338
+ Annotated[StrictFloat, Field(gt=0)]
339
+ ]
340
+ ] = None,
341
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
342
+ _content_type: Optional[StrictStr] = None,
343
+ _headers: Optional[Dict[StrictStr, Any]] = None,
344
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
345
+ ) -> Workflow:
346
+ """Returns the workflow with the specified ID
347
+
348
+ Operation for retrieving a basic representation of a workflow
349
+
350
+ :param id: ID of the workflow (required)
351
+ :type id: str
352
+ :param context: ID of the context in which to perform the operation (required)
353
+ :type context: str
354
+ :param workspace: ID of the workspace in which to perform the operation. Defaults to \"Main\".
355
+ :type workspace: str
356
+ :param _request_timeout: timeout setting for this request. If one
357
+ number provided, it will be total request
358
+ timeout. It can also be a pair (tuple) of
359
+ (connection, read) timeouts.
360
+ :type _request_timeout: int, tuple(int, int), optional
361
+ :param _request_auth: set to override the auth_settings for an a single
362
+ request; this effectively ignores the
363
+ authentication in the spec for a single request.
364
+ :type _request_auth: dict, optional
365
+ :param _content_type: force content-type for the request.
366
+ :type _content_type: str, Optional
367
+ :param _headers: set to override the headers for a single
368
+ request; this effectively ignores the headers
369
+ in the spec for a single request.
370
+ :type _headers: dict, optional
371
+ :param _host_index: set to override the host_index for a single
372
+ request; this effectively ignores the host_index
373
+ in the spec for a single request.
374
+ :type _host_index: int, optional
375
+ :return: Returns the result object.
376
+ """ # noqa: E501
377
+
378
+ _param = self._workflows_id_get_serialize(
379
+ id=id,
380
+ context=context,
381
+ workspace=workspace,
382
+ _request_auth=_request_auth,
383
+ _content_type=_content_type,
384
+ _headers=_headers,
385
+ _host_index=_host_index
386
+ )
387
+
388
+ _response_types_map: Dict[str, Optional[str]] = {
389
+ '200': "Workflow",
390
+ '400': "Error",
391
+ '404': "Error",
392
+ }
393
+ response_data = self.api_client.call_api(
394
+ *_param,
395
+ _request_timeout=_request_timeout
396
+ )
397
+ response_data.read()
398
+ return self.api_client.response_deserialize(
399
+ response_data=response_data,
400
+ response_types_map=_response_types_map,
401
+ ).data
402
+
403
+
404
+ @validate_call
405
+ def workflows_id_get_with_http_info(
406
+ self,
407
+ id: Annotated[StrictStr, Field(description="ID of the workflow")],
408
+ context: Annotated[StrictStr, Field(description="ID of the context in which to perform the operation")],
409
+ workspace: Annotated[Optional[StrictStr], Field(description="ID of the workspace in which to perform the operation. Defaults to \"Main\".")] = None,
410
+ _request_timeout: Union[
411
+ None,
412
+ Annotated[StrictFloat, Field(gt=0)],
413
+ Tuple[
414
+ Annotated[StrictFloat, Field(gt=0)],
415
+ Annotated[StrictFloat, Field(gt=0)]
416
+ ]
417
+ ] = None,
418
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
419
+ _content_type: Optional[StrictStr] = None,
420
+ _headers: Optional[Dict[StrictStr, Any]] = None,
421
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
422
+ ) -> ApiResponse[Workflow]:
423
+ """Returns the workflow with the specified ID
424
+
425
+ Operation for retrieving a basic representation of a workflow
426
+
427
+ :param id: ID of the workflow (required)
428
+ :type id: str
429
+ :param context: ID of the context in which to perform the operation (required)
430
+ :type context: str
431
+ :param workspace: ID of the workspace in which to perform the operation. Defaults to \"Main\".
432
+ :type workspace: str
433
+ :param _request_timeout: timeout setting for this request. If one
434
+ number provided, it will be total request
435
+ timeout. It can also be a pair (tuple) of
436
+ (connection, read) timeouts.
437
+ :type _request_timeout: int, tuple(int, int), optional
438
+ :param _request_auth: set to override the auth_settings for an a single
439
+ request; this effectively ignores the
440
+ authentication in the spec for a single request.
441
+ :type _request_auth: dict, optional
442
+ :param _content_type: force content-type for the request.
443
+ :type _content_type: str, Optional
444
+ :param _headers: set to override the headers for a single
445
+ request; this effectively ignores the headers
446
+ in the spec for a single request.
447
+ :type _headers: dict, optional
448
+ :param _host_index: set to override the host_index for a single
449
+ request; this effectively ignores the host_index
450
+ in the spec for a single request.
451
+ :type _host_index: int, optional
452
+ :return: Returns the result object.
453
+ """ # noqa: E501
454
+
455
+ _param = self._workflows_id_get_serialize(
456
+ id=id,
457
+ context=context,
458
+ workspace=workspace,
459
+ _request_auth=_request_auth,
460
+ _content_type=_content_type,
461
+ _headers=_headers,
462
+ _host_index=_host_index
463
+ )
464
+
465
+ _response_types_map: Dict[str, Optional[str]] = {
466
+ '200': "Workflow",
467
+ '400': "Error",
468
+ '404': "Error",
469
+ }
470
+ response_data = self.api_client.call_api(
471
+ *_param,
472
+ _request_timeout=_request_timeout
473
+ )
474
+ response_data.read()
475
+ return self.api_client.response_deserialize(
476
+ response_data=response_data,
477
+ response_types_map=_response_types_map,
478
+ )
479
+
480
+
481
+ @validate_call
482
+ def workflows_id_get_without_preload_content(
483
+ self,
484
+ id: Annotated[StrictStr, Field(description="ID of the workflow")],
485
+ context: Annotated[StrictStr, Field(description="ID of the context in which to perform the operation")],
486
+ workspace: Annotated[Optional[StrictStr], Field(description="ID of the workspace in which to perform the operation. Defaults to \"Main\".")] = None,
487
+ _request_timeout: Union[
488
+ None,
489
+ Annotated[StrictFloat, Field(gt=0)],
490
+ Tuple[
491
+ Annotated[StrictFloat, Field(gt=0)],
492
+ Annotated[StrictFloat, Field(gt=0)]
493
+ ]
494
+ ] = None,
495
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
496
+ _content_type: Optional[StrictStr] = None,
497
+ _headers: Optional[Dict[StrictStr, Any]] = None,
498
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
499
+ ) -> RESTResponseType:
500
+ """Returns the workflow with the specified ID
501
+
502
+ Operation for retrieving a basic representation of a workflow
503
+
504
+ :param id: ID of the workflow (required)
505
+ :type id: str
506
+ :param context: ID of the context in which to perform the operation (required)
507
+ :type context: str
508
+ :param workspace: ID of the workspace in which to perform the operation. Defaults to \"Main\".
509
+ :type workspace: str
510
+ :param _request_timeout: timeout setting for this request. If one
511
+ number provided, it will be total request
512
+ timeout. It can also be a pair (tuple) of
513
+ (connection, read) timeouts.
514
+ :type _request_timeout: int, tuple(int, int), optional
515
+ :param _request_auth: set to override the auth_settings for an a single
516
+ request; this effectively ignores the
517
+ authentication in the spec for a single request.
518
+ :type _request_auth: dict, optional
519
+ :param _content_type: force content-type for the request.
520
+ :type _content_type: str, Optional
521
+ :param _headers: set to override the headers for a single
522
+ request; this effectively ignores the headers
523
+ in the spec for a single request.
524
+ :type _headers: dict, optional
525
+ :param _host_index: set to override the host_index for a single
526
+ request; this effectively ignores the host_index
527
+ in the spec for a single request.
528
+ :type _host_index: int, optional
529
+ :return: Returns the result object.
530
+ """ # noqa: E501
531
+
532
+ _param = self._workflows_id_get_serialize(
533
+ id=id,
534
+ context=context,
535
+ workspace=workspace,
536
+ _request_auth=_request_auth,
537
+ _content_type=_content_type,
538
+ _headers=_headers,
539
+ _host_index=_host_index
540
+ )
541
+
542
+ _response_types_map: Dict[str, Optional[str]] = {
543
+ '200': "Workflow",
544
+ '400': "Error",
545
+ '404': "Error",
546
+ }
547
+ response_data = self.api_client.call_api(
548
+ *_param,
549
+ _request_timeout=_request_timeout
550
+ )
551
+ return response_data.response
552
+
553
+
554
+ def _workflows_id_get_serialize(
555
+ self,
556
+ id,
557
+ context,
558
+ workspace,
559
+ _request_auth,
560
+ _content_type,
561
+ _headers,
562
+ _host_index,
563
+ ) -> RequestSerialized:
564
+
565
+ _host = None
566
+
567
+ _collection_formats: Dict[str, str] = {
568
+ }
569
+
570
+ _path_params: Dict[str, str] = {}
571
+ _query_params: List[Tuple[str, str]] = []
572
+ _header_params: Dict[str, Optional[str]] = _headers or {}
573
+ _form_params: List[Tuple[str, str]] = []
574
+ _files: Dict[
575
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
576
+ ] = {}
577
+ _body_params: Optional[bytes] = None
578
+
579
+ # process the path parameters
580
+ if id is not None:
581
+ _path_params['id'] = id
582
+ # process the query parameters
583
+ if context is not None:
584
+
585
+ _query_params.append(('context', context))
586
+
587
+ if workspace is not None:
588
+
589
+ _query_params.append(('workspace', workspace))
590
+
591
+ # process the header parameters
592
+ # process the form parameters
593
+ # process the body parameter
594
+
595
+
596
+ # set the HTTP header `Accept`
597
+ if 'Accept' not in _header_params:
598
+ _header_params['Accept'] = self.api_client.select_header_accept(
599
+ [
600
+ 'application/json'
601
+ ]
602
+ )
603
+
604
+
605
+ # authentication setting
606
+ _auth_settings: List[str] = [
607
+ 'basicAuth'
608
+ ]
609
+
610
+ return self.api_client.param_serialize(
611
+ method='GET',
612
+ resource_path='/workflows/{id}',
613
+ path_params=_path_params,
614
+ query_params=_query_params,
615
+ header_params=_header_params,
616
+ body=_body_params,
617
+ post_params=_form_params,
618
+ files=_files,
619
+ auth_settings=_auth_settings,
620
+ collection_formats=_collection_formats,
621
+ _host=_host,
622
+ _request_auth=_request_auth
623
+ )
624
+
625
+
626
+
627
+
628
+ @validate_call
629
+ def workflows_id_instances_instance_id_delete(
630
+ self,
631
+ id: Annotated[StrictStr, Field(description="ID of the workflow")],
632
+ instance_id: Annotated[StrictStr, Field(description="ID of the workflow instance")],
633
+ context: Annotated[StrictStr, Field(description="ID of the context in which to perform the operation")],
634
+ workspace: Annotated[Optional[StrictStr], Field(description="ID of the workspace in which to perform the operation. Defaults to \"Main\".")] = None,
635
+ _request_timeout: Union[
636
+ None,
637
+ Annotated[StrictFloat, Field(gt=0)],
638
+ Tuple[
639
+ Annotated[StrictFloat, Field(gt=0)],
640
+ Annotated[StrictFloat, Field(gt=0)]
641
+ ]
642
+ ] = None,
643
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
644
+ _content_type: Optional[StrictStr] = None,
645
+ _headers: Optional[Dict[StrictStr, Any]] = None,
646
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
647
+ ) -> None:
648
+ """Deletes the workflow instance with the specified ID
649
+
650
+ Operation for deleting a specific workflow instance
651
+
652
+ :param id: ID of the workflow (required)
653
+ :type id: str
654
+ :param instance_id: ID of the workflow instance (required)
655
+ :type instance_id: str
656
+ :param context: ID of the context in which to perform the operation (required)
657
+ :type context: str
658
+ :param workspace: ID of the workspace in which to perform the operation. Defaults to \"Main\".
659
+ :type workspace: str
660
+ :param _request_timeout: timeout setting for this request. If one
661
+ number provided, it will be total request
662
+ timeout. It can also be a pair (tuple) of
663
+ (connection, read) timeouts.
664
+ :type _request_timeout: int, tuple(int, int), optional
665
+ :param _request_auth: set to override the auth_settings for an a single
666
+ request; this effectively ignores the
667
+ authentication in the spec for a single request.
668
+ :type _request_auth: dict, optional
669
+ :param _content_type: force content-type for the request.
670
+ :type _content_type: str, Optional
671
+ :param _headers: set to override the headers for a single
672
+ request; this effectively ignores the headers
673
+ in the spec for a single request.
674
+ :type _headers: dict, optional
675
+ :param _host_index: set to override the host_index for a single
676
+ request; this effectively ignores the host_index
677
+ in the spec for a single request.
678
+ :type _host_index: int, optional
679
+ :return: Returns the result object.
680
+ """ # noqa: E501
681
+
682
+ _param = self._workflows_id_instances_instance_id_delete_serialize(
683
+ id=id,
684
+ instance_id=instance_id,
685
+ context=context,
686
+ workspace=workspace,
687
+ _request_auth=_request_auth,
688
+ _content_type=_content_type,
689
+ _headers=_headers,
690
+ _host_index=_host_index
691
+ )
692
+
693
+ _response_types_map: Dict[str, Optional[str]] = {
694
+ '200': None,
695
+ '400': "Error",
696
+ '404': "Error",
697
+ }
698
+ response_data = self.api_client.call_api(
699
+ *_param,
700
+ _request_timeout=_request_timeout
701
+ )
702
+ response_data.read()
703
+ return self.api_client.response_deserialize(
704
+ response_data=response_data,
705
+ response_types_map=_response_types_map,
706
+ ).data
707
+
708
+
709
+ @validate_call
710
+ def workflows_id_instances_instance_id_delete_with_http_info(
711
+ self,
712
+ id: Annotated[StrictStr, Field(description="ID of the workflow")],
713
+ instance_id: Annotated[StrictStr, Field(description="ID of the workflow instance")],
714
+ context: Annotated[StrictStr, Field(description="ID of the context in which to perform the operation")],
715
+ workspace: Annotated[Optional[StrictStr], Field(description="ID of the workspace in which to perform the operation. Defaults to \"Main\".")] = None,
716
+ _request_timeout: Union[
717
+ None,
718
+ Annotated[StrictFloat, Field(gt=0)],
719
+ Tuple[
720
+ Annotated[StrictFloat, Field(gt=0)],
721
+ Annotated[StrictFloat, Field(gt=0)]
722
+ ]
723
+ ] = None,
724
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
725
+ _content_type: Optional[StrictStr] = None,
726
+ _headers: Optional[Dict[StrictStr, Any]] = None,
727
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
728
+ ) -> ApiResponse[None]:
729
+ """Deletes the workflow instance with the specified ID
730
+
731
+ Operation for deleting a specific workflow instance
732
+
733
+ :param id: ID of the workflow (required)
734
+ :type id: str
735
+ :param instance_id: ID of the workflow instance (required)
736
+ :type instance_id: str
737
+ :param context: ID of the context in which to perform the operation (required)
738
+ :type context: str
739
+ :param workspace: ID of the workspace in which to perform the operation. Defaults to \"Main\".
740
+ :type workspace: str
741
+ :param _request_timeout: timeout setting for this request. If one
742
+ number provided, it will be total request
743
+ timeout. It can also be a pair (tuple) of
744
+ (connection, read) timeouts.
745
+ :type _request_timeout: int, tuple(int, int), optional
746
+ :param _request_auth: set to override the auth_settings for an a single
747
+ request; this effectively ignores the
748
+ authentication in the spec for a single request.
749
+ :type _request_auth: dict, optional
750
+ :param _content_type: force content-type for the request.
751
+ :type _content_type: str, Optional
752
+ :param _headers: set to override the headers for a single
753
+ request; this effectively ignores the headers
754
+ in the spec for a single request.
755
+ :type _headers: dict, optional
756
+ :param _host_index: set to override the host_index for a single
757
+ request; this effectively ignores the host_index
758
+ in the spec for a single request.
759
+ :type _host_index: int, optional
760
+ :return: Returns the result object.
761
+ """ # noqa: E501
762
+
763
+ _param = self._workflows_id_instances_instance_id_delete_serialize(
764
+ id=id,
765
+ instance_id=instance_id,
766
+ context=context,
767
+ workspace=workspace,
768
+ _request_auth=_request_auth,
769
+ _content_type=_content_type,
770
+ _headers=_headers,
771
+ _host_index=_host_index
772
+ )
773
+
774
+ _response_types_map: Dict[str, Optional[str]] = {
775
+ '200': None,
776
+ '400': "Error",
777
+ '404': "Error",
778
+ }
779
+ response_data = self.api_client.call_api(
780
+ *_param,
781
+ _request_timeout=_request_timeout
782
+ )
783
+ response_data.read()
784
+ return self.api_client.response_deserialize(
785
+ response_data=response_data,
786
+ response_types_map=_response_types_map,
787
+ )
788
+
789
+
790
+ @validate_call
791
+ def workflows_id_instances_instance_id_delete_without_preload_content(
792
+ self,
793
+ id: Annotated[StrictStr, Field(description="ID of the workflow")],
794
+ instance_id: Annotated[StrictStr, Field(description="ID of the workflow instance")],
795
+ context: Annotated[StrictStr, Field(description="ID of the context in which to perform the operation")],
796
+ workspace: Annotated[Optional[StrictStr], Field(description="ID of the workspace in which to perform the operation. Defaults to \"Main\".")] = None,
797
+ _request_timeout: Union[
798
+ None,
799
+ Annotated[StrictFloat, Field(gt=0)],
800
+ Tuple[
801
+ Annotated[StrictFloat, Field(gt=0)],
802
+ Annotated[StrictFloat, Field(gt=0)]
803
+ ]
804
+ ] = None,
805
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
806
+ _content_type: Optional[StrictStr] = None,
807
+ _headers: Optional[Dict[StrictStr, Any]] = None,
808
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
809
+ ) -> RESTResponseType:
810
+ """Deletes the workflow instance with the specified ID
811
+
812
+ Operation for deleting a specific workflow instance
813
+
814
+ :param id: ID of the workflow (required)
815
+ :type id: str
816
+ :param instance_id: ID of the workflow instance (required)
817
+ :type instance_id: str
818
+ :param context: ID of the context in which to perform the operation (required)
819
+ :type context: str
820
+ :param workspace: ID of the workspace in which to perform the operation. Defaults to \"Main\".
821
+ :type workspace: str
822
+ :param _request_timeout: timeout setting for this request. If one
823
+ number provided, it will be total request
824
+ timeout. It can also be a pair (tuple) of
825
+ (connection, read) timeouts.
826
+ :type _request_timeout: int, tuple(int, int), optional
827
+ :param _request_auth: set to override the auth_settings for an a single
828
+ request; this effectively ignores the
829
+ authentication in the spec for a single request.
830
+ :type _request_auth: dict, optional
831
+ :param _content_type: force content-type for the request.
832
+ :type _content_type: str, Optional
833
+ :param _headers: set to override the headers for a single
834
+ request; this effectively ignores the headers
835
+ in the spec for a single request.
836
+ :type _headers: dict, optional
837
+ :param _host_index: set to override the host_index for a single
838
+ request; this effectively ignores the host_index
839
+ in the spec for a single request.
840
+ :type _host_index: int, optional
841
+ :return: Returns the result object.
842
+ """ # noqa: E501
843
+
844
+ _param = self._workflows_id_instances_instance_id_delete_serialize(
845
+ id=id,
846
+ instance_id=instance_id,
847
+ context=context,
848
+ workspace=workspace,
849
+ _request_auth=_request_auth,
850
+ _content_type=_content_type,
851
+ _headers=_headers,
852
+ _host_index=_host_index
853
+ )
854
+
855
+ _response_types_map: Dict[str, Optional[str]] = {
856
+ '200': None,
857
+ '400': "Error",
858
+ '404': "Error",
859
+ }
860
+ response_data = self.api_client.call_api(
861
+ *_param,
862
+ _request_timeout=_request_timeout
863
+ )
864
+ return response_data.response
865
+
866
+
867
+ def _workflows_id_instances_instance_id_delete_serialize(
868
+ self,
869
+ id,
870
+ instance_id,
871
+ context,
872
+ workspace,
873
+ _request_auth,
874
+ _content_type,
875
+ _headers,
876
+ _host_index,
877
+ ) -> RequestSerialized:
878
+
879
+ _host = None
880
+
881
+ _collection_formats: Dict[str, str] = {
882
+ }
883
+
884
+ _path_params: Dict[str, str] = {}
885
+ _query_params: List[Tuple[str, str]] = []
886
+ _header_params: Dict[str, Optional[str]] = _headers or {}
887
+ _form_params: List[Tuple[str, str]] = []
888
+ _files: Dict[
889
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
890
+ ] = {}
891
+ _body_params: Optional[bytes] = None
892
+
893
+ # process the path parameters
894
+ if id is not None:
895
+ _path_params['id'] = id
896
+ if instance_id is not None:
897
+ _path_params['instanceId'] = instance_id
898
+ # process the query parameters
899
+ if context is not None:
900
+
901
+ _query_params.append(('context', context))
902
+
903
+ if workspace is not None:
904
+
905
+ _query_params.append(('workspace', workspace))
906
+
907
+ # process the header parameters
908
+ # process the form parameters
909
+ # process the body parameter
910
+
911
+
912
+ # set the HTTP header `Accept`
913
+ if 'Accept' not in _header_params:
914
+ _header_params['Accept'] = self.api_client.select_header_accept(
915
+ [
916
+ 'application/json'
917
+ ]
918
+ )
919
+
920
+
921
+ # authentication setting
922
+ _auth_settings: List[str] = [
923
+ 'basicAuth'
924
+ ]
925
+
926
+ return self.api_client.param_serialize(
927
+ method='DELETE',
928
+ resource_path='/workflows/{id}/instances/{instanceId}',
929
+ path_params=_path_params,
930
+ query_params=_query_params,
931
+ header_params=_header_params,
932
+ body=_body_params,
933
+ post_params=_form_params,
934
+ files=_files,
935
+ auth_settings=_auth_settings,
936
+ collection_formats=_collection_formats,
937
+ _host=_host,
938
+ _request_auth=_request_auth
939
+ )
940
+
941
+
942
+
943
+
944
+ @validate_call
945
+ def workflows_id_instances_post(
946
+ self,
947
+ id: Annotated[StrictStr, Field(description="ID of the workflow")],
948
+ context: Annotated[StrictStr, Field(description="ID of the context in which to perform the operation")],
949
+ workspace: Annotated[Optional[StrictStr], Field(description="ID of the workspace in which to perform the operation. Defaults to \"Main\".")] = None,
950
+ workflow_instance_creation: Optional[WorkflowInstanceCreation] = None,
951
+ _request_timeout: Union[
952
+ None,
953
+ Annotated[StrictFloat, Field(gt=0)],
954
+ Tuple[
955
+ Annotated[StrictFloat, Field(gt=0)],
956
+ Annotated[StrictFloat, Field(gt=0)]
957
+ ]
958
+ ] = None,
959
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
960
+ _content_type: Optional[StrictStr] = None,
961
+ _headers: Optional[Dict[StrictStr, Any]] = None,
962
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
963
+ ) -> WorkflowInstance:
964
+ """Starts a workflow
965
+
966
+ Operation for starting a workflow. I.e. creating a workflow instance.
967
+
968
+ :param id: ID of the workflow (required)
969
+ :type id: str
970
+ :param context: ID of the context in which to perform the operation (required)
971
+ :type context: str
972
+ :param workspace: ID of the workspace in which to perform the operation. Defaults to \"Main\".
973
+ :type workspace: str
974
+ :param workflow_instance_creation:
975
+ :type workflow_instance_creation: WorkflowInstanceCreation
976
+ :param _request_timeout: timeout setting for this request. If one
977
+ number provided, it will be total request
978
+ timeout. It can also be a pair (tuple) of
979
+ (connection, read) timeouts.
980
+ :type _request_timeout: int, tuple(int, int), optional
981
+ :param _request_auth: set to override the auth_settings for an a single
982
+ request; this effectively ignores the
983
+ authentication in the spec for a single request.
984
+ :type _request_auth: dict, optional
985
+ :param _content_type: force content-type for the request.
986
+ :type _content_type: str, Optional
987
+ :param _headers: set to override the headers for a single
988
+ request; this effectively ignores the headers
989
+ in the spec for a single request.
990
+ :type _headers: dict, optional
991
+ :param _host_index: set to override the host_index for a single
992
+ request; this effectively ignores the host_index
993
+ in the spec for a single request.
994
+ :type _host_index: int, optional
995
+ :return: Returns the result object.
996
+ """ # noqa: E501
997
+
998
+ _param = self._workflows_id_instances_post_serialize(
999
+ id=id,
1000
+ context=context,
1001
+ workspace=workspace,
1002
+ workflow_instance_creation=workflow_instance_creation,
1003
+ _request_auth=_request_auth,
1004
+ _content_type=_content_type,
1005
+ _headers=_headers,
1006
+ _host_index=_host_index
1007
+ )
1008
+
1009
+ _response_types_map: Dict[str, Optional[str]] = {
1010
+ '200': "WorkflowInstance",
1011
+ '400': "Error",
1012
+ '404': "Error",
1013
+ }
1014
+ response_data = self.api_client.call_api(
1015
+ *_param,
1016
+ _request_timeout=_request_timeout
1017
+ )
1018
+ response_data.read()
1019
+ return self.api_client.response_deserialize(
1020
+ response_data=response_data,
1021
+ response_types_map=_response_types_map,
1022
+ ).data
1023
+
1024
+
1025
+ @validate_call
1026
+ def workflows_id_instances_post_with_http_info(
1027
+ self,
1028
+ id: Annotated[StrictStr, Field(description="ID of the workflow")],
1029
+ context: Annotated[StrictStr, Field(description="ID of the context in which to perform the operation")],
1030
+ workspace: Annotated[Optional[StrictStr], Field(description="ID of the workspace in which to perform the operation. Defaults to \"Main\".")] = None,
1031
+ workflow_instance_creation: Optional[WorkflowInstanceCreation] = None,
1032
+ _request_timeout: Union[
1033
+ None,
1034
+ Annotated[StrictFloat, Field(gt=0)],
1035
+ Tuple[
1036
+ Annotated[StrictFloat, Field(gt=0)],
1037
+ Annotated[StrictFloat, Field(gt=0)]
1038
+ ]
1039
+ ] = None,
1040
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1041
+ _content_type: Optional[StrictStr] = None,
1042
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1043
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1044
+ ) -> ApiResponse[WorkflowInstance]:
1045
+ """Starts a workflow
1046
+
1047
+ Operation for starting a workflow. I.e. creating a workflow instance.
1048
+
1049
+ :param id: ID of the workflow (required)
1050
+ :type id: str
1051
+ :param context: ID of the context in which to perform the operation (required)
1052
+ :type context: str
1053
+ :param workspace: ID of the workspace in which to perform the operation. Defaults to \"Main\".
1054
+ :type workspace: str
1055
+ :param workflow_instance_creation:
1056
+ :type workflow_instance_creation: WorkflowInstanceCreation
1057
+ :param _request_timeout: timeout setting for this request. If one
1058
+ number provided, it will be total request
1059
+ timeout. It can also be a pair (tuple) of
1060
+ (connection, read) timeouts.
1061
+ :type _request_timeout: int, tuple(int, int), optional
1062
+ :param _request_auth: set to override the auth_settings for an a single
1063
+ request; this effectively ignores the
1064
+ authentication in the spec for a single request.
1065
+ :type _request_auth: dict, optional
1066
+ :param _content_type: force content-type for the request.
1067
+ :type _content_type: str, Optional
1068
+ :param _headers: set to override the headers for a single
1069
+ request; this effectively ignores the headers
1070
+ in the spec for a single request.
1071
+ :type _headers: dict, optional
1072
+ :param _host_index: set to override the host_index for a single
1073
+ request; this effectively ignores the host_index
1074
+ in the spec for a single request.
1075
+ :type _host_index: int, optional
1076
+ :return: Returns the result object.
1077
+ """ # noqa: E501
1078
+
1079
+ _param = self._workflows_id_instances_post_serialize(
1080
+ id=id,
1081
+ context=context,
1082
+ workspace=workspace,
1083
+ workflow_instance_creation=workflow_instance_creation,
1084
+ _request_auth=_request_auth,
1085
+ _content_type=_content_type,
1086
+ _headers=_headers,
1087
+ _host_index=_host_index
1088
+ )
1089
+
1090
+ _response_types_map: Dict[str, Optional[str]] = {
1091
+ '200': "WorkflowInstance",
1092
+ '400': "Error",
1093
+ '404': "Error",
1094
+ }
1095
+ response_data = self.api_client.call_api(
1096
+ *_param,
1097
+ _request_timeout=_request_timeout
1098
+ )
1099
+ response_data.read()
1100
+ return self.api_client.response_deserialize(
1101
+ response_data=response_data,
1102
+ response_types_map=_response_types_map,
1103
+ )
1104
+
1105
+
1106
+ @validate_call
1107
+ def workflows_id_instances_post_without_preload_content(
1108
+ self,
1109
+ id: Annotated[StrictStr, Field(description="ID of the workflow")],
1110
+ context: Annotated[StrictStr, Field(description="ID of the context in which to perform the operation")],
1111
+ workspace: Annotated[Optional[StrictStr], Field(description="ID of the workspace in which to perform the operation. Defaults to \"Main\".")] = None,
1112
+ workflow_instance_creation: Optional[WorkflowInstanceCreation] = None,
1113
+ _request_timeout: Union[
1114
+ None,
1115
+ Annotated[StrictFloat, Field(gt=0)],
1116
+ Tuple[
1117
+ Annotated[StrictFloat, Field(gt=0)],
1118
+ Annotated[StrictFloat, Field(gt=0)]
1119
+ ]
1120
+ ] = None,
1121
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1122
+ _content_type: Optional[StrictStr] = None,
1123
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1124
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1125
+ ) -> RESTResponseType:
1126
+ """Starts a workflow
1127
+
1128
+ Operation for starting a workflow. I.e. creating a workflow instance.
1129
+
1130
+ :param id: ID of the workflow (required)
1131
+ :type id: str
1132
+ :param context: ID of the context in which to perform the operation (required)
1133
+ :type context: str
1134
+ :param workspace: ID of the workspace in which to perform the operation. Defaults to \"Main\".
1135
+ :type workspace: str
1136
+ :param workflow_instance_creation:
1137
+ :type workflow_instance_creation: WorkflowInstanceCreation
1138
+ :param _request_timeout: timeout setting for this request. If one
1139
+ number provided, it will be total request
1140
+ timeout. It can also be a pair (tuple) of
1141
+ (connection, read) timeouts.
1142
+ :type _request_timeout: int, tuple(int, int), optional
1143
+ :param _request_auth: set to override the auth_settings for an a single
1144
+ request; this effectively ignores the
1145
+ authentication in the spec for a single request.
1146
+ :type _request_auth: dict, optional
1147
+ :param _content_type: force content-type for the request.
1148
+ :type _content_type: str, Optional
1149
+ :param _headers: set to override the headers for a single
1150
+ request; this effectively ignores the headers
1151
+ in the spec for a single request.
1152
+ :type _headers: dict, optional
1153
+ :param _host_index: set to override the host_index for a single
1154
+ request; this effectively ignores the host_index
1155
+ in the spec for a single request.
1156
+ :type _host_index: int, optional
1157
+ :return: Returns the result object.
1158
+ """ # noqa: E501
1159
+
1160
+ _param = self._workflows_id_instances_post_serialize(
1161
+ id=id,
1162
+ context=context,
1163
+ workspace=workspace,
1164
+ workflow_instance_creation=workflow_instance_creation,
1165
+ _request_auth=_request_auth,
1166
+ _content_type=_content_type,
1167
+ _headers=_headers,
1168
+ _host_index=_host_index
1169
+ )
1170
+
1171
+ _response_types_map: Dict[str, Optional[str]] = {
1172
+ '200': "WorkflowInstance",
1173
+ '400': "Error",
1174
+ '404': "Error",
1175
+ }
1176
+ response_data = self.api_client.call_api(
1177
+ *_param,
1178
+ _request_timeout=_request_timeout
1179
+ )
1180
+ return response_data.response
1181
+
1182
+
1183
+ def _workflows_id_instances_post_serialize(
1184
+ self,
1185
+ id,
1186
+ context,
1187
+ workspace,
1188
+ workflow_instance_creation,
1189
+ _request_auth,
1190
+ _content_type,
1191
+ _headers,
1192
+ _host_index,
1193
+ ) -> RequestSerialized:
1194
+
1195
+ _host = None
1196
+
1197
+ _collection_formats: Dict[str, str] = {
1198
+ }
1199
+
1200
+ _path_params: Dict[str, str] = {}
1201
+ _query_params: List[Tuple[str, str]] = []
1202
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1203
+ _form_params: List[Tuple[str, str]] = []
1204
+ _files: Dict[
1205
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1206
+ ] = {}
1207
+ _body_params: Optional[bytes] = None
1208
+
1209
+ # process the path parameters
1210
+ if id is not None:
1211
+ _path_params['id'] = id
1212
+ # process the query parameters
1213
+ if context is not None:
1214
+
1215
+ _query_params.append(('context', context))
1216
+
1217
+ if workspace is not None:
1218
+
1219
+ _query_params.append(('workspace', workspace))
1220
+
1221
+ # process the header parameters
1222
+ # process the form parameters
1223
+ # process the body parameter
1224
+ if workflow_instance_creation is not None:
1225
+ _body_params = workflow_instance_creation
1226
+
1227
+
1228
+ # set the HTTP header `Accept`
1229
+ if 'Accept' not in _header_params:
1230
+ _header_params['Accept'] = self.api_client.select_header_accept(
1231
+ [
1232
+ 'application/json'
1233
+ ]
1234
+ )
1235
+
1236
+ # set the HTTP header `Content-Type`
1237
+ if _content_type:
1238
+ _header_params['Content-Type'] = _content_type
1239
+ else:
1240
+ _default_content_type = (
1241
+ self.api_client.select_header_content_type(
1242
+ [
1243
+ 'application/json'
1244
+ ]
1245
+ )
1246
+ )
1247
+ if _default_content_type is not None:
1248
+ _header_params['Content-Type'] = _default_content_type
1249
+
1250
+ # authentication setting
1251
+ _auth_settings: List[str] = [
1252
+ 'basicAuth'
1253
+ ]
1254
+
1255
+ return self.api_client.param_serialize(
1256
+ method='POST',
1257
+ resource_path='/workflows/{id}/instances',
1258
+ path_params=_path_params,
1259
+ query_params=_query_params,
1260
+ header_params=_header_params,
1261
+ body=_body_params,
1262
+ post_params=_form_params,
1263
+ files=_files,
1264
+ auth_settings=_auth_settings,
1265
+ collection_formats=_collection_formats,
1266
+ _host=_host,
1267
+ _request_auth=_request_auth
1268
+ )
1269
+
1270
+