zyphr 0.1.39 → 0.1.41
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.
- checksums.yaml +4 -4
- data/README.md +35 -14
- data/docs/AddWorkflowStep201Response.md +20 -0
- data/docs/AddWorkflowStepRequest.md +30 -0
- data/docs/AuthRegistrationApi.md +1 -1
- data/docs/CreateWorkflow201Response.md +20 -0
- data/docs/CreateWorkflowRequest.md +26 -0
- data/docs/DeleteWorkflow200Response.md +20 -0
- data/docs/{TopicDeleteResponseData.md → DeleteWorkflow200ResponseData.md} +2 -2
- data/docs/DeleteWorkflowStep200Response.md +20 -0
- data/docs/DeleteWorkflowStep200ResponseData.md +22 -0
- data/docs/ListWorkflowExecutions200Response.md +20 -0
- data/docs/{SmsListResponseMeta.md → ListWorkflowExecutions200ResponseMeta.md} +2 -2
- data/docs/ListWorkflows200Response.md +20 -0
- data/docs/ListWorkflows200ResponseMeta.md +32 -0
- data/docs/ReorderWorkflowStepsRequest.md +18 -0
- data/docs/SignInWithGameCenterRequest.md +1 -1
- data/docs/SmsListResponse.md +1 -1
- data/docs/TopicDeleteResponse.md +1 -1
- data/docs/TriggerWorkflow202Response.md +20 -0
- data/docs/TriggerWorkflow202ResponseData.md +22 -0
- data/docs/TriggerWorkflowRequest.md +24 -0
- data/docs/UpdateWorkflowRequest.md +24 -0
- data/docs/UpdateWorkflowStatusRequest.md +18 -0
- data/docs/UpdateWorkflowStepRequest.md +20 -0
- data/docs/Workflow.md +42 -0
- data/docs/WorkflowStatus.md +15 -0
- data/docs/WorkflowStep.md +38 -0
- data/docs/WorkflowStepType.md +15 -0
- data/docs/WorkflowsApi.md +901 -0
- data/lib/zyphr/api/auth_registration_api.rb +2 -2
- data/lib/zyphr/api/workflows_api.rb +897 -0
- data/lib/zyphr/models/add_workflow_step201_response.rb +229 -0
- data/lib/zyphr/models/add_workflow_step_request.rb +384 -0
- data/lib/zyphr/models/create_workflow201_response.rb +229 -0
- data/lib/zyphr/models/create_workflow_request.rb +292 -0
- data/lib/zyphr/models/delete_workflow200_response.rb +229 -0
- data/lib/zyphr/models/{topic_delete_response_data.rb → delete_workflow200_response_data.rb} +3 -3
- data/lib/zyphr/models/delete_workflow_step200_response.rb +229 -0
- data/lib/zyphr/models/delete_workflow_step200_response_data.rb +238 -0
- data/lib/zyphr/models/list_workflow_executions200_response.rb +231 -0
- data/lib/zyphr/models/{sms_list_response_meta.rb → list_workflow_executions200_response_meta.rb} +3 -3
- data/lib/zyphr/models/list_workflows200_response.rb +231 -0
- data/lib/zyphr/models/list_workflows200_response_meta.rb +284 -0
- data/lib/zyphr/models/reorder_workflow_steps_request.rb +249 -0
- data/lib/zyphr/models/sign_in_with_game_center_request.rb +1 -1
- data/lib/zyphr/models/sms_list_response.rb +1 -1
- data/lib/zyphr/models/topic_delete_response.rb +1 -1
- data/lib/zyphr/models/trigger_workflow202_response.rb +229 -0
- data/lib/zyphr/models/trigger_workflow202_response_data.rb +240 -0
- data/lib/zyphr/models/trigger_workflow_request.rb +272 -0
- data/lib/zyphr/models/update_workflow_request.rb +269 -0
- data/lib/zyphr/models/{v1_muse_subjects_suggest_post_request.rb → update_workflow_status_request.rb} +19 -86
- data/lib/zyphr/models/update_workflow_step_request.rb +232 -0
- data/lib/zyphr/models/workflow.rb +514 -0
- data/lib/zyphr/models/workflow_status.rb +42 -0
- data/lib/zyphr/models/workflow_step.rb +505 -0
- data/lib/zyphr/models/workflow_step_type.rb +47 -0
- data/lib/zyphr.rb +24 -4
- data/spec/api/auth_registration_api_spec.rb +1 -1
- data/spec/api/workflows_api_spec.rb +192 -0
- data/spec/models/add_workflow_step201_response_spec.rb +42 -0
- data/spec/models/add_workflow_step_request_spec.rb +76 -0
- data/spec/models/create_workflow201_response_spec.rb +42 -0
- data/spec/models/{v1_muse_subjects_suggest_post_request_spec.rb → create_workflow_request_spec.rb} +16 -14
- data/spec/models/{topic_delete_response_data_spec.rb → delete_workflow200_response_data_spec.rb} +6 -6
- data/spec/models/delete_workflow200_response_spec.rb +42 -0
- data/spec/models/delete_workflow_step200_response_data_spec.rb +48 -0
- data/spec/models/delete_workflow_step200_response_spec.rb +42 -0
- data/spec/models/{sms_list_response_meta_spec.rb → list_workflow_executions200_response_meta_spec.rb} +6 -6
- data/spec/models/list_workflow_executions200_response_spec.rb +42 -0
- data/spec/models/list_workflows200_response_meta_spec.rb +78 -0
- data/spec/models/list_workflows200_response_spec.rb +42 -0
- data/spec/models/reorder_workflow_steps_request_spec.rb +36 -0
- data/spec/models/trigger_workflow202_response_data_spec.rb +48 -0
- data/spec/models/trigger_workflow202_response_spec.rb +42 -0
- data/spec/models/trigger_workflow_request_spec.rb +54 -0
- data/spec/models/update_workflow_request_spec.rb +54 -0
- data/spec/models/update_workflow_status_request_spec.rb +36 -0
- data/spec/models/update_workflow_step_request_spec.rb +42 -0
- data/spec/models/workflow_spec.rb +108 -0
- data/spec/models/workflow_status_spec.rb +30 -0
- data/spec/models/workflow_step_spec.rb +100 -0
- data/spec/models/workflow_step_type_spec.rb +30 -0
- data/zyphr.gemspec +1 -1
- metadata +97 -17
- data/docs/MuseApi.md +0 -681
- data/docs/V1MuseSubjectsSuggestPostRequest.md +0 -24
- data/lib/zyphr/api/muse_api.rb +0 -644
- data/spec/api/muse_api_spec.rb +0 -156
|
@@ -0,0 +1,901 @@
|
|
|
1
|
+
# Zyphr::WorkflowsApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://api.zyphr.dev/v1*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
| ------ | ------------ | ----------- |
|
|
7
|
+
| [**add_workflow_step**](WorkflowsApi.md#add_workflow_step) | **POST** /workflows/{key}/steps | Add a workflow step |
|
|
8
|
+
| [**create_workflow**](WorkflowsApi.md#create_workflow) | **POST** /workflows | Create a workflow |
|
|
9
|
+
| [**delete_workflow**](WorkflowsApi.md#delete_workflow) | **DELETE** /workflows/{key} | Delete a workflow |
|
|
10
|
+
| [**delete_workflow_step**](WorkflowsApi.md#delete_workflow_step) | **DELETE** /workflows/{key}/steps/{stepKey} | Delete a workflow step |
|
|
11
|
+
| [**get_workflow**](WorkflowsApi.md#get_workflow) | **GET** /workflows/{key} | Get a workflow |
|
|
12
|
+
| [**list_workflow_executions**](WorkflowsApi.md#list_workflow_executions) | **GET** /workflows/{key}/executions | List workflow executions |
|
|
13
|
+
| [**list_workflows**](WorkflowsApi.md#list_workflows) | **GET** /workflows | List workflows |
|
|
14
|
+
| [**reorder_workflow_steps**](WorkflowsApi.md#reorder_workflow_steps) | **PUT** /workflows/{key}/steps/reorder | Reorder workflow steps |
|
|
15
|
+
| [**trigger_workflow**](WorkflowsApi.md#trigger_workflow) | **POST** /workflows/{key}/trigger | Trigger a workflow |
|
|
16
|
+
| [**update_workflow**](WorkflowsApi.md#update_workflow) | **PATCH** /workflows/{key} | Update a workflow |
|
|
17
|
+
| [**update_workflow_status**](WorkflowsApi.md#update_workflow_status) | **PATCH** /workflows/{key}/status | Update workflow status |
|
|
18
|
+
| [**update_workflow_step**](WorkflowsApi.md#update_workflow_step) | **PATCH** /workflows/{key}/steps/{stepKey} | Update a workflow step |
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
## add_workflow_step
|
|
22
|
+
|
|
23
|
+
> <AddWorkflowStep201Response> add_workflow_step(key, add_workflow_step_request)
|
|
24
|
+
|
|
25
|
+
Add a workflow step
|
|
26
|
+
|
|
27
|
+
Append a step to a workflow. Channel steps (`email`, `push`, `sms`, `in_app`, `slack`, `discord`, `teams`) carry message content in `config`; `delay` steps carry `{ amount, unit }`; `branch` steps carry `{ conditions }`.
|
|
28
|
+
|
|
29
|
+
### Examples
|
|
30
|
+
|
|
31
|
+
```ruby
|
|
32
|
+
require 'time'
|
|
33
|
+
require 'zyphr'
|
|
34
|
+
# setup authorization
|
|
35
|
+
Zyphr.configure do |config|
|
|
36
|
+
# Configure API key authorization: ApiKeyAuth
|
|
37
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
38
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
39
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
api_instance = Zyphr::WorkflowsApi.new
|
|
43
|
+
key = 'key_example' # String | The workflow key.
|
|
44
|
+
add_workflow_step_request = Zyphr::AddWorkflowStepRequest.new({step_key: 'send-welcome-email', name: 'name_example', type: Zyphr::WorkflowStepType::EMAIL, config: { key: 3.56}}) # AddWorkflowStepRequest |
|
|
45
|
+
|
|
46
|
+
begin
|
|
47
|
+
# Add a workflow step
|
|
48
|
+
result = api_instance.add_workflow_step(key, add_workflow_step_request)
|
|
49
|
+
p result
|
|
50
|
+
rescue Zyphr::ApiError => e
|
|
51
|
+
puts "Error when calling WorkflowsApi->add_workflow_step: #{e}"
|
|
52
|
+
end
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
#### Using the add_workflow_step_with_http_info variant
|
|
56
|
+
|
|
57
|
+
This returns an Array which contains the response data, status code and headers.
|
|
58
|
+
|
|
59
|
+
> <Array(<AddWorkflowStep201Response>, Integer, Hash)> add_workflow_step_with_http_info(key, add_workflow_step_request)
|
|
60
|
+
|
|
61
|
+
```ruby
|
|
62
|
+
begin
|
|
63
|
+
# Add a workflow step
|
|
64
|
+
data, status_code, headers = api_instance.add_workflow_step_with_http_info(key, add_workflow_step_request)
|
|
65
|
+
p status_code # => 2xx
|
|
66
|
+
p headers # => { ... }
|
|
67
|
+
p data # => <AddWorkflowStep201Response>
|
|
68
|
+
rescue Zyphr::ApiError => e
|
|
69
|
+
puts "Error when calling WorkflowsApi->add_workflow_step_with_http_info: #{e}"
|
|
70
|
+
end
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Parameters
|
|
74
|
+
|
|
75
|
+
| Name | Type | Description | Notes |
|
|
76
|
+
| ---- | ---- | ----------- | ----- |
|
|
77
|
+
| **key** | **String** | The workflow key. | |
|
|
78
|
+
| **add_workflow_step_request** | [**AddWorkflowStepRequest**](AddWorkflowStepRequest.md) | | |
|
|
79
|
+
|
|
80
|
+
### Return type
|
|
81
|
+
|
|
82
|
+
[**AddWorkflowStep201Response**](AddWorkflowStep201Response.md)
|
|
83
|
+
|
|
84
|
+
### Authorization
|
|
85
|
+
|
|
86
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
87
|
+
|
|
88
|
+
### HTTP request headers
|
|
89
|
+
|
|
90
|
+
- **Content-Type**: application/json
|
|
91
|
+
- **Accept**: application/json
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
## create_workflow
|
|
95
|
+
|
|
96
|
+
> <CreateWorkflow201Response> create_workflow(create_workflow_request)
|
|
97
|
+
|
|
98
|
+
Create a workflow
|
|
99
|
+
|
|
100
|
+
Create a new notification workflow. A workflow is a named, multi-step notification sequence identified by a unique `key` within the project. If `key` is omitted, one is derived from the `name`.
|
|
101
|
+
|
|
102
|
+
### Examples
|
|
103
|
+
|
|
104
|
+
```ruby
|
|
105
|
+
require 'time'
|
|
106
|
+
require 'zyphr'
|
|
107
|
+
# setup authorization
|
|
108
|
+
Zyphr.configure do |config|
|
|
109
|
+
# Configure API key authorization: ApiKeyAuth
|
|
110
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
111
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
112
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
api_instance = Zyphr::WorkflowsApi.new
|
|
116
|
+
create_workflow_request = Zyphr::CreateWorkflowRequest.new({name: 'Welcome Series'}) # CreateWorkflowRequest |
|
|
117
|
+
|
|
118
|
+
begin
|
|
119
|
+
# Create a workflow
|
|
120
|
+
result = api_instance.create_workflow(create_workflow_request)
|
|
121
|
+
p result
|
|
122
|
+
rescue Zyphr::ApiError => e
|
|
123
|
+
puts "Error when calling WorkflowsApi->create_workflow: #{e}"
|
|
124
|
+
end
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
#### Using the create_workflow_with_http_info variant
|
|
128
|
+
|
|
129
|
+
This returns an Array which contains the response data, status code and headers.
|
|
130
|
+
|
|
131
|
+
> <Array(<CreateWorkflow201Response>, Integer, Hash)> create_workflow_with_http_info(create_workflow_request)
|
|
132
|
+
|
|
133
|
+
```ruby
|
|
134
|
+
begin
|
|
135
|
+
# Create a workflow
|
|
136
|
+
data, status_code, headers = api_instance.create_workflow_with_http_info(create_workflow_request)
|
|
137
|
+
p status_code # => 2xx
|
|
138
|
+
p headers # => { ... }
|
|
139
|
+
p data # => <CreateWorkflow201Response>
|
|
140
|
+
rescue Zyphr::ApiError => e
|
|
141
|
+
puts "Error when calling WorkflowsApi->create_workflow_with_http_info: #{e}"
|
|
142
|
+
end
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
### Parameters
|
|
146
|
+
|
|
147
|
+
| Name | Type | Description | Notes |
|
|
148
|
+
| ---- | ---- | ----------- | ----- |
|
|
149
|
+
| **create_workflow_request** | [**CreateWorkflowRequest**](CreateWorkflowRequest.md) | | |
|
|
150
|
+
|
|
151
|
+
### Return type
|
|
152
|
+
|
|
153
|
+
[**CreateWorkflow201Response**](CreateWorkflow201Response.md)
|
|
154
|
+
|
|
155
|
+
### Authorization
|
|
156
|
+
|
|
157
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
158
|
+
|
|
159
|
+
### HTTP request headers
|
|
160
|
+
|
|
161
|
+
- **Content-Type**: application/json
|
|
162
|
+
- **Accept**: application/json
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
## delete_workflow
|
|
166
|
+
|
|
167
|
+
> <DeleteWorkflow200Response> delete_workflow(key)
|
|
168
|
+
|
|
169
|
+
Delete a workflow
|
|
170
|
+
|
|
171
|
+
Permanently delete a workflow and all of its steps.
|
|
172
|
+
|
|
173
|
+
### Examples
|
|
174
|
+
|
|
175
|
+
```ruby
|
|
176
|
+
require 'time'
|
|
177
|
+
require 'zyphr'
|
|
178
|
+
# setup authorization
|
|
179
|
+
Zyphr.configure do |config|
|
|
180
|
+
# Configure API key authorization: ApiKeyAuth
|
|
181
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
182
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
183
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
api_instance = Zyphr::WorkflowsApi.new
|
|
187
|
+
key = 'key_example' # String | The workflow key.
|
|
188
|
+
|
|
189
|
+
begin
|
|
190
|
+
# Delete a workflow
|
|
191
|
+
result = api_instance.delete_workflow(key)
|
|
192
|
+
p result
|
|
193
|
+
rescue Zyphr::ApiError => e
|
|
194
|
+
puts "Error when calling WorkflowsApi->delete_workflow: #{e}"
|
|
195
|
+
end
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
#### Using the delete_workflow_with_http_info variant
|
|
199
|
+
|
|
200
|
+
This returns an Array which contains the response data, status code and headers.
|
|
201
|
+
|
|
202
|
+
> <Array(<DeleteWorkflow200Response>, Integer, Hash)> delete_workflow_with_http_info(key)
|
|
203
|
+
|
|
204
|
+
```ruby
|
|
205
|
+
begin
|
|
206
|
+
# Delete a workflow
|
|
207
|
+
data, status_code, headers = api_instance.delete_workflow_with_http_info(key)
|
|
208
|
+
p status_code # => 2xx
|
|
209
|
+
p headers # => { ... }
|
|
210
|
+
p data # => <DeleteWorkflow200Response>
|
|
211
|
+
rescue Zyphr::ApiError => e
|
|
212
|
+
puts "Error when calling WorkflowsApi->delete_workflow_with_http_info: #{e}"
|
|
213
|
+
end
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
### Parameters
|
|
217
|
+
|
|
218
|
+
| Name | Type | Description | Notes |
|
|
219
|
+
| ---- | ---- | ----------- | ----- |
|
|
220
|
+
| **key** | **String** | The workflow key. | |
|
|
221
|
+
|
|
222
|
+
### Return type
|
|
223
|
+
|
|
224
|
+
[**DeleteWorkflow200Response**](DeleteWorkflow200Response.md)
|
|
225
|
+
|
|
226
|
+
### Authorization
|
|
227
|
+
|
|
228
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
229
|
+
|
|
230
|
+
### HTTP request headers
|
|
231
|
+
|
|
232
|
+
- **Content-Type**: Not defined
|
|
233
|
+
- **Accept**: application/json
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
## delete_workflow_step
|
|
237
|
+
|
|
238
|
+
> <DeleteWorkflowStep200Response> delete_workflow_step(key, step_key)
|
|
239
|
+
|
|
240
|
+
Delete a workflow step
|
|
241
|
+
|
|
242
|
+
Remove a step from a workflow.
|
|
243
|
+
|
|
244
|
+
### Examples
|
|
245
|
+
|
|
246
|
+
```ruby
|
|
247
|
+
require 'time'
|
|
248
|
+
require 'zyphr'
|
|
249
|
+
# setup authorization
|
|
250
|
+
Zyphr.configure do |config|
|
|
251
|
+
# Configure API key authorization: ApiKeyAuth
|
|
252
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
253
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
254
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
255
|
+
end
|
|
256
|
+
|
|
257
|
+
api_instance = Zyphr::WorkflowsApi.new
|
|
258
|
+
key = 'key_example' # String | The workflow key.
|
|
259
|
+
step_key = 'step_key_example' # String | The step key.
|
|
260
|
+
|
|
261
|
+
begin
|
|
262
|
+
# Delete a workflow step
|
|
263
|
+
result = api_instance.delete_workflow_step(key, step_key)
|
|
264
|
+
p result
|
|
265
|
+
rescue Zyphr::ApiError => e
|
|
266
|
+
puts "Error when calling WorkflowsApi->delete_workflow_step: #{e}"
|
|
267
|
+
end
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
#### Using the delete_workflow_step_with_http_info variant
|
|
271
|
+
|
|
272
|
+
This returns an Array which contains the response data, status code and headers.
|
|
273
|
+
|
|
274
|
+
> <Array(<DeleteWorkflowStep200Response>, Integer, Hash)> delete_workflow_step_with_http_info(key, step_key)
|
|
275
|
+
|
|
276
|
+
```ruby
|
|
277
|
+
begin
|
|
278
|
+
# Delete a workflow step
|
|
279
|
+
data, status_code, headers = api_instance.delete_workflow_step_with_http_info(key, step_key)
|
|
280
|
+
p status_code # => 2xx
|
|
281
|
+
p headers # => { ... }
|
|
282
|
+
p data # => <DeleteWorkflowStep200Response>
|
|
283
|
+
rescue Zyphr::ApiError => e
|
|
284
|
+
puts "Error when calling WorkflowsApi->delete_workflow_step_with_http_info: #{e}"
|
|
285
|
+
end
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
### Parameters
|
|
289
|
+
|
|
290
|
+
| Name | Type | Description | Notes |
|
|
291
|
+
| ---- | ---- | ----------- | ----- |
|
|
292
|
+
| **key** | **String** | The workflow key. | |
|
|
293
|
+
| **step_key** | **String** | The step key. | |
|
|
294
|
+
|
|
295
|
+
### Return type
|
|
296
|
+
|
|
297
|
+
[**DeleteWorkflowStep200Response**](DeleteWorkflowStep200Response.md)
|
|
298
|
+
|
|
299
|
+
### Authorization
|
|
300
|
+
|
|
301
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
302
|
+
|
|
303
|
+
### HTTP request headers
|
|
304
|
+
|
|
305
|
+
- **Content-Type**: Not defined
|
|
306
|
+
- **Accept**: application/json
|
|
307
|
+
|
|
308
|
+
|
|
309
|
+
## get_workflow
|
|
310
|
+
|
|
311
|
+
> <CreateWorkflow201Response> get_workflow(key)
|
|
312
|
+
|
|
313
|
+
Get a workflow
|
|
314
|
+
|
|
315
|
+
Retrieve a single workflow by its key, including its ordered steps.
|
|
316
|
+
|
|
317
|
+
### Examples
|
|
318
|
+
|
|
319
|
+
```ruby
|
|
320
|
+
require 'time'
|
|
321
|
+
require 'zyphr'
|
|
322
|
+
# setup authorization
|
|
323
|
+
Zyphr.configure do |config|
|
|
324
|
+
# Configure API key authorization: ApiKeyAuth
|
|
325
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
326
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
327
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
328
|
+
end
|
|
329
|
+
|
|
330
|
+
api_instance = Zyphr::WorkflowsApi.new
|
|
331
|
+
key = 'key_example' # String | The workflow key.
|
|
332
|
+
|
|
333
|
+
begin
|
|
334
|
+
# Get a workflow
|
|
335
|
+
result = api_instance.get_workflow(key)
|
|
336
|
+
p result
|
|
337
|
+
rescue Zyphr::ApiError => e
|
|
338
|
+
puts "Error when calling WorkflowsApi->get_workflow: #{e}"
|
|
339
|
+
end
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
#### Using the get_workflow_with_http_info variant
|
|
343
|
+
|
|
344
|
+
This returns an Array which contains the response data, status code and headers.
|
|
345
|
+
|
|
346
|
+
> <Array(<CreateWorkflow201Response>, Integer, Hash)> get_workflow_with_http_info(key)
|
|
347
|
+
|
|
348
|
+
```ruby
|
|
349
|
+
begin
|
|
350
|
+
# Get a workflow
|
|
351
|
+
data, status_code, headers = api_instance.get_workflow_with_http_info(key)
|
|
352
|
+
p status_code # => 2xx
|
|
353
|
+
p headers # => { ... }
|
|
354
|
+
p data # => <CreateWorkflow201Response>
|
|
355
|
+
rescue Zyphr::ApiError => e
|
|
356
|
+
puts "Error when calling WorkflowsApi->get_workflow_with_http_info: #{e}"
|
|
357
|
+
end
|
|
358
|
+
```
|
|
359
|
+
|
|
360
|
+
### Parameters
|
|
361
|
+
|
|
362
|
+
| Name | Type | Description | Notes |
|
|
363
|
+
| ---- | ---- | ----------- | ----- |
|
|
364
|
+
| **key** | **String** | The workflow key. | |
|
|
365
|
+
|
|
366
|
+
### Return type
|
|
367
|
+
|
|
368
|
+
[**CreateWorkflow201Response**](CreateWorkflow201Response.md)
|
|
369
|
+
|
|
370
|
+
### Authorization
|
|
371
|
+
|
|
372
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
373
|
+
|
|
374
|
+
### HTTP request headers
|
|
375
|
+
|
|
376
|
+
- **Content-Type**: Not defined
|
|
377
|
+
- **Accept**: application/json
|
|
378
|
+
|
|
379
|
+
|
|
380
|
+
## list_workflow_executions
|
|
381
|
+
|
|
382
|
+
> <ListWorkflowExecutions200Response> list_workflow_executions(key, opts)
|
|
383
|
+
|
|
384
|
+
List workflow executions
|
|
385
|
+
|
|
386
|
+
List the executions of a workflow, most recent first. Supports pagination.
|
|
387
|
+
|
|
388
|
+
### Examples
|
|
389
|
+
|
|
390
|
+
```ruby
|
|
391
|
+
require 'time'
|
|
392
|
+
require 'zyphr'
|
|
393
|
+
# setup authorization
|
|
394
|
+
Zyphr.configure do |config|
|
|
395
|
+
# Configure API key authorization: ApiKeyAuth
|
|
396
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
397
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
398
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
399
|
+
end
|
|
400
|
+
|
|
401
|
+
api_instance = Zyphr::WorkflowsApi.new
|
|
402
|
+
key = 'key_example' # String | The workflow key.
|
|
403
|
+
opts = {
|
|
404
|
+
page: 56, # Integer | Page number (1-based).
|
|
405
|
+
per_page: 56 # Integer | Number of executions per page (max 100).
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
begin
|
|
409
|
+
# List workflow executions
|
|
410
|
+
result = api_instance.list_workflow_executions(key, opts)
|
|
411
|
+
p result
|
|
412
|
+
rescue Zyphr::ApiError => e
|
|
413
|
+
puts "Error when calling WorkflowsApi->list_workflow_executions: #{e}"
|
|
414
|
+
end
|
|
415
|
+
```
|
|
416
|
+
|
|
417
|
+
#### Using the list_workflow_executions_with_http_info variant
|
|
418
|
+
|
|
419
|
+
This returns an Array which contains the response data, status code and headers.
|
|
420
|
+
|
|
421
|
+
> <Array(<ListWorkflowExecutions200Response>, Integer, Hash)> list_workflow_executions_with_http_info(key, opts)
|
|
422
|
+
|
|
423
|
+
```ruby
|
|
424
|
+
begin
|
|
425
|
+
# List workflow executions
|
|
426
|
+
data, status_code, headers = api_instance.list_workflow_executions_with_http_info(key, opts)
|
|
427
|
+
p status_code # => 2xx
|
|
428
|
+
p headers # => { ... }
|
|
429
|
+
p data # => <ListWorkflowExecutions200Response>
|
|
430
|
+
rescue Zyphr::ApiError => e
|
|
431
|
+
puts "Error when calling WorkflowsApi->list_workflow_executions_with_http_info: #{e}"
|
|
432
|
+
end
|
|
433
|
+
```
|
|
434
|
+
|
|
435
|
+
### Parameters
|
|
436
|
+
|
|
437
|
+
| Name | Type | Description | Notes |
|
|
438
|
+
| ---- | ---- | ----------- | ----- |
|
|
439
|
+
| **key** | **String** | The workflow key. | |
|
|
440
|
+
| **page** | **Integer** | Page number (1-based). | [optional][default to 1] |
|
|
441
|
+
| **per_page** | **Integer** | Number of executions per page (max 100). | [optional][default to 25] |
|
|
442
|
+
|
|
443
|
+
### Return type
|
|
444
|
+
|
|
445
|
+
[**ListWorkflowExecutions200Response**](ListWorkflowExecutions200Response.md)
|
|
446
|
+
|
|
447
|
+
### Authorization
|
|
448
|
+
|
|
449
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
450
|
+
|
|
451
|
+
### HTTP request headers
|
|
452
|
+
|
|
453
|
+
- **Content-Type**: Not defined
|
|
454
|
+
- **Accept**: application/json
|
|
455
|
+
|
|
456
|
+
|
|
457
|
+
## list_workflows
|
|
458
|
+
|
|
459
|
+
> <ListWorkflows200Response> list_workflows(opts)
|
|
460
|
+
|
|
461
|
+
List workflows
|
|
462
|
+
|
|
463
|
+
List workflows in the project. Supports pagination, free-text search, and status filtering.
|
|
464
|
+
|
|
465
|
+
### Examples
|
|
466
|
+
|
|
467
|
+
```ruby
|
|
468
|
+
require 'time'
|
|
469
|
+
require 'zyphr'
|
|
470
|
+
# setup authorization
|
|
471
|
+
Zyphr.configure do |config|
|
|
472
|
+
# Configure API key authorization: ApiKeyAuth
|
|
473
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
474
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
475
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
476
|
+
end
|
|
477
|
+
|
|
478
|
+
api_instance = Zyphr::WorkflowsApi.new
|
|
479
|
+
opts = {
|
|
480
|
+
page: 56, # Integer | Page number (1-based).
|
|
481
|
+
per_page: 56, # Integer | Number of workflows per page (max 100).
|
|
482
|
+
search: 'search_example', # String | Free-text search over workflow name and key.
|
|
483
|
+
status: Zyphr::WorkflowStatus::DRAFT # WorkflowStatus | Filter by workflow status.
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
begin
|
|
487
|
+
# List workflows
|
|
488
|
+
result = api_instance.list_workflows(opts)
|
|
489
|
+
p result
|
|
490
|
+
rescue Zyphr::ApiError => e
|
|
491
|
+
puts "Error when calling WorkflowsApi->list_workflows: #{e}"
|
|
492
|
+
end
|
|
493
|
+
```
|
|
494
|
+
|
|
495
|
+
#### Using the list_workflows_with_http_info variant
|
|
496
|
+
|
|
497
|
+
This returns an Array which contains the response data, status code and headers.
|
|
498
|
+
|
|
499
|
+
> <Array(<ListWorkflows200Response>, Integer, Hash)> list_workflows_with_http_info(opts)
|
|
500
|
+
|
|
501
|
+
```ruby
|
|
502
|
+
begin
|
|
503
|
+
# List workflows
|
|
504
|
+
data, status_code, headers = api_instance.list_workflows_with_http_info(opts)
|
|
505
|
+
p status_code # => 2xx
|
|
506
|
+
p headers # => { ... }
|
|
507
|
+
p data # => <ListWorkflows200Response>
|
|
508
|
+
rescue Zyphr::ApiError => e
|
|
509
|
+
puts "Error when calling WorkflowsApi->list_workflows_with_http_info: #{e}"
|
|
510
|
+
end
|
|
511
|
+
```
|
|
512
|
+
|
|
513
|
+
### Parameters
|
|
514
|
+
|
|
515
|
+
| Name | Type | Description | Notes |
|
|
516
|
+
| ---- | ---- | ----------- | ----- |
|
|
517
|
+
| **page** | **Integer** | Page number (1-based). | [optional][default to 1] |
|
|
518
|
+
| **per_page** | **Integer** | Number of workflows per page (max 100). | [optional][default to 25] |
|
|
519
|
+
| **search** | **String** | Free-text search over workflow name and key. | [optional] |
|
|
520
|
+
| **status** | [**WorkflowStatus**](.md) | Filter by workflow status. | [optional] |
|
|
521
|
+
|
|
522
|
+
### Return type
|
|
523
|
+
|
|
524
|
+
[**ListWorkflows200Response**](ListWorkflows200Response.md)
|
|
525
|
+
|
|
526
|
+
### Authorization
|
|
527
|
+
|
|
528
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
529
|
+
|
|
530
|
+
### HTTP request headers
|
|
531
|
+
|
|
532
|
+
- **Content-Type**: Not defined
|
|
533
|
+
- **Accept**: application/json
|
|
534
|
+
|
|
535
|
+
|
|
536
|
+
## reorder_workflow_steps
|
|
537
|
+
|
|
538
|
+
> <CreateWorkflow201Response> reorder_workflow_steps(key, reorder_workflow_steps_request)
|
|
539
|
+
|
|
540
|
+
Reorder workflow steps
|
|
541
|
+
|
|
542
|
+
Reorder a workflow's steps. Provide the full set of step keys in the desired order — the array must contain exactly the workflow's existing step keys.
|
|
543
|
+
|
|
544
|
+
### Examples
|
|
545
|
+
|
|
546
|
+
```ruby
|
|
547
|
+
require 'time'
|
|
548
|
+
require 'zyphr'
|
|
549
|
+
# setup authorization
|
|
550
|
+
Zyphr.configure do |config|
|
|
551
|
+
# Configure API key authorization: ApiKeyAuth
|
|
552
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
553
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
554
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
555
|
+
end
|
|
556
|
+
|
|
557
|
+
api_instance = Zyphr::WorkflowsApi.new
|
|
558
|
+
key = 'key_example' # String | The workflow key.
|
|
559
|
+
reorder_workflow_steps_request = Zyphr::ReorderWorkflowStepsRequest.new({step_keys: ['step_keys_example']}) # ReorderWorkflowStepsRequest |
|
|
560
|
+
|
|
561
|
+
begin
|
|
562
|
+
# Reorder workflow steps
|
|
563
|
+
result = api_instance.reorder_workflow_steps(key, reorder_workflow_steps_request)
|
|
564
|
+
p result
|
|
565
|
+
rescue Zyphr::ApiError => e
|
|
566
|
+
puts "Error when calling WorkflowsApi->reorder_workflow_steps: #{e}"
|
|
567
|
+
end
|
|
568
|
+
```
|
|
569
|
+
|
|
570
|
+
#### Using the reorder_workflow_steps_with_http_info variant
|
|
571
|
+
|
|
572
|
+
This returns an Array which contains the response data, status code and headers.
|
|
573
|
+
|
|
574
|
+
> <Array(<CreateWorkflow201Response>, Integer, Hash)> reorder_workflow_steps_with_http_info(key, reorder_workflow_steps_request)
|
|
575
|
+
|
|
576
|
+
```ruby
|
|
577
|
+
begin
|
|
578
|
+
# Reorder workflow steps
|
|
579
|
+
data, status_code, headers = api_instance.reorder_workflow_steps_with_http_info(key, reorder_workflow_steps_request)
|
|
580
|
+
p status_code # => 2xx
|
|
581
|
+
p headers # => { ... }
|
|
582
|
+
p data # => <CreateWorkflow201Response>
|
|
583
|
+
rescue Zyphr::ApiError => e
|
|
584
|
+
puts "Error when calling WorkflowsApi->reorder_workflow_steps_with_http_info: #{e}"
|
|
585
|
+
end
|
|
586
|
+
```
|
|
587
|
+
|
|
588
|
+
### Parameters
|
|
589
|
+
|
|
590
|
+
| Name | Type | Description | Notes |
|
|
591
|
+
| ---- | ---- | ----------- | ----- |
|
|
592
|
+
| **key** | **String** | The workflow key. | |
|
|
593
|
+
| **reorder_workflow_steps_request** | [**ReorderWorkflowStepsRequest**](ReorderWorkflowStepsRequest.md) | | |
|
|
594
|
+
|
|
595
|
+
### Return type
|
|
596
|
+
|
|
597
|
+
[**CreateWorkflow201Response**](CreateWorkflow201Response.md)
|
|
598
|
+
|
|
599
|
+
### Authorization
|
|
600
|
+
|
|
601
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
602
|
+
|
|
603
|
+
### HTTP request headers
|
|
604
|
+
|
|
605
|
+
- **Content-Type**: application/json
|
|
606
|
+
- **Accept**: application/json
|
|
607
|
+
|
|
608
|
+
|
|
609
|
+
## trigger_workflow
|
|
610
|
+
|
|
611
|
+
> <TriggerWorkflow202Response> trigger_workflow(key, trigger_workflow_request)
|
|
612
|
+
|
|
613
|
+
Trigger a workflow
|
|
614
|
+
|
|
615
|
+
Trigger an execution of an active workflow for one or more recipients. The `to` field accepts a single recipient, an array of recipients, or a topic object (`{ \"topic\": \"topic-key\" }`) to trigger for all subscribers of a topic. One execution is created per resolved subscriber.
|
|
616
|
+
|
|
617
|
+
### Examples
|
|
618
|
+
|
|
619
|
+
```ruby
|
|
620
|
+
require 'time'
|
|
621
|
+
require 'zyphr'
|
|
622
|
+
# setup authorization
|
|
623
|
+
Zyphr.configure do |config|
|
|
624
|
+
# Configure API key authorization: ApiKeyAuth
|
|
625
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
626
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
627
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
628
|
+
end
|
|
629
|
+
|
|
630
|
+
api_instance = Zyphr::WorkflowsApi.new
|
|
631
|
+
key = 'key_example' # String | The workflow key.
|
|
632
|
+
trigger_workflow_request = Zyphr::TriggerWorkflowRequest.new({to: ["user_123", "user_456"]}) # TriggerWorkflowRequest |
|
|
633
|
+
|
|
634
|
+
begin
|
|
635
|
+
# Trigger a workflow
|
|
636
|
+
result = api_instance.trigger_workflow(key, trigger_workflow_request)
|
|
637
|
+
p result
|
|
638
|
+
rescue Zyphr::ApiError => e
|
|
639
|
+
puts "Error when calling WorkflowsApi->trigger_workflow: #{e}"
|
|
640
|
+
end
|
|
641
|
+
```
|
|
642
|
+
|
|
643
|
+
#### Using the trigger_workflow_with_http_info variant
|
|
644
|
+
|
|
645
|
+
This returns an Array which contains the response data, status code and headers.
|
|
646
|
+
|
|
647
|
+
> <Array(<TriggerWorkflow202Response>, Integer, Hash)> trigger_workflow_with_http_info(key, trigger_workflow_request)
|
|
648
|
+
|
|
649
|
+
```ruby
|
|
650
|
+
begin
|
|
651
|
+
# Trigger a workflow
|
|
652
|
+
data, status_code, headers = api_instance.trigger_workflow_with_http_info(key, trigger_workflow_request)
|
|
653
|
+
p status_code # => 2xx
|
|
654
|
+
p headers # => { ... }
|
|
655
|
+
p data # => <TriggerWorkflow202Response>
|
|
656
|
+
rescue Zyphr::ApiError => e
|
|
657
|
+
puts "Error when calling WorkflowsApi->trigger_workflow_with_http_info: #{e}"
|
|
658
|
+
end
|
|
659
|
+
```
|
|
660
|
+
|
|
661
|
+
### Parameters
|
|
662
|
+
|
|
663
|
+
| Name | Type | Description | Notes |
|
|
664
|
+
| ---- | ---- | ----------- | ----- |
|
|
665
|
+
| **key** | **String** | The workflow key. | |
|
|
666
|
+
| **trigger_workflow_request** | [**TriggerWorkflowRequest**](TriggerWorkflowRequest.md) | | |
|
|
667
|
+
|
|
668
|
+
### Return type
|
|
669
|
+
|
|
670
|
+
[**TriggerWorkflow202Response**](TriggerWorkflow202Response.md)
|
|
671
|
+
|
|
672
|
+
### Authorization
|
|
673
|
+
|
|
674
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
675
|
+
|
|
676
|
+
### HTTP request headers
|
|
677
|
+
|
|
678
|
+
- **Content-Type**: application/json
|
|
679
|
+
- **Accept**: application/json
|
|
680
|
+
|
|
681
|
+
|
|
682
|
+
## update_workflow
|
|
683
|
+
|
|
684
|
+
> <CreateWorkflow201Response> update_workflow(key, update_workflow_request)
|
|
685
|
+
|
|
686
|
+
Update a workflow
|
|
687
|
+
|
|
688
|
+
Update a workflow's metadata. Only the provided fields are changed. To change the status, use the dedicated status endpoint.
|
|
689
|
+
|
|
690
|
+
### Examples
|
|
691
|
+
|
|
692
|
+
```ruby
|
|
693
|
+
require 'time'
|
|
694
|
+
require 'zyphr'
|
|
695
|
+
# setup authorization
|
|
696
|
+
Zyphr.configure do |config|
|
|
697
|
+
# Configure API key authorization: ApiKeyAuth
|
|
698
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
699
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
700
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
701
|
+
end
|
|
702
|
+
|
|
703
|
+
api_instance = Zyphr::WorkflowsApi.new
|
|
704
|
+
key = 'key_example' # String | The workflow key.
|
|
705
|
+
update_workflow_request = Zyphr::UpdateWorkflowRequest.new # UpdateWorkflowRequest |
|
|
706
|
+
|
|
707
|
+
begin
|
|
708
|
+
# Update a workflow
|
|
709
|
+
result = api_instance.update_workflow(key, update_workflow_request)
|
|
710
|
+
p result
|
|
711
|
+
rescue Zyphr::ApiError => e
|
|
712
|
+
puts "Error when calling WorkflowsApi->update_workflow: #{e}"
|
|
713
|
+
end
|
|
714
|
+
```
|
|
715
|
+
|
|
716
|
+
#### Using the update_workflow_with_http_info variant
|
|
717
|
+
|
|
718
|
+
This returns an Array which contains the response data, status code and headers.
|
|
719
|
+
|
|
720
|
+
> <Array(<CreateWorkflow201Response>, Integer, Hash)> update_workflow_with_http_info(key, update_workflow_request)
|
|
721
|
+
|
|
722
|
+
```ruby
|
|
723
|
+
begin
|
|
724
|
+
# Update a workflow
|
|
725
|
+
data, status_code, headers = api_instance.update_workflow_with_http_info(key, update_workflow_request)
|
|
726
|
+
p status_code # => 2xx
|
|
727
|
+
p headers # => { ... }
|
|
728
|
+
p data # => <CreateWorkflow201Response>
|
|
729
|
+
rescue Zyphr::ApiError => e
|
|
730
|
+
puts "Error when calling WorkflowsApi->update_workflow_with_http_info: #{e}"
|
|
731
|
+
end
|
|
732
|
+
```
|
|
733
|
+
|
|
734
|
+
### Parameters
|
|
735
|
+
|
|
736
|
+
| Name | Type | Description | Notes |
|
|
737
|
+
| ---- | ---- | ----------- | ----- |
|
|
738
|
+
| **key** | **String** | The workflow key. | |
|
|
739
|
+
| **update_workflow_request** | [**UpdateWorkflowRequest**](UpdateWorkflowRequest.md) | | |
|
|
740
|
+
|
|
741
|
+
### Return type
|
|
742
|
+
|
|
743
|
+
[**CreateWorkflow201Response**](CreateWorkflow201Response.md)
|
|
744
|
+
|
|
745
|
+
### Authorization
|
|
746
|
+
|
|
747
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
748
|
+
|
|
749
|
+
### HTTP request headers
|
|
750
|
+
|
|
751
|
+
- **Content-Type**: application/json
|
|
752
|
+
- **Accept**: application/json
|
|
753
|
+
|
|
754
|
+
|
|
755
|
+
## update_workflow_status
|
|
756
|
+
|
|
757
|
+
> <CreateWorkflow201Response> update_workflow_status(key, update_workflow_status_request)
|
|
758
|
+
|
|
759
|
+
Update workflow status
|
|
760
|
+
|
|
761
|
+
Change a workflow's lifecycle status. This is the single endpoint for activating, pausing, archiving, or returning a workflow to draft — there are no separate `/activate` or `/pause` endpoints. Set `status` to `active` to activate and `paused` to pause.
|
|
762
|
+
|
|
763
|
+
### Examples
|
|
764
|
+
|
|
765
|
+
```ruby
|
|
766
|
+
require 'time'
|
|
767
|
+
require 'zyphr'
|
|
768
|
+
# setup authorization
|
|
769
|
+
Zyphr.configure do |config|
|
|
770
|
+
# Configure API key authorization: ApiKeyAuth
|
|
771
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
772
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
773
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
774
|
+
end
|
|
775
|
+
|
|
776
|
+
api_instance = Zyphr::WorkflowsApi.new
|
|
777
|
+
key = 'key_example' # String | The workflow key.
|
|
778
|
+
update_workflow_status_request = Zyphr::UpdateWorkflowStatusRequest.new({status: Zyphr::WorkflowStatus::DRAFT}) # UpdateWorkflowStatusRequest |
|
|
779
|
+
|
|
780
|
+
begin
|
|
781
|
+
# Update workflow status
|
|
782
|
+
result = api_instance.update_workflow_status(key, update_workflow_status_request)
|
|
783
|
+
p result
|
|
784
|
+
rescue Zyphr::ApiError => e
|
|
785
|
+
puts "Error when calling WorkflowsApi->update_workflow_status: #{e}"
|
|
786
|
+
end
|
|
787
|
+
```
|
|
788
|
+
|
|
789
|
+
#### Using the update_workflow_status_with_http_info variant
|
|
790
|
+
|
|
791
|
+
This returns an Array which contains the response data, status code and headers.
|
|
792
|
+
|
|
793
|
+
> <Array(<CreateWorkflow201Response>, Integer, Hash)> update_workflow_status_with_http_info(key, update_workflow_status_request)
|
|
794
|
+
|
|
795
|
+
```ruby
|
|
796
|
+
begin
|
|
797
|
+
# Update workflow status
|
|
798
|
+
data, status_code, headers = api_instance.update_workflow_status_with_http_info(key, update_workflow_status_request)
|
|
799
|
+
p status_code # => 2xx
|
|
800
|
+
p headers # => { ... }
|
|
801
|
+
p data # => <CreateWorkflow201Response>
|
|
802
|
+
rescue Zyphr::ApiError => e
|
|
803
|
+
puts "Error when calling WorkflowsApi->update_workflow_status_with_http_info: #{e}"
|
|
804
|
+
end
|
|
805
|
+
```
|
|
806
|
+
|
|
807
|
+
### Parameters
|
|
808
|
+
|
|
809
|
+
| Name | Type | Description | Notes |
|
|
810
|
+
| ---- | ---- | ----------- | ----- |
|
|
811
|
+
| **key** | **String** | The workflow key. | |
|
|
812
|
+
| **update_workflow_status_request** | [**UpdateWorkflowStatusRequest**](UpdateWorkflowStatusRequest.md) | | |
|
|
813
|
+
|
|
814
|
+
### Return type
|
|
815
|
+
|
|
816
|
+
[**CreateWorkflow201Response**](CreateWorkflow201Response.md)
|
|
817
|
+
|
|
818
|
+
### Authorization
|
|
819
|
+
|
|
820
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
821
|
+
|
|
822
|
+
### HTTP request headers
|
|
823
|
+
|
|
824
|
+
- **Content-Type**: application/json
|
|
825
|
+
- **Accept**: application/json
|
|
826
|
+
|
|
827
|
+
|
|
828
|
+
## update_workflow_step
|
|
829
|
+
|
|
830
|
+
> <AddWorkflowStep201Response> update_workflow_step(key, step_key, update_workflow_step_request)
|
|
831
|
+
|
|
832
|
+
Update a workflow step
|
|
833
|
+
|
|
834
|
+
Update a step's name and/or config. Only the provided fields are changed.
|
|
835
|
+
|
|
836
|
+
### Examples
|
|
837
|
+
|
|
838
|
+
```ruby
|
|
839
|
+
require 'time'
|
|
840
|
+
require 'zyphr'
|
|
841
|
+
# setup authorization
|
|
842
|
+
Zyphr.configure do |config|
|
|
843
|
+
# Configure API key authorization: ApiKeyAuth
|
|
844
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
845
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
846
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
847
|
+
end
|
|
848
|
+
|
|
849
|
+
api_instance = Zyphr::WorkflowsApi.new
|
|
850
|
+
key = 'key_example' # String | The workflow key.
|
|
851
|
+
step_key = 'step_key_example' # String | The step key.
|
|
852
|
+
update_workflow_step_request = Zyphr::UpdateWorkflowStepRequest.new # UpdateWorkflowStepRequest |
|
|
853
|
+
|
|
854
|
+
begin
|
|
855
|
+
# Update a workflow step
|
|
856
|
+
result = api_instance.update_workflow_step(key, step_key, update_workflow_step_request)
|
|
857
|
+
p result
|
|
858
|
+
rescue Zyphr::ApiError => e
|
|
859
|
+
puts "Error when calling WorkflowsApi->update_workflow_step: #{e}"
|
|
860
|
+
end
|
|
861
|
+
```
|
|
862
|
+
|
|
863
|
+
#### Using the update_workflow_step_with_http_info variant
|
|
864
|
+
|
|
865
|
+
This returns an Array which contains the response data, status code and headers.
|
|
866
|
+
|
|
867
|
+
> <Array(<AddWorkflowStep201Response>, Integer, Hash)> update_workflow_step_with_http_info(key, step_key, update_workflow_step_request)
|
|
868
|
+
|
|
869
|
+
```ruby
|
|
870
|
+
begin
|
|
871
|
+
# Update a workflow step
|
|
872
|
+
data, status_code, headers = api_instance.update_workflow_step_with_http_info(key, step_key, update_workflow_step_request)
|
|
873
|
+
p status_code # => 2xx
|
|
874
|
+
p headers # => { ... }
|
|
875
|
+
p data # => <AddWorkflowStep201Response>
|
|
876
|
+
rescue Zyphr::ApiError => e
|
|
877
|
+
puts "Error when calling WorkflowsApi->update_workflow_step_with_http_info: #{e}"
|
|
878
|
+
end
|
|
879
|
+
```
|
|
880
|
+
|
|
881
|
+
### Parameters
|
|
882
|
+
|
|
883
|
+
| Name | Type | Description | Notes |
|
|
884
|
+
| ---- | ---- | ----------- | ----- |
|
|
885
|
+
| **key** | **String** | The workflow key. | |
|
|
886
|
+
| **step_key** | **String** | The step key. | |
|
|
887
|
+
| **update_workflow_step_request** | [**UpdateWorkflowStepRequest**](UpdateWorkflowStepRequest.md) | | |
|
|
888
|
+
|
|
889
|
+
### Return type
|
|
890
|
+
|
|
891
|
+
[**AddWorkflowStep201Response**](AddWorkflowStep201Response.md)
|
|
892
|
+
|
|
893
|
+
### Authorization
|
|
894
|
+
|
|
895
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
896
|
+
|
|
897
|
+
### HTTP request headers
|
|
898
|
+
|
|
899
|
+
- **Content-Type**: application/json
|
|
900
|
+
- **Accept**: application/json
|
|
901
|
+
|