api-sdk-rb 1.11.66 → 1.11.111

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 (317) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +192 -9
  3. data/docs/AdapterConnection.md +7 -1
  4. data/docs/BrandColor.md +22 -0
  5. data/docs/BrandFont.md +24 -0
  6. data/docs/BrandKitApi.md +593 -0
  7. data/docs/BrandKitAssetView.md +42 -0
  8. data/docs/BrandKitFigmaSource.md +26 -0
  9. data/docs/BrandKitTokens.md +24 -0
  10. data/docs/BrandKitTokensFonts.md +24 -0
  11. data/docs/BrandKitView.md +36 -0
  12. data/docs/BrandKitViewOwner.md +20 -0
  13. data/docs/BrandKitViewResponse.md +22 -0
  14. data/docs/BrandSpacing.md +32 -0
  15. data/docs/Composition.md +5 -1
  16. data/docs/CompositionLastEditedBy.md +20 -0
  17. data/docs/CompositionsApi.md +217 -135
  18. data/docs/ConfirmAdapterConnectionRequest.md +18 -0
  19. data/docs/CreateWidget201ResponseData.md +2 -4
  20. data/docs/CreateWorkspaceWorkflowFromPreset201Response.md +22 -0
  21. data/docs/CreateWorkspaceWorkflowFromPresetRequest.md +20 -0
  22. data/docs/CreateWorkspaceWorkflowRequest.md +22 -0
  23. data/docs/DeleteWorkspaceWorkflow200Response.md +22 -0
  24. data/docs/GetPublicCompositionEmbed200Response.md +7 -1
  25. data/docs/GetPublicCompositionEmbed200ResponseAdapters.md +20 -0
  26. data/docs/GetPublicCompositionEmbed200ResponseAdaptersCaptcha.md +18 -0
  27. data/docs/GetPublicCompositionEmbed200ResponseEntries.md +20 -0
  28. data/docs/GetPublicCompositionEmbed200ResponseMedia.md +18 -0
  29. data/docs/GetPublicWorkflow200Response.md +22 -0
  30. data/docs/GetWorkspaceWorkflowStats200Response.md +22 -0
  31. data/docs/GetWorkspaceWorkflowVersion200Response.md +22 -0
  32. data/docs/ListPartnerWorkflowPresets200Response.md +22 -0
  33. data/docs/ListWorkspaceWorkflowCompositionOptions200Response.md +22 -0
  34. data/docs/ListWorkspaceWorkflowPresets200Response.md +22 -0
  35. data/docs/ListWorkspaceWorkflowVersions200Response.md +22 -0
  36. data/docs/ListWorkspaceWorkflows200Response.md +22 -0
  37. data/docs/ManagedUsersApi.md +1 -1
  38. data/docs/NewComposition.md +1 -1
  39. data/docs/NewEditorSession.md +1 -1
  40. data/docs/OfferWorkflowPresetRequest.md +24 -0
  41. data/docs/OfferedWorkflowPreset.md +40 -0
  42. data/docs/OfferedWorkflowPresetList.md +18 -0
  43. data/docs/OfferedWorkflowPresetWidget.md +22 -0
  44. data/docs/PartnerApi.md +3360 -538
  45. data/docs/PartnerCustomization.md +2 -2
  46. data/docs/PartnerNotification.md +1 -1
  47. data/docs/PartnersApi.md +294 -2
  48. data/docs/PatchBrandKitAssetRequest.md +24 -0
  49. data/docs/PatchBrandKitRequest.md +28 -0
  50. data/docs/PatchBrandKitRequestFonts.md +24 -0
  51. data/docs/PatchBrandKitRequestSpacing.md +32 -0
  52. data/docs/PostBrandKitIconRequest.md +20 -0
  53. data/docs/PublicEmbedApi.md +270 -4
  54. data/docs/PublicWorkflow.md +36 -0
  55. data/docs/PublicWorkflowEventsAccepted.md +22 -0
  56. data/docs/PublicWorkflowEventsRequest.md +24 -0
  57. data/docs/PublicWorkflowEventsRequestEventsInner.md +22 -0
  58. data/docs/PublicWorkflowEventsRequestHeightsInner.md +20 -0
  59. data/docs/PublicWorkflowTranslation.md +20 -0
  60. data/docs/PublishWorkspaceWorkflow200Response.md +22 -0
  61. data/docs/PublishWorkspaceWorkflowRequest.md +18 -0
  62. data/docs/PutBrandKitRequest.md +22 -0
  63. data/docs/RemovePartnerWorkflowPreset200Response.md +22 -0
  64. data/docs/ReportPublicWorkflowEvents200Response.md +22 -0
  65. data/docs/SaveWorkspaceWorkflow200Response.md +22 -0
  66. data/docs/SaveWorkspaceWorkflowRequest.md +24 -0
  67. data/docs/SetAdapterConnectionRequest.md +1 -1
  68. data/docs/SetPartnerWorkflowPreset200Response.md +22 -0
  69. data/docs/UpdateComposition.md +1 -1
  70. data/docs/UsersApi.md +77 -1
  71. data/docs/Widget.md +2 -4
  72. data/docs/Workflow.md +50 -0
  73. data/docs/WorkflowCompositionAction.md +24 -0
  74. data/docs/WorkflowCompositionField.md +24 -0
  75. data/docs/WorkflowCompositionOption.md +30 -0
  76. data/docs/WorkflowCompositionOptionActions.md +22 -0
  77. data/docs/WorkflowCompositionOptionInputs.md +24 -0
  78. data/docs/WorkflowCompositionOptions.md +24 -0
  79. data/docs/WorkflowConditionCase.md +24 -0
  80. data/docs/WorkflowConditionTest.md +22 -0
  81. data/docs/WorkflowCounter.md +20 -0
  82. data/docs/WorkflowDetail.md +60 -0
  83. data/docs/WorkflowDetailAllOfLastEditedBy.md +20 -0
  84. data/docs/WorkflowEdge.md +24 -0
  85. data/docs/WorkflowFieldReference.md +22 -0
  86. data/docs/WorkflowGraph.md +22 -0
  87. data/docs/WorkflowIssue.md +28 -0
  88. data/docs/WorkflowList.md +24 -0
  89. data/docs/WorkflowNode.md +30 -0
  90. data/docs/WorkflowNodePosition.md +20 -0
  91. data/docs/WorkflowPresetChoice.md +26 -0
  92. data/docs/WorkflowPresetChoices.md +18 -0
  93. data/docs/WorkflowPresetRemoval.md +18 -0
  94. data/docs/WorkflowPresetWidget.md +20 -0
  95. data/docs/WorkflowPublishResult.md +22 -0
  96. data/docs/WorkflowRemoved.md +18 -0
  97. data/docs/WorkflowSchedule.md +24 -0
  98. data/docs/WorkflowStats.md +32 -0
  99. data/docs/WorkflowStatus.md +15 -0
  100. data/docs/WorkflowTrigger.md +28 -0
  101. data/docs/WorkflowTriggerValuesInner.md +20 -0
  102. data/docs/WorkflowVersion.md +28 -0
  103. data/docs/WorkflowVersionDetail.md +32 -0
  104. data/docs/WorkflowVersionList.md +18 -0
  105. data/docs/WorkflowVersionPublishedBy.md +20 -0
  106. data/docs/WorkflowsApi.md +1743 -0
  107. data/docs/WorkspacesApi.md +1527 -0
  108. data/lib/api-sdk-rb/api/brand_kit_api.rb +581 -0
  109. data/lib/api-sdk-rb/api/compositions_api.rb +237 -138
  110. data/lib/api-sdk-rb/api/managed_users_api.rb +2 -2
  111. data/lib/api-sdk-rb/api/partner_api.rb +3907 -809
  112. data/lib/api-sdk-rb/api/partners_api.rb +320 -4
  113. data/lib/api-sdk-rb/api/public_embed_api.rb +283 -6
  114. data/lib/api-sdk-rb/api/users_api.rb +96 -2
  115. data/lib/api-sdk-rb/api/workflows_api.rb +1997 -0
  116. data/lib/api-sdk-rb/api/workspaces_api.rb +1775 -0
  117. data/lib/api-sdk-rb/configuration.rb +50 -2
  118. data/lib/api-sdk-rb/models/adapter_connection.rb +48 -5
  119. data/lib/api-sdk-rb/models/brand_color.rb +329 -0
  120. data/lib/api-sdk-rb/models/brand_font.rb +357 -0
  121. data/lib/api-sdk-rb/models/brand_kit_asset_view.rb +409 -0
  122. data/lib/api-sdk-rb/models/brand_kit_figma_source.rb +277 -0
  123. data/lib/api-sdk-rb/models/brand_kit_tokens.rb +304 -0
  124. data/lib/api-sdk-rb/models/brand_kit_tokens_fonts.rb +241 -0
  125. data/lib/api-sdk-rb/models/brand_kit_view.rb +344 -0
  126. data/lib/api-sdk-rb/models/brand_kit_view_owner.rb +267 -0
  127. data/lib/api-sdk-rb/models/brand_kit_view_response.rb +247 -0
  128. data/lib/api-sdk-rb/models/brand_spacing.rb +557 -0
  129. data/lib/api-sdk-rb/models/composition.rb +26 -5
  130. data/lib/api-sdk-rb/models/composition_last_edited_by.rb +242 -0
  131. data/lib/api-sdk-rb/models/confirm_adapter_connection_request.rb +241 -0
  132. data/lib/api-sdk-rb/models/create_widget201_response_data.rb +9 -20
  133. data/lib/api-sdk-rb/models/create_workspace_workflow_from_preset201_response.rb +246 -0
  134. data/lib/api-sdk-rb/models/create_workspace_workflow_from_preset_request.rb +278 -0
  135. data/lib/api-sdk-rb/models/create_workspace_workflow_request.rb +271 -0
  136. data/lib/api-sdk-rb/models/delete_workspace_workflow200_response.rb +246 -0
  137. data/lib/api-sdk-rb/models/get_public_composition_embed200_response.rb +29 -2
  138. data/lib/api-sdk-rb/models/get_public_composition_embed200_response_adapters.rb +225 -0
  139. data/lib/api-sdk-rb/models/get_public_composition_embed200_response_adapters_captcha.rb +216 -0
  140. data/lib/api-sdk-rb/models/get_public_composition_embed200_response_entries.rb +224 -0
  141. data/lib/api-sdk-rb/models/get_public_composition_embed200_response_media.rb +216 -0
  142. data/lib/api-sdk-rb/models/get_public_workflow200_response.rb +246 -0
  143. data/lib/api-sdk-rb/models/get_workspace_workflow_stats200_response.rb +246 -0
  144. data/lib/api-sdk-rb/models/get_workspace_workflow_version200_response.rb +246 -0
  145. data/lib/api-sdk-rb/models/list_partner_workflow_presets200_response.rb +246 -0
  146. data/lib/api-sdk-rb/models/list_workspace_workflow_composition_options200_response.rb +246 -0
  147. data/lib/api-sdk-rb/models/list_workspace_workflow_presets200_response.rb +246 -0
  148. data/lib/api-sdk-rb/models/list_workspace_workflow_versions200_response.rb +246 -0
  149. data/lib/api-sdk-rb/models/list_workspace_workflows200_response.rb +246 -0
  150. data/lib/api-sdk-rb/models/new_composition.rb +1 -1
  151. data/lib/api-sdk-rb/models/new_editor_session.rb +1 -1
  152. data/lib/api-sdk-rb/models/offer_workflow_preset_request.rb +322 -0
  153. data/lib/api-sdk-rb/models/offered_workflow_preset.rb +423 -0
  154. data/lib/api-sdk-rb/models/offered_workflow_preset_list.rb +223 -0
  155. data/lib/api-sdk-rb/models/offered_workflow_preset_widget.rb +251 -0
  156. data/lib/api-sdk-rb/models/partner_notification.rb +1 -1
  157. data/lib/api-sdk-rb/models/partner_notification_event_type.rb +5 -1
  158. data/lib/api-sdk-rb/models/patch_brand_kit_asset_request.rb +289 -0
  159. data/lib/api-sdk-rb/models/patch_brand_kit_request.rb +332 -0
  160. data/lib/api-sdk-rb/models/patch_brand_kit_request_fonts.rb +242 -0
  161. data/lib/api-sdk-rb/models/patch_brand_kit_request_spacing.rb +502 -0
  162. data/lib/api-sdk-rb/models/post_brand_kit_icon_request.rb +237 -0
  163. data/lib/api-sdk-rb/models/public_workflow.rb +351 -0
  164. data/lib/api-sdk-rb/models/public_workflow_events_accepted.rb +242 -0
  165. data/lib/api-sdk-rb/models/public_workflow_events_request.rb +301 -0
  166. data/lib/api-sdk-rb/models/public_workflow_events_request_events_inner.rb +332 -0
  167. data/lib/api-sdk-rb/models/public_workflow_events_request_heights_inner.rb +267 -0
  168. data/lib/api-sdk-rb/models/public_workflow_translation.rb +242 -0
  169. data/lib/api-sdk-rb/models/publish_workspace_workflow200_response.rb +246 -0
  170. data/lib/api-sdk-rb/models/publish_workspace_workflow_request.rb +240 -0
  171. data/lib/api-sdk-rb/models/put_brand_kit_request.rb +239 -0
  172. data/lib/api-sdk-rb/models/remove_partner_workflow_preset200_response.rb +246 -0
  173. data/lib/api-sdk-rb/models/report_public_workflow_events200_response.rb +246 -0
  174. data/lib/api-sdk-rb/models/save_workspace_workflow200_response.rb +246 -0
  175. data/lib/api-sdk-rb/models/save_workspace_workflow_request.rb +296 -0
  176. data/lib/api-sdk-rb/models/set_adapter_connection_request.rb +1 -1
  177. data/lib/api-sdk-rb/models/set_partner_workflow_preset200_response.rb +246 -0
  178. data/lib/api-sdk-rb/models/update_composition.rb +1 -1
  179. data/lib/api-sdk-rb/models/widget.rb +9 -20
  180. data/lib/api-sdk-rb/models/workflow.rb +509 -0
  181. data/lib/api-sdk-rb/models/workflow_composition_action.rb +266 -0
  182. data/lib/api-sdk-rb/models/workflow_composition_field.rb +303 -0
  183. data/lib/api-sdk-rb/models/workflow_composition_option.rb +316 -0
  184. data/lib/api-sdk-rb/models/workflow_composition_option_actions.rb +284 -0
  185. data/lib/api-sdk-rb/models/workflow_composition_option_inputs.rb +304 -0
  186. data/lib/api-sdk-rb/models/workflow_composition_options.rb +271 -0
  187. data/lib/api-sdk-rb/models/workflow_condition_case.rb +322 -0
  188. data/lib/api-sdk-rb/models/workflow_condition_test.rb +284 -0
  189. data/lib/api-sdk-rb/models/workflow_counter.rb +238 -0
  190. data/lib/api-sdk-rb/models/workflow_detail.rb +580 -0
  191. data/lib/api-sdk-rb/models/workflow_detail_all_of_last_edited_by.rb +242 -0
  192. data/lib/api-sdk-rb/models/workflow_edge.rb +292 -0
  193. data/lib/api-sdk-rb/models/workflow_field_reference.rb +300 -0
  194. data/lib/api-sdk-rb/models/workflow_graph.rb +330 -0
  195. data/lib/api-sdk-rb/models/workflow_issue.rb +309 -0
  196. data/lib/api-sdk-rb/models/workflow_list.rb +271 -0
  197. data/lib/api-sdk-rb/models/workflow_node.rb +343 -0
  198. data/lib/api-sdk-rb/models/workflow_node_position.rb +238 -0
  199. data/lib/api-sdk-rb/models/workflow_preset_choice.rb +288 -0
  200. data/lib/api-sdk-rb/models/workflow_preset_choices.rb +224 -0
  201. data/lib/api-sdk-rb/models/workflow_preset_removal.rb +222 -0
  202. data/lib/api-sdk-rb/models/workflow_preset_widget.rb +234 -0
  203. data/lib/api-sdk-rb/models/workflow_publish_result.rb +256 -0
  204. data/lib/api-sdk-rb/models/workflow_removed.rb +221 -0
  205. data/lib/api-sdk-rb/models/workflow_schedule.rb +298 -0
  206. data/lib/api-sdk-rb/models/workflow_stats.rb +335 -0
  207. data/lib/api-sdk-rb/models/workflow_status.rb +42 -0
  208. data/lib/api-sdk-rb/models/workflow_trigger.rb +303 -0
  209. data/lib/api-sdk-rb/models/workflow_trigger_values_inner.rb +271 -0
  210. data/lib/api-sdk-rb/models/workflow_version.rb +316 -0
  211. data/lib/api-sdk-rb/models/workflow_version_detail.rb +354 -0
  212. data/lib/api-sdk-rb/models/workflow_version_list.rb +224 -0
  213. data/lib/api-sdk-rb/models/workflow_version_published_by.rb +225 -0
  214. data/lib/api-sdk-rb/version.rb +1 -1
  215. data/lib/api-sdk-rb.rb +88 -0
  216. data/spec/api/brand_kit_api_spec.rb +136 -0
  217. data/spec/api/compositions_api_spec.rb +86 -69
  218. data/spec/api/managed_users_api_spec.rb +1 -1
  219. data/spec/api/partner_api_spec.rb +624 -82
  220. data/spec/api/partners_api_spec.rb +56 -2
  221. data/spec/api/public_embed_api_spec.rb +54 -3
  222. data/spec/api/users_api_spec.rb +16 -1
  223. data/spec/api/workflows_api_spec.rb +378 -0
  224. data/spec/api/workspaces_api_spec.rb +339 -0
  225. data/spec/models/adapter_connection_spec.rb +18 -0
  226. data/spec/models/brand_color_spec.rb +52 -0
  227. data/spec/models/brand_font_spec.rb +62 -0
  228. data/spec/models/brand_kit_asset_view_spec.rb +120 -0
  229. data/spec/models/brand_kit_figma_source_spec.rb +60 -0
  230. data/spec/models/brand_kit_tokens_fonts_spec.rb +54 -0
  231. data/spec/models/brand_kit_tokens_spec.rb +54 -0
  232. data/spec/models/brand_kit_view_owner_spec.rb +46 -0
  233. data/spec/models/brand_kit_view_response_spec.rb +48 -0
  234. data/spec/models/brand_kit_view_spec.rb +90 -0
  235. data/spec/models/brand_spacing_spec.rb +78 -0
  236. data/spec/models/composition_last_edited_by_spec.rb +42 -0
  237. data/spec/models/composition_spec.rb +12 -0
  238. data/spec/models/confirm_adapter_connection_request_spec.rb +36 -0
  239. data/spec/models/create_widget201_response_data_spec.rb +1 -7
  240. data/spec/models/create_workspace_workflow_from_preset201_response_spec.rb +48 -0
  241. data/spec/models/create_workspace_workflow_from_preset_request_spec.rb +42 -0
  242. data/spec/models/create_workspace_workflow_request_spec.rb +48 -0
  243. data/spec/models/delete_workspace_workflow200_response_spec.rb +48 -0
  244. data/spec/models/editor_session_spec.rb +1 -1
  245. data/spec/models/get_public_composition_embed200_response_adapters_captcha_spec.rb +36 -0
  246. data/spec/models/get_public_composition_embed200_response_adapters_spec.rb +42 -0
  247. data/spec/models/get_public_composition_embed200_response_entries_spec.rb +42 -0
  248. data/spec/models/get_public_composition_embed200_response_media_spec.rb +36 -0
  249. data/spec/models/get_public_composition_embed200_response_spec.rb +18 -0
  250. data/spec/models/get_public_workflow200_response_spec.rb +48 -0
  251. data/spec/models/get_workspace_workflow_stats200_response_spec.rb +48 -0
  252. data/spec/models/get_workspace_workflow_version200_response_spec.rb +48 -0
  253. data/spec/models/list_partner_workflow_presets200_response_spec.rb +48 -0
  254. data/spec/models/list_workspace_workflow_composition_options200_response_spec.rb +48 -0
  255. data/spec/models/list_workspace_workflow_presets200_response_spec.rb +48 -0
  256. data/spec/models/list_workspace_workflow_versions200_response_spec.rb +48 -0
  257. data/spec/models/list_workspace_workflows200_response_spec.rb +48 -0
  258. data/spec/models/new_editor_session_spec.rb +1 -1
  259. data/spec/models/offer_workflow_preset_request_spec.rb +54 -0
  260. data/spec/models/offered_workflow_preset_list_spec.rb +36 -0
  261. data/spec/models/offered_workflow_preset_spec.rb +106 -0
  262. data/spec/models/offered_workflow_preset_widget_spec.rb +48 -0
  263. data/spec/models/patch_brand_kit_asset_request_spec.rb +62 -0
  264. data/spec/models/patch_brand_kit_request_fonts_spec.rb +54 -0
  265. data/spec/models/patch_brand_kit_request_spacing_spec.rb +78 -0
  266. data/spec/models/patch_brand_kit_request_spec.rb +66 -0
  267. data/spec/models/post_brand_kit_icon_request_spec.rb +42 -0
  268. data/spec/models/public_workflow_events_accepted_spec.rb +48 -0
  269. data/spec/models/public_workflow_events_request_events_inner_spec.rb +52 -0
  270. data/spec/models/public_workflow_events_request_heights_inner_spec.rb +42 -0
  271. data/spec/models/public_workflow_events_request_spec.rb +54 -0
  272. data/spec/models/public_workflow_spec.rb +94 -0
  273. data/spec/models/public_workflow_translation_spec.rb +42 -0
  274. data/spec/models/publish_workspace_workflow200_response_spec.rb +48 -0
  275. data/spec/models/publish_workspace_workflow_request_spec.rb +36 -0
  276. data/spec/models/put_brand_kit_request_spec.rb +48 -0
  277. data/spec/models/remove_partner_workflow_preset200_response_spec.rb +48 -0
  278. data/spec/models/report_public_workflow_events200_response_spec.rb +48 -0
  279. data/spec/models/save_workspace_workflow200_response_spec.rb +48 -0
  280. data/spec/models/save_workspace_workflow_request_spec.rb +54 -0
  281. data/spec/models/set_partner_workflow_preset200_response_spec.rb +48 -0
  282. data/spec/models/widget_spec.rb +1 -7
  283. data/spec/models/workflow_composition_action_spec.rb +54 -0
  284. data/spec/models/workflow_composition_field_spec.rb +58 -0
  285. data/spec/models/workflow_composition_option_actions_spec.rb +52 -0
  286. data/spec/models/workflow_composition_option_inputs_spec.rb +58 -0
  287. data/spec/models/workflow_composition_option_spec.rb +72 -0
  288. data/spec/models/workflow_composition_options_spec.rb +54 -0
  289. data/spec/models/workflow_condition_case_spec.rb +58 -0
  290. data/spec/models/workflow_condition_test_spec.rb +52 -0
  291. data/spec/models/workflow_counter_spec.rb +42 -0
  292. data/spec/models/workflow_detail_all_of_last_edited_by_spec.rb +42 -0
  293. data/spec/models/workflow_detail_spec.rb +162 -0
  294. data/spec/models/workflow_edge_spec.rb +54 -0
  295. data/spec/models/workflow_field_reference_spec.rb +56 -0
  296. data/spec/models/workflow_graph_spec.rb +52 -0
  297. data/spec/models/workflow_issue_spec.rb +70 -0
  298. data/spec/models/workflow_list_spec.rb +54 -0
  299. data/spec/models/workflow_node_position_spec.rb +42 -0
  300. data/spec/models/workflow_node_spec.rb +76 -0
  301. data/spec/models/workflow_preset_choice_spec.rb +60 -0
  302. data/spec/models/workflow_preset_choices_spec.rb +36 -0
  303. data/spec/models/workflow_preset_removal_spec.rb +36 -0
  304. data/spec/models/workflow_preset_widget_spec.rb +42 -0
  305. data/spec/models/workflow_publish_result_spec.rb +48 -0
  306. data/spec/models/workflow_removed_spec.rb +36 -0
  307. data/spec/models/workflow_schedule_spec.rb +62 -0
  308. data/spec/models/workflow_spec.rb +132 -0
  309. data/spec/models/workflow_stats_spec.rb +78 -0
  310. data/spec/models/workflow_status_spec.rb +30 -0
  311. data/spec/models/workflow_trigger_spec.rb +70 -0
  312. data/spec/models/workflow_trigger_values_inner_spec.rb +46 -0
  313. data/spec/models/workflow_version_detail_spec.rb +78 -0
  314. data/spec/models/workflow_version_list_spec.rb +36 -0
  315. data/spec/models/workflow_version_published_by_spec.rb +42 -0
  316. data/spec/models/workflow_version_spec.rb +66 -0
  317. metadata +364 -12
@@ -0,0 +1,1743 @@
1
+ # ApiSdkRb::WorkflowsApi
2
+
3
+ All URIs are relative to *https://api.widgetic.com/v1*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**archive_workspace_workflow_0**](WorkflowsApi.md#archive_workspace_workflow_0) | **POST** /workspaces/{workspaceId}/workflows/{workflowId}/archive | Archive a Workflow |
8
+ | [**create_workspace_workflow_0**](WorkflowsApi.md#create_workspace_workflow_0) | **POST** /workspaces/{workspaceId}/workflows | Create a Workflow |
9
+ | [**create_workspace_workflow_from_preset_0**](WorkflowsApi.md#create_workspace_workflow_from_preset_0) | **POST** /workspaces/{workspaceId}/workflows/from-preset | Start a Workflow from a starting point |
10
+ | [**delete_workspace_workflow_0**](WorkflowsApi.md#delete_workspace_workflow_0) | **DELETE** /workspaces/{workspaceId}/workflows/{workflowId} | Delete a Workflow |
11
+ | [**discard_workspace_workflow_changes_0**](WorkflowsApi.md#discard_workspace_workflow_changes_0) | **POST** /workspaces/{workspaceId}/workflows/{workflowId}/discard | Discard the Unpublished Changes of a Workflow |
12
+ | [**duplicate_workspace_workflow_0**](WorkflowsApi.md#duplicate_workspace_workflow_0) | **POST** /workspaces/{workspaceId}/workflows/{workflowId}/duplicate | Duplicate a Workflow |
13
+ | [**get_workspace_workflow_0**](WorkflowsApi.md#get_workspace_workflow_0) | **GET** /workspaces/{workspaceId}/workflows/{workflowId} | Get a Workflow |
14
+ | [**get_workspace_workflow_stats_0**](WorkflowsApi.md#get_workspace_workflow_stats_0) | **GET** /workspaces/{workspaceId}/workflows/{workflowId}/stats | Get what Visitors Did in a Workflow |
15
+ | [**get_workspace_workflow_version_0**](WorkflowsApi.md#get_workspace_workflow_version_0) | **GET** /workspaces/{workspaceId}/workflows/{workflowId}/versions/{versionId} | Get a Published Version of a Workflow |
16
+ | [**list_partner_workflow_presets_1**](WorkflowsApi.md#list_partner_workflow_presets_1) | **GET** /partners/{partnerId}/workflow-presets | List the workflows a partner offers as places to start |
17
+ | [**list_workspace_workflow_composition_options_0**](WorkflowsApi.md#list_workspace_workflow_composition_options_0) | **GET** /workspaces/{workspaceId}/workflows/composition-options | List the compositions a workflow can show, and what each can do |
18
+ | [**list_workspace_workflow_presets_0**](WorkflowsApi.md#list_workspace_workflow_presets_0) | **GET** /workspaces/{workspaceId}/workflows/presets | List the starting points for a new Workflow |
19
+ | [**list_workspace_workflow_versions_0**](WorkflowsApi.md#list_workspace_workflow_versions_0) | **GET** /workspaces/{workspaceId}/workflows/{workflowId}/versions | List the Published Versions of a Workflow |
20
+ | [**list_workspace_workflows_0**](WorkflowsApi.md#list_workspace_workflows_0) | **GET** /workspaces/{workspaceId}/workflows | List the Workflows of a Workspace |
21
+ | [**pause_workspace_workflow_0**](WorkflowsApi.md#pause_workspace_workflow_0) | **POST** /workspaces/{workspaceId}/workflows/{workflowId}/pause | Pause a Workflow |
22
+ | [**publish_workspace_workflow_0**](WorkflowsApi.md#publish_workspace_workflow_0) | **POST** /workspaces/{workspaceId}/workflows/{workflowId}/publish | Publish the Draft of a Workflow |
23
+ | [**remove_partner_workflow_preset_1**](WorkflowsApi.md#remove_partner_workflow_preset_1) | **DELETE** /partners/{partnerId}/workflow-presets/{key} | Stop offering a workflow as a place to start |
24
+ | [**restore_workspace_workflow_version_0**](WorkflowsApi.md#restore_workspace_workflow_version_0) | **POST** /workspaces/{workspaceId}/workflows/{workflowId}/versions/{versionId}/restore | Restore a Version of a Workflow into the Draft |
25
+ | [**resume_workspace_workflow_0**](WorkflowsApi.md#resume_workspace_workflow_0) | **POST** /workspaces/{workspaceId}/workflows/{workflowId}/resume | Resume a Paused Workflow |
26
+ | [**save_workspace_workflow_0**](WorkflowsApi.md#save_workspace_workflow_0) | **PUT** /workspaces/{workspaceId}/workflows/{workflowId} | Save the Draft of a Workflow |
27
+ | [**set_partner_workflow_preset_1**](WorkflowsApi.md#set_partner_workflow_preset_1) | **PUT** /partners/{partnerId}/workflow-presets/{key} | Offer a workflow as a place to start, or replace what a key offers |
28
+ | [**unarchive_workspace_workflow_0**](WorkflowsApi.md#unarchive_workspace_workflow_0) | **POST** /workspaces/{workspaceId}/workflows/{workflowId}/unarchive | Unarchive a Workflow |
29
+
30
+
31
+ ## archive_workspace_workflow_0
32
+
33
+ > <SaveWorkspaceWorkflow200Response> archive_workspace_workflow_0(workspace_id, workflow_id, opts)
34
+
35
+ Archive a Workflow
36
+
37
+ Takes a workflow out of the default list and stops it serving: its embeds show only their first composition, as when paused. It is kept, with its versions and counts, until it is deleted. For personal workspace, use 'personal' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can archive.
38
+
39
+ ### Examples
40
+
41
+ ```ruby
42
+ require 'time'
43
+ require 'api-sdk-rb'
44
+ # setup authorization
45
+ ApiSdkRb.configure do |config|
46
+ # Configure Bearer authorization (JWT): apiKeyAuth
47
+ config.access_token = 'YOUR_BEARER_TOKEN'
48
+ end
49
+
50
+ api_instance = ApiSdkRb::WorkflowsApi.new
51
+ workspace_id = 'personal' # String | The workspace: 'personal' for your own workspace, or the UUID of an organization. A call made for one of your managed users (`X-Managed-User-Id`) always uses 'personal': a managed user has no other workspace, and a call that names an organization is refused with 403.
52
+ workflow_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | The workflow's id
53
+ opts = {
54
+ x_managed_user_id: '3f2b8c1e-7a4d-4e0b-9c55-2d1a6b7e8f90', # String | The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
55
+ x_managed_user_external_id: 'customer-1042' # String | Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
56
+ }
57
+
58
+ begin
59
+ # Archive a Workflow
60
+ result = api_instance.archive_workspace_workflow_0(workspace_id, workflow_id, opts)
61
+ p result
62
+ rescue ApiSdkRb::ApiError => e
63
+ puts "Error when calling WorkflowsApi->archive_workspace_workflow_0: #{e}"
64
+ end
65
+ ```
66
+
67
+ #### Using the archive_workspace_workflow_0_with_http_info variant
68
+
69
+ This returns an Array which contains the response data, status code and headers.
70
+
71
+ > <Array(<SaveWorkspaceWorkflow200Response>, Integer, Hash)> archive_workspace_workflow_0_with_http_info(workspace_id, workflow_id, opts)
72
+
73
+ ```ruby
74
+ begin
75
+ # Archive a Workflow
76
+ data, status_code, headers = api_instance.archive_workspace_workflow_0_with_http_info(workspace_id, workflow_id, opts)
77
+ p status_code # => 2xx
78
+ p headers # => { ... }
79
+ p data # => <SaveWorkspaceWorkflow200Response>
80
+ rescue ApiSdkRb::ApiError => e
81
+ puts "Error when calling WorkflowsApi->archive_workspace_workflow_0_with_http_info: #{e}"
82
+ end
83
+ ```
84
+
85
+ ### Parameters
86
+
87
+ | Name | Type | Description | Notes |
88
+ | ---- | ---- | ----------- | ----- |
89
+ | **workspace_id** | **String** | The workspace: &#39;personal&#39; for your own workspace, or the UUID of an organization. A call made for one of your managed users (&#x60;X-Managed-User-Id&#x60;) always uses &#39;personal&#39;: a managed user has no other workspace, and a call that names an organization is refused with 403. | |
90
+ | **workflow_id** | **String** | The workflow&#39;s id | |
91
+ | **x_managed_user_id** | **String** | The id Widgetic gave the managed user (&#x60;POST /managed-users&#x60;). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user. | [optional] |
92
+ | **x_managed_user_external_id** | **String** | Your own id for the managed user (its &#x60;externalId&#x60;), when you do not keep Widgetic&#39;s. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user. | [optional] |
93
+
94
+ ### Return type
95
+
96
+ [**SaveWorkspaceWorkflow200Response**](SaveWorkspaceWorkflow200Response.md)
97
+
98
+ ### Authorization
99
+
100
+ [apiKeyAuth](../README.md#apiKeyAuth)
101
+
102
+ ### HTTP request headers
103
+
104
+ - **Content-Type**: Not defined
105
+ - **Accept**: application/json
106
+
107
+
108
+ ## create_workspace_workflow_0
109
+
110
+ > <CreateWorkspaceWorkflowFromPreset201Response> create_workspace_workflow_0(workspace_id, idempotency_key, create_workspace_workflow_request, opts)
111
+
112
+ Create a Workflow
113
+
114
+ Makes a draft workflow. Give it a composition and the workflow is born with one block, which starts it; without one it starts empty. A workspace holds up to 500 workflows. For personal workspace, use 'personal' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can create one.
115
+
116
+ ### Examples
117
+
118
+ ```ruby
119
+ require 'time'
120
+ require 'api-sdk-rb'
121
+ # setup authorization
122
+ ApiSdkRb.configure do |config|
123
+ # Configure Bearer authorization (JWT): apiKeyAuth
124
+ config.access_token = 'YOUR_BEARER_TOKEN'
125
+ end
126
+
127
+ api_instance = ApiSdkRb::WorkflowsApi.new
128
+ workspace_id = 'personal' # String | The workspace: 'personal' for your own workspace, or the UUID of an organization. A call made for one of your managed users (`X-Managed-User-Id`) always uses 'personal': a managed user has no other workspace, and a call that names an organization is refused with 403.
129
+ idempotency_key = '9b2d6f0a-3c41-4e5a-8d77-1f2e3a4b5c6d' # String | Required: a call without it is refused with `400`. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, `-` and `_`. Send the same key again when you retry (after a timeout, a dropped connection or a `5xx`) and the call is carried out once: the retry gets the first answer back, marked `X-Idempotency-Cached: true`. The same key with a different body is refused with `422`, and a retry that arrives while the first call is still running with `409` (see `Retry-After`).
130
+ create_workspace_workflow_request = ApiSdkRb::CreateWorkspaceWorkflowRequest.new({name: 'Welcome journey'}) # CreateWorkspaceWorkflowRequest |
131
+ opts = {
132
+ x_managed_user_id: '3f2b8c1e-7a4d-4e0b-9c55-2d1a6b7e8f90', # String | The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
133
+ x_managed_user_external_id: 'customer-1042' # String | Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
134
+ }
135
+
136
+ begin
137
+ # Create a Workflow
138
+ result = api_instance.create_workspace_workflow_0(workspace_id, idempotency_key, create_workspace_workflow_request, opts)
139
+ p result
140
+ rescue ApiSdkRb::ApiError => e
141
+ puts "Error when calling WorkflowsApi->create_workspace_workflow_0: #{e}"
142
+ end
143
+ ```
144
+
145
+ #### Using the create_workspace_workflow_0_with_http_info variant
146
+
147
+ This returns an Array which contains the response data, status code and headers.
148
+
149
+ > <Array(<CreateWorkspaceWorkflowFromPreset201Response>, Integer, Hash)> create_workspace_workflow_0_with_http_info(workspace_id, idempotency_key, create_workspace_workflow_request, opts)
150
+
151
+ ```ruby
152
+ begin
153
+ # Create a Workflow
154
+ data, status_code, headers = api_instance.create_workspace_workflow_0_with_http_info(workspace_id, idempotency_key, create_workspace_workflow_request, opts)
155
+ p status_code # => 2xx
156
+ p headers # => { ... }
157
+ p data # => <CreateWorkspaceWorkflowFromPreset201Response>
158
+ rescue ApiSdkRb::ApiError => e
159
+ puts "Error when calling WorkflowsApi->create_workspace_workflow_0_with_http_info: #{e}"
160
+ end
161
+ ```
162
+
163
+ ### Parameters
164
+
165
+ | Name | Type | Description | Notes |
166
+ | ---- | ---- | ----------- | ----- |
167
+ | **workspace_id** | **String** | The workspace: &#39;personal&#39; for your own workspace, or the UUID of an organization. A call made for one of your managed users (&#x60;X-Managed-User-Id&#x60;) always uses &#39;personal&#39;: a managed user has no other workspace, and a call that names an organization is refused with 403. | |
168
+ | **idempotency_key** | **String** | Required: a call without it is refused with &#x60;400&#x60;. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, &#x60;-&#x60; and &#x60;_&#x60;. Send the same key again when you retry (after a timeout, a dropped connection or a &#x60;5xx&#x60;) and the call is carried out once: the retry gets the first answer back, marked &#x60;X-Idempotency-Cached: true&#x60;. The same key with a different body is refused with &#x60;422&#x60;, and a retry that arrives while the first call is still running with &#x60;409&#x60; (see &#x60;Retry-After&#x60;). | |
169
+ | **create_workspace_workflow_request** | [**CreateWorkspaceWorkflowRequest**](CreateWorkspaceWorkflowRequest.md) | | |
170
+ | **x_managed_user_id** | **String** | The id Widgetic gave the managed user (&#x60;POST /managed-users&#x60;). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user. | [optional] |
171
+ | **x_managed_user_external_id** | **String** | Your own id for the managed user (its &#x60;externalId&#x60;), when you do not keep Widgetic&#39;s. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user. | [optional] |
172
+
173
+ ### Return type
174
+
175
+ [**CreateWorkspaceWorkflowFromPreset201Response**](CreateWorkspaceWorkflowFromPreset201Response.md)
176
+
177
+ ### Authorization
178
+
179
+ [apiKeyAuth](../README.md#apiKeyAuth)
180
+
181
+ ### HTTP request headers
182
+
183
+ - **Content-Type**: application/json
184
+ - **Accept**: application/json
185
+
186
+
187
+ ## create_workspace_workflow_from_preset_0
188
+
189
+ > <CreateWorkspaceWorkflowFromPreset201Response> create_workspace_workflow_from_preset_0(workspace_id, idempotency_key, create_workspace_workflow_from_preset_request, opts)
190
+
191
+ Start a Workflow from a starting point
192
+
193
+ Makes your own copy of a starting point (`listWorkspaceWorkflowPresets`): a copy of every widget it chains (an ordinary private widget that serves the starting point's published code), a composition of your own on each copy (a draft, with the content, design, embed settings and tables of the original), and a draft workflow wired like the starting point's live version. The workflow is named as you ask, or after the starting point. Nothing you do to the copy reaches the starting point, and nothing its offerer changes afterwards reaches your copy. The workflow stays a draft: publish it when it is ready. A start takes a few seconds, because each widget is copied. Send an `Idempotency-Key` so that asking again after a timeout makes one copy. When a start fails (503 with `details.reason` `preset_copy_failed`) the compositions it made are removed again, so asking again is safe; the widget copies it made stay in the workspace as ordinary widgets. The workspace's limit of workflows is checked before anything is copied. A starting point that is not offered to you, or that can no longer be started, is 404. For personal workspace, use 'personal' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can start one.
194
+
195
+ ### Examples
196
+
197
+ ```ruby
198
+ require 'time'
199
+ require 'api-sdk-rb'
200
+ # setup authorization
201
+ ApiSdkRb.configure do |config|
202
+ # Configure Bearer authorization (JWT): apiKeyAuth
203
+ config.access_token = 'YOUR_BEARER_TOKEN'
204
+ end
205
+
206
+ api_instance = ApiSdkRb::WorkflowsApi.new
207
+ workspace_id = 'personal' # String | The workspace: 'personal' for your own workspace, or the UUID of an organization. A call made for one of your managed users (`X-Managed-User-Id`) always uses 'personal': a managed user has no other workspace, and a call that names an organization is refused with 403.
208
+ idempotency_key = '9b2d6f0a-3c41-4e5a-8d77-1f2e3a4b5c6d' # String | Required: a call without it is refused with `400`. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, `-` and `_`. Send the same key again when you retry (after a timeout, a dropped connection or a `5xx`) and the call is carried out once: the retry gets the first answer back, marked `X-Idempotency-Cached: true`. The same key with a different body is refused with `422`, and a retry that arrives while the first call is still running with `409` (see `Retry-After`).
209
+ create_workspace_workflow_from_preset_request = ApiSdkRb::CreateWorkspaceWorkflowFromPresetRequest.new({key: 'welcome-then-offer'}) # CreateWorkspaceWorkflowFromPresetRequest |
210
+ opts = {
211
+ x_managed_user_id: '3f2b8c1e-7a4d-4e0b-9c55-2d1a6b7e8f90', # String | The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
212
+ x_managed_user_external_id: 'customer-1042' # String | Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
213
+ }
214
+
215
+ begin
216
+ # Start a Workflow from a starting point
217
+ result = api_instance.create_workspace_workflow_from_preset_0(workspace_id, idempotency_key, create_workspace_workflow_from_preset_request, opts)
218
+ p result
219
+ rescue ApiSdkRb::ApiError => e
220
+ puts "Error when calling WorkflowsApi->create_workspace_workflow_from_preset_0: #{e}"
221
+ end
222
+ ```
223
+
224
+ #### Using the create_workspace_workflow_from_preset_0_with_http_info variant
225
+
226
+ This returns an Array which contains the response data, status code and headers.
227
+
228
+ > <Array(<CreateWorkspaceWorkflowFromPreset201Response>, Integer, Hash)> create_workspace_workflow_from_preset_0_with_http_info(workspace_id, idempotency_key, create_workspace_workflow_from_preset_request, opts)
229
+
230
+ ```ruby
231
+ begin
232
+ # Start a Workflow from a starting point
233
+ data, status_code, headers = api_instance.create_workspace_workflow_from_preset_0_with_http_info(workspace_id, idempotency_key, create_workspace_workflow_from_preset_request, opts)
234
+ p status_code # => 2xx
235
+ p headers # => { ... }
236
+ p data # => <CreateWorkspaceWorkflowFromPreset201Response>
237
+ rescue ApiSdkRb::ApiError => e
238
+ puts "Error when calling WorkflowsApi->create_workspace_workflow_from_preset_0_with_http_info: #{e}"
239
+ end
240
+ ```
241
+
242
+ ### Parameters
243
+
244
+ | Name | Type | Description | Notes |
245
+ | ---- | ---- | ----------- | ----- |
246
+ | **workspace_id** | **String** | The workspace: &#39;personal&#39; for your own workspace, or the UUID of an organization. A call made for one of your managed users (&#x60;X-Managed-User-Id&#x60;) always uses &#39;personal&#39;: a managed user has no other workspace, and a call that names an organization is refused with 403. | |
247
+ | **idempotency_key** | **String** | Required: a call without it is refused with &#x60;400&#x60;. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, &#x60;-&#x60; and &#x60;_&#x60;. Send the same key again when you retry (after a timeout, a dropped connection or a &#x60;5xx&#x60;) and the call is carried out once: the retry gets the first answer back, marked &#x60;X-Idempotency-Cached: true&#x60;. The same key with a different body is refused with &#x60;422&#x60;, and a retry that arrives while the first call is still running with &#x60;409&#x60; (see &#x60;Retry-After&#x60;). | |
248
+ | **create_workspace_workflow_from_preset_request** | [**CreateWorkspaceWorkflowFromPresetRequest**](CreateWorkspaceWorkflowFromPresetRequest.md) | | |
249
+ | **x_managed_user_id** | **String** | The id Widgetic gave the managed user (&#x60;POST /managed-users&#x60;). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user. | [optional] |
250
+ | **x_managed_user_external_id** | **String** | Your own id for the managed user (its &#x60;externalId&#x60;), when you do not keep Widgetic&#39;s. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user. | [optional] |
251
+
252
+ ### Return type
253
+
254
+ [**CreateWorkspaceWorkflowFromPreset201Response**](CreateWorkspaceWorkflowFromPreset201Response.md)
255
+
256
+ ### Authorization
257
+
258
+ [apiKeyAuth](../README.md#apiKeyAuth)
259
+
260
+ ### HTTP request headers
261
+
262
+ - **Content-Type**: application/json
263
+ - **Accept**: application/json
264
+
265
+
266
+ ## delete_workspace_workflow_0
267
+
268
+ > <DeleteWorkspaceWorkflow200Response> delete_workspace_workflow_0(workspace_id, workflow_id, opts)
269
+
270
+ Delete a Workflow
271
+
272
+ Deletes a workflow, in whatever state it is in (draft, live, paused or archived), with all its versions and counts. It cannot be undone: archive the workflow instead to keep it. The compositions it chained are not touched, and a page whose embed still names the workflow shows the embed's first composition, as for a paused one. Asking for a workflow that is already gone is \"not found\". For personal workspace, use 'personal' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can delete.
273
+
274
+ ### Examples
275
+
276
+ ```ruby
277
+ require 'time'
278
+ require 'api-sdk-rb'
279
+ # setup authorization
280
+ ApiSdkRb.configure do |config|
281
+ # Configure Bearer authorization (JWT): apiKeyAuth
282
+ config.access_token = 'YOUR_BEARER_TOKEN'
283
+ end
284
+
285
+ api_instance = ApiSdkRb::WorkflowsApi.new
286
+ workspace_id = 'personal' # String | The workspace: 'personal' for your own workspace, or the UUID of an organization. A call made for one of your managed users (`X-Managed-User-Id`) always uses 'personal': a managed user has no other workspace, and a call that names an organization is refused with 403.
287
+ workflow_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | The workflow's id
288
+ opts = {
289
+ x_managed_user_id: '3f2b8c1e-7a4d-4e0b-9c55-2d1a6b7e8f90', # String | The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
290
+ x_managed_user_external_id: 'customer-1042' # String | Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
291
+ }
292
+
293
+ begin
294
+ # Delete a Workflow
295
+ result = api_instance.delete_workspace_workflow_0(workspace_id, workflow_id, opts)
296
+ p result
297
+ rescue ApiSdkRb::ApiError => e
298
+ puts "Error when calling WorkflowsApi->delete_workspace_workflow_0: #{e}"
299
+ end
300
+ ```
301
+
302
+ #### Using the delete_workspace_workflow_0_with_http_info variant
303
+
304
+ This returns an Array which contains the response data, status code and headers.
305
+
306
+ > <Array(<DeleteWorkspaceWorkflow200Response>, Integer, Hash)> delete_workspace_workflow_0_with_http_info(workspace_id, workflow_id, opts)
307
+
308
+ ```ruby
309
+ begin
310
+ # Delete a Workflow
311
+ data, status_code, headers = api_instance.delete_workspace_workflow_0_with_http_info(workspace_id, workflow_id, opts)
312
+ p status_code # => 2xx
313
+ p headers # => { ... }
314
+ p data # => <DeleteWorkspaceWorkflow200Response>
315
+ rescue ApiSdkRb::ApiError => e
316
+ puts "Error when calling WorkflowsApi->delete_workspace_workflow_0_with_http_info: #{e}"
317
+ end
318
+ ```
319
+
320
+ ### Parameters
321
+
322
+ | Name | Type | Description | Notes |
323
+ | ---- | ---- | ----------- | ----- |
324
+ | **workspace_id** | **String** | The workspace: &#39;personal&#39; for your own workspace, or the UUID of an organization. A call made for one of your managed users (&#x60;X-Managed-User-Id&#x60;) always uses &#39;personal&#39;: a managed user has no other workspace, and a call that names an organization is refused with 403. | |
325
+ | **workflow_id** | **String** | The workflow&#39;s id | |
326
+ | **x_managed_user_id** | **String** | The id Widgetic gave the managed user (&#x60;POST /managed-users&#x60;). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user. | [optional] |
327
+ | **x_managed_user_external_id** | **String** | Your own id for the managed user (its &#x60;externalId&#x60;), when you do not keep Widgetic&#39;s. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user. | [optional] |
328
+
329
+ ### Return type
330
+
331
+ [**DeleteWorkspaceWorkflow200Response**](DeleteWorkspaceWorkflow200Response.md)
332
+
333
+ ### Authorization
334
+
335
+ [apiKeyAuth](../README.md#apiKeyAuth)
336
+
337
+ ### HTTP request headers
338
+
339
+ - **Content-Type**: Not defined
340
+ - **Accept**: application/json
341
+
342
+
343
+ ## discard_workspace_workflow_changes_0
344
+
345
+ > <CreateWorkspaceWorkflowFromPreset201Response> discard_workspace_workflow_changes_0(workspace_id, workflow_id, publish_workspace_workflow_request, opts)
346
+
347
+ Discard the Unpublished Changes of a Workflow
348
+
349
+ Puts the draft back to the live version (its graph and its time zone). Only for a workflow that has been published; one that never was has no live version to go back to. Names the `revision` the editor read. For personal workspace, use 'personal' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can discard.
350
+
351
+ ### Examples
352
+
353
+ ```ruby
354
+ require 'time'
355
+ require 'api-sdk-rb'
356
+ # setup authorization
357
+ ApiSdkRb.configure do |config|
358
+ # Configure Bearer authorization (JWT): apiKeyAuth
359
+ config.access_token = 'YOUR_BEARER_TOKEN'
360
+ end
361
+
362
+ api_instance = ApiSdkRb::WorkflowsApi.new
363
+ workspace_id = 'personal' # String | The workspace: 'personal' for your own workspace, or the UUID of an organization. A call made for one of your managed users (`X-Managed-User-Id`) always uses 'personal': a managed user has no other workspace, and a call that names an organization is refused with 403.
364
+ workflow_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | The workflow's id
365
+ publish_workspace_workflow_request = ApiSdkRb::PublishWorkspaceWorkflowRequest.new({revision: 37}) # PublishWorkspaceWorkflowRequest |
366
+ opts = {
367
+ x_managed_user_id: '3f2b8c1e-7a4d-4e0b-9c55-2d1a6b7e8f90', # String | The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
368
+ x_managed_user_external_id: 'customer-1042' # String | Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
369
+ }
370
+
371
+ begin
372
+ # Discard the Unpublished Changes of a Workflow
373
+ result = api_instance.discard_workspace_workflow_changes_0(workspace_id, workflow_id, publish_workspace_workflow_request, opts)
374
+ p result
375
+ rescue ApiSdkRb::ApiError => e
376
+ puts "Error when calling WorkflowsApi->discard_workspace_workflow_changes_0: #{e}"
377
+ end
378
+ ```
379
+
380
+ #### Using the discard_workspace_workflow_changes_0_with_http_info variant
381
+
382
+ This returns an Array which contains the response data, status code and headers.
383
+
384
+ > <Array(<CreateWorkspaceWorkflowFromPreset201Response>, Integer, Hash)> discard_workspace_workflow_changes_0_with_http_info(workspace_id, workflow_id, publish_workspace_workflow_request, opts)
385
+
386
+ ```ruby
387
+ begin
388
+ # Discard the Unpublished Changes of a Workflow
389
+ data, status_code, headers = api_instance.discard_workspace_workflow_changes_0_with_http_info(workspace_id, workflow_id, publish_workspace_workflow_request, opts)
390
+ p status_code # => 2xx
391
+ p headers # => { ... }
392
+ p data # => <CreateWorkspaceWorkflowFromPreset201Response>
393
+ rescue ApiSdkRb::ApiError => e
394
+ puts "Error when calling WorkflowsApi->discard_workspace_workflow_changes_0_with_http_info: #{e}"
395
+ end
396
+ ```
397
+
398
+ ### Parameters
399
+
400
+ | Name | Type | Description | Notes |
401
+ | ---- | ---- | ----------- | ----- |
402
+ | **workspace_id** | **String** | The workspace: &#39;personal&#39; for your own workspace, or the UUID of an organization. A call made for one of your managed users (&#x60;X-Managed-User-Id&#x60;) always uses &#39;personal&#39;: a managed user has no other workspace, and a call that names an organization is refused with 403. | |
403
+ | **workflow_id** | **String** | The workflow&#39;s id | |
404
+ | **publish_workspace_workflow_request** | [**PublishWorkspaceWorkflowRequest**](PublishWorkspaceWorkflowRequest.md) | | |
405
+ | **x_managed_user_id** | **String** | The id Widgetic gave the managed user (&#x60;POST /managed-users&#x60;). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user. | [optional] |
406
+ | **x_managed_user_external_id** | **String** | Your own id for the managed user (its &#x60;externalId&#x60;), when you do not keep Widgetic&#39;s. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user. | [optional] |
407
+
408
+ ### Return type
409
+
410
+ [**CreateWorkspaceWorkflowFromPreset201Response**](CreateWorkspaceWorkflowFromPreset201Response.md)
411
+
412
+ ### Authorization
413
+
414
+ [apiKeyAuth](../README.md#apiKeyAuth)
415
+
416
+ ### HTTP request headers
417
+
418
+ - **Content-Type**: application/json
419
+ - **Accept**: application/json
420
+
421
+
422
+ ## duplicate_workspace_workflow_0
423
+
424
+ > <CreateWorkspaceWorkflowFromPreset201Response> duplicate_workspace_workflow_0(workspace_id, workflow_id, idempotency_key, opts)
425
+
426
+ Duplicate a Workflow
427
+
428
+ Makes a draft copy of a workflow (its draft graph, not its versions or counts), named \"<name> (copy)\". For personal workspace, use 'personal' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can duplicate.
429
+
430
+ ### Examples
431
+
432
+ ```ruby
433
+ require 'time'
434
+ require 'api-sdk-rb'
435
+ # setup authorization
436
+ ApiSdkRb.configure do |config|
437
+ # Configure Bearer authorization (JWT): apiKeyAuth
438
+ config.access_token = 'YOUR_BEARER_TOKEN'
439
+ end
440
+
441
+ api_instance = ApiSdkRb::WorkflowsApi.new
442
+ workspace_id = 'personal' # String | The workspace: 'personal' for your own workspace, or the UUID of an organization. A call made for one of your managed users (`X-Managed-User-Id`) always uses 'personal': a managed user has no other workspace, and a call that names an organization is refused with 403.
443
+ workflow_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | The workflow's id
444
+ idempotency_key = '9b2d6f0a-3c41-4e5a-8d77-1f2e3a4b5c6d' # String | Required: a call without it is refused with `400`. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, `-` and `_`. Send the same key again when you retry (after a timeout, a dropped connection or a `5xx`) and the call is carried out once: the retry gets the first answer back, marked `X-Idempotency-Cached: true`. The same key with a different body is refused with `422`, and a retry that arrives while the first call is still running with `409` (see `Retry-After`).
445
+ opts = {
446
+ x_managed_user_id: '3f2b8c1e-7a4d-4e0b-9c55-2d1a6b7e8f90', # String | The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
447
+ x_managed_user_external_id: 'customer-1042' # String | Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
448
+ }
449
+
450
+ begin
451
+ # Duplicate a Workflow
452
+ result = api_instance.duplicate_workspace_workflow_0(workspace_id, workflow_id, idempotency_key, opts)
453
+ p result
454
+ rescue ApiSdkRb::ApiError => e
455
+ puts "Error when calling WorkflowsApi->duplicate_workspace_workflow_0: #{e}"
456
+ end
457
+ ```
458
+
459
+ #### Using the duplicate_workspace_workflow_0_with_http_info variant
460
+
461
+ This returns an Array which contains the response data, status code and headers.
462
+
463
+ > <Array(<CreateWorkspaceWorkflowFromPreset201Response>, Integer, Hash)> duplicate_workspace_workflow_0_with_http_info(workspace_id, workflow_id, idempotency_key, opts)
464
+
465
+ ```ruby
466
+ begin
467
+ # Duplicate a Workflow
468
+ data, status_code, headers = api_instance.duplicate_workspace_workflow_0_with_http_info(workspace_id, workflow_id, idempotency_key, opts)
469
+ p status_code # => 2xx
470
+ p headers # => { ... }
471
+ p data # => <CreateWorkspaceWorkflowFromPreset201Response>
472
+ rescue ApiSdkRb::ApiError => e
473
+ puts "Error when calling WorkflowsApi->duplicate_workspace_workflow_0_with_http_info: #{e}"
474
+ end
475
+ ```
476
+
477
+ ### Parameters
478
+
479
+ | Name | Type | Description | Notes |
480
+ | ---- | ---- | ----------- | ----- |
481
+ | **workspace_id** | **String** | The workspace: &#39;personal&#39; for your own workspace, or the UUID of an organization. A call made for one of your managed users (&#x60;X-Managed-User-Id&#x60;) always uses &#39;personal&#39;: a managed user has no other workspace, and a call that names an organization is refused with 403. | |
482
+ | **workflow_id** | **String** | The workflow&#39;s id | |
483
+ | **idempotency_key** | **String** | Required: a call without it is refused with &#x60;400&#x60;. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, &#x60;-&#x60; and &#x60;_&#x60;. Send the same key again when you retry (after a timeout, a dropped connection or a &#x60;5xx&#x60;) and the call is carried out once: the retry gets the first answer back, marked &#x60;X-Idempotency-Cached: true&#x60;. The same key with a different body is refused with &#x60;422&#x60;, and a retry that arrives while the first call is still running with &#x60;409&#x60; (see &#x60;Retry-After&#x60;). | |
484
+ | **x_managed_user_id** | **String** | The id Widgetic gave the managed user (&#x60;POST /managed-users&#x60;). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user. | [optional] |
485
+ | **x_managed_user_external_id** | **String** | Your own id for the managed user (its &#x60;externalId&#x60;), when you do not keep Widgetic&#39;s. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user. | [optional] |
486
+
487
+ ### Return type
488
+
489
+ [**CreateWorkspaceWorkflowFromPreset201Response**](CreateWorkspaceWorkflowFromPreset201Response.md)
490
+
491
+ ### Authorization
492
+
493
+ [apiKeyAuth](../README.md#apiKeyAuth)
494
+
495
+ ### HTTP request headers
496
+
497
+ - **Content-Type**: Not defined
498
+ - **Accept**: application/json
499
+
500
+
501
+ ## get_workspace_workflow_0
502
+
503
+ > <CreateWorkspaceWorkflowFromPreset201Response> get_workspace_workflow_0(workspace_id, workflow_id, opts)
504
+
505
+ Get a Workflow
506
+
507
+ Reads a workflow with its draft graph and the version that is live. For personal workspace, use 'personal' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can read it.
508
+
509
+ ### Examples
510
+
511
+ ```ruby
512
+ require 'time'
513
+ require 'api-sdk-rb'
514
+ # setup authorization
515
+ ApiSdkRb.configure do |config|
516
+ # Configure Bearer authorization (JWT): apiKeyAuth
517
+ config.access_token = 'YOUR_BEARER_TOKEN'
518
+ end
519
+
520
+ api_instance = ApiSdkRb::WorkflowsApi.new
521
+ workspace_id = 'personal' # String | The workspace: 'personal' for your own workspace, or the UUID of an organization. A call made for one of your managed users (`X-Managed-User-Id`) always uses 'personal': a managed user has no other workspace, and a call that names an organization is refused with 403.
522
+ workflow_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | The workflow's id
523
+ opts = {
524
+ x_managed_user_id: '3f2b8c1e-7a4d-4e0b-9c55-2d1a6b7e8f90', # String | The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
525
+ x_managed_user_external_id: 'customer-1042' # String | Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
526
+ }
527
+
528
+ begin
529
+ # Get a Workflow
530
+ result = api_instance.get_workspace_workflow_0(workspace_id, workflow_id, opts)
531
+ p result
532
+ rescue ApiSdkRb::ApiError => e
533
+ puts "Error when calling WorkflowsApi->get_workspace_workflow_0: #{e}"
534
+ end
535
+ ```
536
+
537
+ #### Using the get_workspace_workflow_0_with_http_info variant
538
+
539
+ This returns an Array which contains the response data, status code and headers.
540
+
541
+ > <Array(<CreateWorkspaceWorkflowFromPreset201Response>, Integer, Hash)> get_workspace_workflow_0_with_http_info(workspace_id, workflow_id, opts)
542
+
543
+ ```ruby
544
+ begin
545
+ # Get a Workflow
546
+ data, status_code, headers = api_instance.get_workspace_workflow_0_with_http_info(workspace_id, workflow_id, opts)
547
+ p status_code # => 2xx
548
+ p headers # => { ... }
549
+ p data # => <CreateWorkspaceWorkflowFromPreset201Response>
550
+ rescue ApiSdkRb::ApiError => e
551
+ puts "Error when calling WorkflowsApi->get_workspace_workflow_0_with_http_info: #{e}"
552
+ end
553
+ ```
554
+
555
+ ### Parameters
556
+
557
+ | Name | Type | Description | Notes |
558
+ | ---- | ---- | ----------- | ----- |
559
+ | **workspace_id** | **String** | The workspace: &#39;personal&#39; for your own workspace, or the UUID of an organization. A call made for one of your managed users (&#x60;X-Managed-User-Id&#x60;) always uses &#39;personal&#39;: a managed user has no other workspace, and a call that names an organization is refused with 403. | |
560
+ | **workflow_id** | **String** | The workflow&#39;s id | |
561
+ | **x_managed_user_id** | **String** | The id Widgetic gave the managed user (&#x60;POST /managed-users&#x60;). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user. | [optional] |
562
+ | **x_managed_user_external_id** | **String** | Your own id for the managed user (its &#x60;externalId&#x60;), when you do not keep Widgetic&#39;s. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user. | [optional] |
563
+
564
+ ### Return type
565
+
566
+ [**CreateWorkspaceWorkflowFromPreset201Response**](CreateWorkspaceWorkflowFromPreset201Response.md)
567
+
568
+ ### Authorization
569
+
570
+ [apiKeyAuth](../README.md#apiKeyAuth)
571
+
572
+ ### HTTP request headers
573
+
574
+ - **Content-Type**: Not defined
575
+ - **Accept**: application/json
576
+
577
+
578
+ ## get_workspace_workflow_stats_0
579
+
580
+ > <GetWorkspaceWorkflowStats200Response> get_workspace_workflow_stats_0(workspace_id, workflow_id, opts)
581
+
582
+ Get what Visitors Did in a Workflow
583
+
584
+ Counts per block and per connection over a range of UTC days (the last 30 days when not given, up to 366), for one version or for all of them. Only counts: how many visitors reached a block, took a connection, or could not be moved on. No visitor and no value a visitor typed is ever stored. For personal workspace, use 'personal' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can read.
585
+
586
+ ### Examples
587
+
588
+ ```ruby
589
+ require 'time'
590
+ require 'api-sdk-rb'
591
+ # setup authorization
592
+ ApiSdkRb.configure do |config|
593
+ # Configure Bearer authorization (JWT): apiKeyAuth
594
+ config.access_token = 'YOUR_BEARER_TOKEN'
595
+ end
596
+
597
+ api_instance = ApiSdkRb::WorkflowsApi.new
598
+ workspace_id = 'personal' # String | The workspace: 'personal' for your own workspace, or the UUID of an organization. A call made for one of your managed users (`X-Managed-User-Id`) always uses 'personal': a managed user has no other workspace, and a call that names an organization is refused with 403.
599
+ workflow_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | The workflow's id
600
+ opts = {
601
+ version_id: '38400000-8cf0-11bd-b23e-10b96e4ef00d', # String | Count one version only
602
+ from: '2026-10-01', # String | First UTC day (YYYY-MM-DD)
603
+ to: '2026-10-27', # String | Last UTC day (YYYY-MM-DD)
604
+ x_managed_user_id: '3f2b8c1e-7a4d-4e0b-9c55-2d1a6b7e8f90', # String | The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
605
+ x_managed_user_external_id: 'customer-1042' # String | Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
606
+ }
607
+
608
+ begin
609
+ # Get what Visitors Did in a Workflow
610
+ result = api_instance.get_workspace_workflow_stats_0(workspace_id, workflow_id, opts)
611
+ p result
612
+ rescue ApiSdkRb::ApiError => e
613
+ puts "Error when calling WorkflowsApi->get_workspace_workflow_stats_0: #{e}"
614
+ end
615
+ ```
616
+
617
+ #### Using the get_workspace_workflow_stats_0_with_http_info variant
618
+
619
+ This returns an Array which contains the response data, status code and headers.
620
+
621
+ > <Array(<GetWorkspaceWorkflowStats200Response>, Integer, Hash)> get_workspace_workflow_stats_0_with_http_info(workspace_id, workflow_id, opts)
622
+
623
+ ```ruby
624
+ begin
625
+ # Get what Visitors Did in a Workflow
626
+ data, status_code, headers = api_instance.get_workspace_workflow_stats_0_with_http_info(workspace_id, workflow_id, opts)
627
+ p status_code # => 2xx
628
+ p headers # => { ... }
629
+ p data # => <GetWorkspaceWorkflowStats200Response>
630
+ rescue ApiSdkRb::ApiError => e
631
+ puts "Error when calling WorkflowsApi->get_workspace_workflow_stats_0_with_http_info: #{e}"
632
+ end
633
+ ```
634
+
635
+ ### Parameters
636
+
637
+ | Name | Type | Description | Notes |
638
+ | ---- | ---- | ----------- | ----- |
639
+ | **workspace_id** | **String** | The workspace: &#39;personal&#39; for your own workspace, or the UUID of an organization. A call made for one of your managed users (&#x60;X-Managed-User-Id&#x60;) always uses &#39;personal&#39;: a managed user has no other workspace, and a call that names an organization is refused with 403. | |
640
+ | **workflow_id** | **String** | The workflow&#39;s id | |
641
+ | **version_id** | **String** | Count one version only | [optional] |
642
+ | **from** | **String** | First UTC day (YYYY-MM-DD) | [optional] |
643
+ | **to** | **String** | Last UTC day (YYYY-MM-DD) | [optional] |
644
+ | **x_managed_user_id** | **String** | The id Widgetic gave the managed user (&#x60;POST /managed-users&#x60;). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user. | [optional] |
645
+ | **x_managed_user_external_id** | **String** | Your own id for the managed user (its &#x60;externalId&#x60;), when you do not keep Widgetic&#39;s. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user. | [optional] |
646
+
647
+ ### Return type
648
+
649
+ [**GetWorkspaceWorkflowStats200Response**](GetWorkspaceWorkflowStats200Response.md)
650
+
651
+ ### Authorization
652
+
653
+ [apiKeyAuth](../README.md#apiKeyAuth)
654
+
655
+ ### HTTP request headers
656
+
657
+ - **Content-Type**: Not defined
658
+ - **Accept**: application/json
659
+
660
+
661
+ ## get_workspace_workflow_version_0
662
+
663
+ > <GetWorkspaceWorkflowVersion200Response> get_workspace_workflow_version_0(workspace_id, workflow_id, version_id, opts)
664
+
665
+ Get a Published Version of a Workflow
666
+
667
+ One published version with its graph, for the read-only preview and for the Runs view. For personal workspace, use 'personal' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can read.
668
+
669
+ ### Examples
670
+
671
+ ```ruby
672
+ require 'time'
673
+ require 'api-sdk-rb'
674
+ # setup authorization
675
+ ApiSdkRb.configure do |config|
676
+ # Configure Bearer authorization (JWT): apiKeyAuth
677
+ config.access_token = 'YOUR_BEARER_TOKEN'
678
+ end
679
+
680
+ api_instance = ApiSdkRb::WorkflowsApi.new
681
+ workspace_id = 'personal' # String | The workspace: 'personal' for your own workspace, or the UUID of an organization. A call made for one of your managed users (`X-Managed-User-Id`) always uses 'personal': a managed user has no other workspace, and a call that names an organization is refused with 403.
682
+ workflow_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | The workflow's id
683
+ version_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | The id of a published version of the workflow
684
+ opts = {
685
+ x_managed_user_id: '3f2b8c1e-7a4d-4e0b-9c55-2d1a6b7e8f90', # String | The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
686
+ x_managed_user_external_id: 'customer-1042' # String | Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
687
+ }
688
+
689
+ begin
690
+ # Get a Published Version of a Workflow
691
+ result = api_instance.get_workspace_workflow_version_0(workspace_id, workflow_id, version_id, opts)
692
+ p result
693
+ rescue ApiSdkRb::ApiError => e
694
+ puts "Error when calling WorkflowsApi->get_workspace_workflow_version_0: #{e}"
695
+ end
696
+ ```
697
+
698
+ #### Using the get_workspace_workflow_version_0_with_http_info variant
699
+
700
+ This returns an Array which contains the response data, status code and headers.
701
+
702
+ > <Array(<GetWorkspaceWorkflowVersion200Response>, Integer, Hash)> get_workspace_workflow_version_0_with_http_info(workspace_id, workflow_id, version_id, opts)
703
+
704
+ ```ruby
705
+ begin
706
+ # Get a Published Version of a Workflow
707
+ data, status_code, headers = api_instance.get_workspace_workflow_version_0_with_http_info(workspace_id, workflow_id, version_id, opts)
708
+ p status_code # => 2xx
709
+ p headers # => { ... }
710
+ p data # => <GetWorkspaceWorkflowVersion200Response>
711
+ rescue ApiSdkRb::ApiError => e
712
+ puts "Error when calling WorkflowsApi->get_workspace_workflow_version_0_with_http_info: #{e}"
713
+ end
714
+ ```
715
+
716
+ ### Parameters
717
+
718
+ | Name | Type | Description | Notes |
719
+ | ---- | ---- | ----------- | ----- |
720
+ | **workspace_id** | **String** | The workspace: &#39;personal&#39; for your own workspace, or the UUID of an organization. A call made for one of your managed users (&#x60;X-Managed-User-Id&#x60;) always uses &#39;personal&#39;: a managed user has no other workspace, and a call that names an organization is refused with 403. | |
721
+ | **workflow_id** | **String** | The workflow&#39;s id | |
722
+ | **version_id** | **String** | The id of a published version of the workflow | |
723
+ | **x_managed_user_id** | **String** | The id Widgetic gave the managed user (&#x60;POST /managed-users&#x60;). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user. | [optional] |
724
+ | **x_managed_user_external_id** | **String** | Your own id for the managed user (its &#x60;externalId&#x60;), when you do not keep Widgetic&#39;s. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user. | [optional] |
725
+
726
+ ### Return type
727
+
728
+ [**GetWorkspaceWorkflowVersion200Response**](GetWorkspaceWorkflowVersion200Response.md)
729
+
730
+ ### Authorization
731
+
732
+ [apiKeyAuth](../README.md#apiKeyAuth)
733
+
734
+ ### HTTP request headers
735
+
736
+ - **Content-Type**: Not defined
737
+ - **Accept**: application/json
738
+
739
+
740
+ ## list_partner_workflow_presets_1
741
+
742
+ > <ListPartnerWorkflowPresets200Response> list_partner_workflow_presets_1(partner_id)
743
+
744
+ List the workflows a partner offers as places to start
745
+
746
+ The partner's starting points, ordered by `position` and then by `key`: the published workflows it offers its managed users when they make a new workflow. Each says whether people can start from it now and, when they cannot, why. The list is the same for every managed user, and a managed user is shown only what is available. A starting point is one of the partner account's own published workflows, built from compositions the account made for itself (not for a customer or a team) and from widgets the partner already offers as presets (`setPartnerPreset`), and it uses at most 10 widgets. A partner offers up to 50. The caller must be the person who administers the partner (an API key of that account works), or a Widgetic administrator.
747
+
748
+ ### Examples
749
+
750
+ ```ruby
751
+ require 'time'
752
+ require 'api-sdk-rb'
753
+ # setup authorization
754
+ ApiSdkRb.configure do |config|
755
+ # Configure Bearer authorization (JWT): apiKeyAuth
756
+ config.access_token = 'YOUR_BEARER_TOKEN'
757
+ end
758
+
759
+ api_instance = ApiSdkRb::WorkflowsApi.new
760
+ partner_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | The partner whose starting points to list
761
+
762
+ begin
763
+ # List the workflows a partner offers as places to start
764
+ result = api_instance.list_partner_workflow_presets_1(partner_id)
765
+ p result
766
+ rescue ApiSdkRb::ApiError => e
767
+ puts "Error when calling WorkflowsApi->list_partner_workflow_presets_1: #{e}"
768
+ end
769
+ ```
770
+
771
+ #### Using the list_partner_workflow_presets_1_with_http_info variant
772
+
773
+ This returns an Array which contains the response data, status code and headers.
774
+
775
+ > <Array(<ListPartnerWorkflowPresets200Response>, Integer, Hash)> list_partner_workflow_presets_1_with_http_info(partner_id)
776
+
777
+ ```ruby
778
+ begin
779
+ # List the workflows a partner offers as places to start
780
+ data, status_code, headers = api_instance.list_partner_workflow_presets_1_with_http_info(partner_id)
781
+ p status_code # => 2xx
782
+ p headers # => { ... }
783
+ p data # => <ListPartnerWorkflowPresets200Response>
784
+ rescue ApiSdkRb::ApiError => e
785
+ puts "Error when calling WorkflowsApi->list_partner_workflow_presets_1_with_http_info: #{e}"
786
+ end
787
+ ```
788
+
789
+ ### Parameters
790
+
791
+ | Name | Type | Description | Notes |
792
+ | ---- | ---- | ----------- | ----- |
793
+ | **partner_id** | **String** | The partner whose starting points to list | |
794
+
795
+ ### Return type
796
+
797
+ [**ListPartnerWorkflowPresets200Response**](ListPartnerWorkflowPresets200Response.md)
798
+
799
+ ### Authorization
800
+
801
+ [apiKeyAuth](../README.md#apiKeyAuth)
802
+
803
+ ### HTTP request headers
804
+
805
+ - **Content-Type**: Not defined
806
+ - **Accept**: application/json
807
+
808
+
809
+ ## list_workspace_workflow_composition_options_0
810
+
811
+ > <ListWorkspaceWorkflowCompositionOptions200Response> list_workspace_workflow_composition_options_0(workspace_id, opts)
812
+
813
+ List the compositions a workflow can show, and what each can do
814
+
815
+ The workspace's compositions as the workflow editor offers them, newest first. For each one: whether it can be shown (its widget has a published version), the websites it may be embedded on, and which triggers it supports. - **Input added** (`inputs`) is enabled only for a composition that declares at least one table a visitor's entries can be written to. Its `tables` are all of them; its `fields` are the columns a rule may read (not `id` and `created_at`, not a column that is not text, a number or yes/no, and not one whose name says it holds a person's private details, such as an email or a phone number). - **Action in the widget** (`actions`) is enabled only when the published widget version declares at least one goal. Its `items` are the goals a trigger can wait for. When one of them is not enabled, `reason` says why (`widget_keeps_no_data`, `widget_reports_no_actions` or `widget_not_published`), so the editor can show the trigger disabled with an explanation. Publishing checks every reference again against what the composition can do at that moment. For personal workspace, use 'personal' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can read it.
816
+
817
+ ### Examples
818
+
819
+ ```ruby
820
+ require 'time'
821
+ require 'api-sdk-rb'
822
+ # setup authorization
823
+ ApiSdkRb.configure do |config|
824
+ # Configure Bearer authorization (JWT): apiKeyAuth
825
+ config.access_token = 'YOUR_BEARER_TOKEN'
826
+ end
827
+
828
+ api_instance = ApiSdkRb::WorkflowsApi.new
829
+ workspace_id = 'personal' # String | The workspace: 'personal' for your own workspace, or the UUID of an organization. A call made for one of your managed users (`X-Managed-User-Id`) always uses 'personal': a managed user has no other workspace, and a call that names an organization is refused with 403.
830
+ opts = {
831
+ search: 'search_example', # String | Text the composition's name must contain
832
+ ids: 'ids_example', # String | Only these compositions (comma-separated ids, at most 50), those of them you may see. Ask for the compositions a workflow shows with this, so each is found whatever page it would be on. An id you may not see is left out, as one that does not exist is.
833
+ limit: 56, # Integer | Page size (1-100, 50 when not given)
834
+ offset: 56, # Integer | How many to skip (0 when not given)
835
+ x_managed_user_id: '3f2b8c1e-7a4d-4e0b-9c55-2d1a6b7e8f90', # String | The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
836
+ x_managed_user_external_id: 'customer-1042' # String | Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
837
+ }
838
+
839
+ begin
840
+ # List the compositions a workflow can show, and what each can do
841
+ result = api_instance.list_workspace_workflow_composition_options_0(workspace_id, opts)
842
+ p result
843
+ rescue ApiSdkRb::ApiError => e
844
+ puts "Error when calling WorkflowsApi->list_workspace_workflow_composition_options_0: #{e}"
845
+ end
846
+ ```
847
+
848
+ #### Using the list_workspace_workflow_composition_options_0_with_http_info variant
849
+
850
+ This returns an Array which contains the response data, status code and headers.
851
+
852
+ > <Array(<ListWorkspaceWorkflowCompositionOptions200Response>, Integer, Hash)> list_workspace_workflow_composition_options_0_with_http_info(workspace_id, opts)
853
+
854
+ ```ruby
855
+ begin
856
+ # List the compositions a workflow can show, and what each can do
857
+ data, status_code, headers = api_instance.list_workspace_workflow_composition_options_0_with_http_info(workspace_id, opts)
858
+ p status_code # => 2xx
859
+ p headers # => { ... }
860
+ p data # => <ListWorkspaceWorkflowCompositionOptions200Response>
861
+ rescue ApiSdkRb::ApiError => e
862
+ puts "Error when calling WorkflowsApi->list_workspace_workflow_composition_options_0_with_http_info: #{e}"
863
+ end
864
+ ```
865
+
866
+ ### Parameters
867
+
868
+ | Name | Type | Description | Notes |
869
+ | ---- | ---- | ----------- | ----- |
870
+ | **workspace_id** | **String** | The workspace: &#39;personal&#39; for your own workspace, or the UUID of an organization. A call made for one of your managed users (&#x60;X-Managed-User-Id&#x60;) always uses &#39;personal&#39;: a managed user has no other workspace, and a call that names an organization is refused with 403. | |
871
+ | **search** | **String** | Text the composition&#39;s name must contain | [optional] |
872
+ | **ids** | **String** | Only these compositions (comma-separated ids, at most 50), those of them you may see. Ask for the compositions a workflow shows with this, so each is found whatever page it would be on. An id you may not see is left out, as one that does not exist is. | [optional] |
873
+ | **limit** | **Integer** | Page size (1-100, 50 when not given) | [optional] |
874
+ | **offset** | **Integer** | How many to skip (0 when not given) | [optional] |
875
+ | **x_managed_user_id** | **String** | The id Widgetic gave the managed user (&#x60;POST /managed-users&#x60;). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user. | [optional] |
876
+ | **x_managed_user_external_id** | **String** | Your own id for the managed user (its &#x60;externalId&#x60;), when you do not keep Widgetic&#39;s. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user. | [optional] |
877
+
878
+ ### Return type
879
+
880
+ [**ListWorkspaceWorkflowCompositionOptions200Response**](ListWorkspaceWorkflowCompositionOptions200Response.md)
881
+
882
+ ### Authorization
883
+
884
+ [apiKeyAuth](../README.md#apiKeyAuth)
885
+
886
+ ### HTTP request headers
887
+
888
+ - **Content-Type**: Not defined
889
+ - **Accept**: application/json
890
+
891
+
892
+ ## list_workspace_workflow_presets_0
893
+
894
+ > <ListWorkspaceWorkflowPresets200Response> list_workspace_workflow_presets_0(workspace_id, opts)
895
+
896
+ List the starting points for a new Workflow
897
+
898
+ The workflows you can start from in this workspace: published workflows that Widgetic offers or, for one of a partner's managed users, that the partner offers (a managed user is never shown Widgetic's, and a person is never shown a partner's). Only what can be started now is listed, in the order the offerer set (smallest `position` first, then by `key`). Each shows what you would get, and none shows who made it or any id of its own. Start from one with `createWorkspaceWorkflowFromPreset`. For personal workspace, use 'personal' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can read the list.
899
+
900
+ ### Examples
901
+
902
+ ```ruby
903
+ require 'time'
904
+ require 'api-sdk-rb'
905
+ # setup authorization
906
+ ApiSdkRb.configure do |config|
907
+ # Configure Bearer authorization (JWT): apiKeyAuth
908
+ config.access_token = 'YOUR_BEARER_TOKEN'
909
+ end
910
+
911
+ api_instance = ApiSdkRb::WorkflowsApi.new
912
+ workspace_id = 'personal' # String | The workspace: 'personal' for your own workspace, or the UUID of an organization. A call made for one of your managed users (`X-Managed-User-Id`) always uses 'personal': a managed user has no other workspace, and a call that names an organization is refused with 403.
913
+ opts = {
914
+ x_managed_user_id: '3f2b8c1e-7a4d-4e0b-9c55-2d1a6b7e8f90', # String | The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
915
+ x_managed_user_external_id: 'customer-1042' # String | Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
916
+ }
917
+
918
+ begin
919
+ # List the starting points for a new Workflow
920
+ result = api_instance.list_workspace_workflow_presets_0(workspace_id, opts)
921
+ p result
922
+ rescue ApiSdkRb::ApiError => e
923
+ puts "Error when calling WorkflowsApi->list_workspace_workflow_presets_0: #{e}"
924
+ end
925
+ ```
926
+
927
+ #### Using the list_workspace_workflow_presets_0_with_http_info variant
928
+
929
+ This returns an Array which contains the response data, status code and headers.
930
+
931
+ > <Array(<ListWorkspaceWorkflowPresets200Response>, Integer, Hash)> list_workspace_workflow_presets_0_with_http_info(workspace_id, opts)
932
+
933
+ ```ruby
934
+ begin
935
+ # List the starting points for a new Workflow
936
+ data, status_code, headers = api_instance.list_workspace_workflow_presets_0_with_http_info(workspace_id, opts)
937
+ p status_code # => 2xx
938
+ p headers # => { ... }
939
+ p data # => <ListWorkspaceWorkflowPresets200Response>
940
+ rescue ApiSdkRb::ApiError => e
941
+ puts "Error when calling WorkflowsApi->list_workspace_workflow_presets_0_with_http_info: #{e}"
942
+ end
943
+ ```
944
+
945
+ ### Parameters
946
+
947
+ | Name | Type | Description | Notes |
948
+ | ---- | ---- | ----------- | ----- |
949
+ | **workspace_id** | **String** | The workspace: &#39;personal&#39; for your own workspace, or the UUID of an organization. A call made for one of your managed users (&#x60;X-Managed-User-Id&#x60;) always uses &#39;personal&#39;: a managed user has no other workspace, and a call that names an organization is refused with 403. | |
950
+ | **x_managed_user_id** | **String** | The id Widgetic gave the managed user (&#x60;POST /managed-users&#x60;). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user. | [optional] |
951
+ | **x_managed_user_external_id** | **String** | Your own id for the managed user (its &#x60;externalId&#x60;), when you do not keep Widgetic&#39;s. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user. | [optional] |
952
+
953
+ ### Return type
954
+
955
+ [**ListWorkspaceWorkflowPresets200Response**](ListWorkspaceWorkflowPresets200Response.md)
956
+
957
+ ### Authorization
958
+
959
+ [apiKeyAuth](../README.md#apiKeyAuth)
960
+
961
+ ### HTTP request headers
962
+
963
+ - **Content-Type**: Not defined
964
+ - **Accept**: application/json
965
+
966
+
967
+ ## list_workspace_workflow_versions_0
968
+
969
+ > <ListWorkspaceWorkflowVersions200Response> list_workspace_workflow_versions_0(workspace_id, workflow_id, opts)
970
+
971
+ List the Published Versions of a Workflow
972
+
973
+ Every version the workflow has had, newest first, with who published it and when. The one visitors get is marked `isLive`. For personal workspace, use 'personal' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can read.
974
+
975
+ ### Examples
976
+
977
+ ```ruby
978
+ require 'time'
979
+ require 'api-sdk-rb'
980
+ # setup authorization
981
+ ApiSdkRb.configure do |config|
982
+ # Configure Bearer authorization (JWT): apiKeyAuth
983
+ config.access_token = 'YOUR_BEARER_TOKEN'
984
+ end
985
+
986
+ api_instance = ApiSdkRb::WorkflowsApi.new
987
+ workspace_id = 'personal' # String | The workspace: 'personal' for your own workspace, or the UUID of an organization. A call made for one of your managed users (`X-Managed-User-Id`) always uses 'personal': a managed user has no other workspace, and a call that names an organization is refused with 403.
988
+ workflow_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | The workflow's id
989
+ opts = {
990
+ x_managed_user_id: '3f2b8c1e-7a4d-4e0b-9c55-2d1a6b7e8f90', # String | The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
991
+ x_managed_user_external_id: 'customer-1042' # String | Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
992
+ }
993
+
994
+ begin
995
+ # List the Published Versions of a Workflow
996
+ result = api_instance.list_workspace_workflow_versions_0(workspace_id, workflow_id, opts)
997
+ p result
998
+ rescue ApiSdkRb::ApiError => e
999
+ puts "Error when calling WorkflowsApi->list_workspace_workflow_versions_0: #{e}"
1000
+ end
1001
+ ```
1002
+
1003
+ #### Using the list_workspace_workflow_versions_0_with_http_info variant
1004
+
1005
+ This returns an Array which contains the response data, status code and headers.
1006
+
1007
+ > <Array(<ListWorkspaceWorkflowVersions200Response>, Integer, Hash)> list_workspace_workflow_versions_0_with_http_info(workspace_id, workflow_id, opts)
1008
+
1009
+ ```ruby
1010
+ begin
1011
+ # List the Published Versions of a Workflow
1012
+ data, status_code, headers = api_instance.list_workspace_workflow_versions_0_with_http_info(workspace_id, workflow_id, opts)
1013
+ p status_code # => 2xx
1014
+ p headers # => { ... }
1015
+ p data # => <ListWorkspaceWorkflowVersions200Response>
1016
+ rescue ApiSdkRb::ApiError => e
1017
+ puts "Error when calling WorkflowsApi->list_workspace_workflow_versions_0_with_http_info: #{e}"
1018
+ end
1019
+ ```
1020
+
1021
+ ### Parameters
1022
+
1023
+ | Name | Type | Description | Notes |
1024
+ | ---- | ---- | ----------- | ----- |
1025
+ | **workspace_id** | **String** | The workspace: &#39;personal&#39; for your own workspace, or the UUID of an organization. A call made for one of your managed users (&#x60;X-Managed-User-Id&#x60;) always uses &#39;personal&#39;: a managed user has no other workspace, and a call that names an organization is refused with 403. | |
1026
+ | **workflow_id** | **String** | The workflow&#39;s id | |
1027
+ | **x_managed_user_id** | **String** | The id Widgetic gave the managed user (&#x60;POST /managed-users&#x60;). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user. | [optional] |
1028
+ | **x_managed_user_external_id** | **String** | Your own id for the managed user (its &#x60;externalId&#x60;), when you do not keep Widgetic&#39;s. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user. | [optional] |
1029
+
1030
+ ### Return type
1031
+
1032
+ [**ListWorkspaceWorkflowVersions200Response**](ListWorkspaceWorkflowVersions200Response.md)
1033
+
1034
+ ### Authorization
1035
+
1036
+ [apiKeyAuth](../README.md#apiKeyAuth)
1037
+
1038
+ ### HTTP request headers
1039
+
1040
+ - **Content-Type**: Not defined
1041
+ - **Accept**: application/json
1042
+
1043
+
1044
+ ## list_workspace_workflows_0
1045
+
1046
+ > <ListWorkspaceWorkflows200Response> list_workspace_workflows_0(workspace_id, opts)
1047
+
1048
+ List the Workflows of a Workspace
1049
+
1050
+ Lists the workspace's workflows, newest first unless `sort` says otherwise. Archived workflows are left out unless `status` asks for them (`archived`, or `all`). For personal workspace, use 'personal' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can read the list.
1051
+
1052
+ ### Examples
1053
+
1054
+ ```ruby
1055
+ require 'time'
1056
+ require 'api-sdk-rb'
1057
+ # setup authorization
1058
+ ApiSdkRb.configure do |config|
1059
+ # Configure Bearer authorization (JWT): apiKeyAuth
1060
+ config.access_token = 'YOUR_BEARER_TOKEN'
1061
+ end
1062
+
1063
+ api_instance = ApiSdkRb::WorkflowsApi.new
1064
+ workspace_id = 'personal' # String | The workspace: 'personal' for your own workspace, or the UUID of an organization. A call made for one of your managed users (`X-Managed-User-Id`) always uses 'personal': a managed user has no other workspace, and a call that names an organization is refused with 403.
1065
+ opts = {
1066
+ search: 'search_example', # String | Text the workflow's name must contain
1067
+ status: 'draft', # String | One state to list (`draft`, `live`, `paused`, `archived`), or `all` for every state. Without it, the ones in use (draft, live and paused).
1068
+ sort: 'runsCount:desc', # String | `<field>:<asc|desc>` where field is createdAt, lastPublishedAt, runsCount or name (or just asc / desc for createdAt). Newest first when not given.
1069
+ limit: 56, # Integer | Page size (1-100, 50 when not given)
1070
+ offset: 56, # Integer | How many to skip (0 when not given)
1071
+ x_managed_user_id: '3f2b8c1e-7a4d-4e0b-9c55-2d1a6b7e8f90', # String | The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
1072
+ x_managed_user_external_id: 'customer-1042' # String | Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
1073
+ }
1074
+
1075
+ begin
1076
+ # List the Workflows of a Workspace
1077
+ result = api_instance.list_workspace_workflows_0(workspace_id, opts)
1078
+ p result
1079
+ rescue ApiSdkRb::ApiError => e
1080
+ puts "Error when calling WorkflowsApi->list_workspace_workflows_0: #{e}"
1081
+ end
1082
+ ```
1083
+
1084
+ #### Using the list_workspace_workflows_0_with_http_info variant
1085
+
1086
+ This returns an Array which contains the response data, status code and headers.
1087
+
1088
+ > <Array(<ListWorkspaceWorkflows200Response>, Integer, Hash)> list_workspace_workflows_0_with_http_info(workspace_id, opts)
1089
+
1090
+ ```ruby
1091
+ begin
1092
+ # List the Workflows of a Workspace
1093
+ data, status_code, headers = api_instance.list_workspace_workflows_0_with_http_info(workspace_id, opts)
1094
+ p status_code # => 2xx
1095
+ p headers # => { ... }
1096
+ p data # => <ListWorkspaceWorkflows200Response>
1097
+ rescue ApiSdkRb::ApiError => e
1098
+ puts "Error when calling WorkflowsApi->list_workspace_workflows_0_with_http_info: #{e}"
1099
+ end
1100
+ ```
1101
+
1102
+ ### Parameters
1103
+
1104
+ | Name | Type | Description | Notes |
1105
+ | ---- | ---- | ----------- | ----- |
1106
+ | **workspace_id** | **String** | The workspace: &#39;personal&#39; for your own workspace, or the UUID of an organization. A call made for one of your managed users (&#x60;X-Managed-User-Id&#x60;) always uses &#39;personal&#39;: a managed user has no other workspace, and a call that names an organization is refused with 403. | |
1107
+ | **search** | **String** | Text the workflow&#39;s name must contain | [optional] |
1108
+ | **status** | **String** | One state to list (&#x60;draft&#x60;, &#x60;live&#x60;, &#x60;paused&#x60;, &#x60;archived&#x60;), or &#x60;all&#x60; for every state. Without it, the ones in use (draft, live and paused). | [optional] |
1109
+ | **sort** | **String** | &#x60;&lt;field&gt;:&lt;asc|desc&gt;&#x60; where field is createdAt, lastPublishedAt, runsCount or name (or just asc / desc for createdAt). Newest first when not given. | [optional] |
1110
+ | **limit** | **Integer** | Page size (1-100, 50 when not given) | [optional] |
1111
+ | **offset** | **Integer** | How many to skip (0 when not given) | [optional] |
1112
+ | **x_managed_user_id** | **String** | The id Widgetic gave the managed user (&#x60;POST /managed-users&#x60;). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user. | [optional] |
1113
+ | **x_managed_user_external_id** | **String** | Your own id for the managed user (its &#x60;externalId&#x60;), when you do not keep Widgetic&#39;s. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user. | [optional] |
1114
+
1115
+ ### Return type
1116
+
1117
+ [**ListWorkspaceWorkflows200Response**](ListWorkspaceWorkflows200Response.md)
1118
+
1119
+ ### Authorization
1120
+
1121
+ [apiKeyAuth](../README.md#apiKeyAuth)
1122
+
1123
+ ### HTTP request headers
1124
+
1125
+ - **Content-Type**: Not defined
1126
+ - **Accept**: application/json
1127
+
1128
+
1129
+ ## pause_workspace_workflow_0
1130
+
1131
+ > <SaveWorkspaceWorkflow200Response> pause_workspace_workflow_0(workspace_id, workflow_id, opts)
1132
+
1133
+ Pause a Workflow
1134
+
1135
+ While a workflow is paused, its embeds show only their first composition (the `composition-id` of the embed) and no visitor moves on. The live version is kept, and visitors partway through carry on from where they were when it is resumed. Only a live workflow can be paused. For personal workspace, use 'personal' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can pause.
1136
+
1137
+ ### Examples
1138
+
1139
+ ```ruby
1140
+ require 'time'
1141
+ require 'api-sdk-rb'
1142
+ # setup authorization
1143
+ ApiSdkRb.configure do |config|
1144
+ # Configure Bearer authorization (JWT): apiKeyAuth
1145
+ config.access_token = 'YOUR_BEARER_TOKEN'
1146
+ end
1147
+
1148
+ api_instance = ApiSdkRb::WorkflowsApi.new
1149
+ workspace_id = 'personal' # String | The workspace: 'personal' for your own workspace, or the UUID of an organization. A call made for one of your managed users (`X-Managed-User-Id`) always uses 'personal': a managed user has no other workspace, and a call that names an organization is refused with 403.
1150
+ workflow_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | The workflow's id
1151
+ opts = {
1152
+ x_managed_user_id: '3f2b8c1e-7a4d-4e0b-9c55-2d1a6b7e8f90', # String | The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
1153
+ x_managed_user_external_id: 'customer-1042' # String | Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
1154
+ }
1155
+
1156
+ begin
1157
+ # Pause a Workflow
1158
+ result = api_instance.pause_workspace_workflow_0(workspace_id, workflow_id, opts)
1159
+ p result
1160
+ rescue ApiSdkRb::ApiError => e
1161
+ puts "Error when calling WorkflowsApi->pause_workspace_workflow_0: #{e}"
1162
+ end
1163
+ ```
1164
+
1165
+ #### Using the pause_workspace_workflow_0_with_http_info variant
1166
+
1167
+ This returns an Array which contains the response data, status code and headers.
1168
+
1169
+ > <Array(<SaveWorkspaceWorkflow200Response>, Integer, Hash)> pause_workspace_workflow_0_with_http_info(workspace_id, workflow_id, opts)
1170
+
1171
+ ```ruby
1172
+ begin
1173
+ # Pause a Workflow
1174
+ data, status_code, headers = api_instance.pause_workspace_workflow_0_with_http_info(workspace_id, workflow_id, opts)
1175
+ p status_code # => 2xx
1176
+ p headers # => { ... }
1177
+ p data # => <SaveWorkspaceWorkflow200Response>
1178
+ rescue ApiSdkRb::ApiError => e
1179
+ puts "Error when calling WorkflowsApi->pause_workspace_workflow_0_with_http_info: #{e}"
1180
+ end
1181
+ ```
1182
+
1183
+ ### Parameters
1184
+
1185
+ | Name | Type | Description | Notes |
1186
+ | ---- | ---- | ----------- | ----- |
1187
+ | **workspace_id** | **String** | The workspace: &#39;personal&#39; for your own workspace, or the UUID of an organization. A call made for one of your managed users (&#x60;X-Managed-User-Id&#x60;) always uses &#39;personal&#39;: a managed user has no other workspace, and a call that names an organization is refused with 403. | |
1188
+ | **workflow_id** | **String** | The workflow&#39;s id | |
1189
+ | **x_managed_user_id** | **String** | The id Widgetic gave the managed user (&#x60;POST /managed-users&#x60;). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user. | [optional] |
1190
+ | **x_managed_user_external_id** | **String** | Your own id for the managed user (its &#x60;externalId&#x60;), when you do not keep Widgetic&#39;s. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user. | [optional] |
1191
+
1192
+ ### Return type
1193
+
1194
+ [**SaveWorkspaceWorkflow200Response**](SaveWorkspaceWorkflow200Response.md)
1195
+
1196
+ ### Authorization
1197
+
1198
+ [apiKeyAuth](../README.md#apiKeyAuth)
1199
+
1200
+ ### HTTP request headers
1201
+
1202
+ - **Content-Type**: Not defined
1203
+ - **Accept**: application/json
1204
+
1205
+
1206
+ ## publish_workspace_workflow_0
1207
+
1208
+ > <PublishWorkspaceWorkflow200Response> publish_workspace_workflow_0(workspace_id, workflow_id, idempotency_key, publish_workspace_workflow_request, opts)
1209
+
1210
+ Publish the Draft of a Workflow
1211
+
1212
+ Checks the draft and, when nothing stops it, makes it the next version and the one new visitors get. Versions never change once published. A visitor already partway through keeps the version they started on (for up to 30 days). The check reads what each composition can do right now (a table the visitor adds to, a goal the widget reports, the websites it may be embedded on), so a workflow never goes live pointing at something that has gone. It is refused with 422 (`BUSINESS_OPERATION_INVALID`) when the draft has errors; the `issues` in the error's `details` name the blocks to fix: an unconnected trigger, a condition without rules, a composition that is not published, a field or action that is gone, a composition whose allowed websites exclude the site the workflow starts on. Nothing is published when the draft has no changes since the live version. The `revision` is the one the editor read, and a publish of a draft that has moved on is refused with 409. For personal workspace, use 'personal' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can publish.
1213
+
1214
+ ### Examples
1215
+
1216
+ ```ruby
1217
+ require 'time'
1218
+ require 'api-sdk-rb'
1219
+ # setup authorization
1220
+ ApiSdkRb.configure do |config|
1221
+ # Configure Bearer authorization (JWT): apiKeyAuth
1222
+ config.access_token = 'YOUR_BEARER_TOKEN'
1223
+ end
1224
+
1225
+ api_instance = ApiSdkRb::WorkflowsApi.new
1226
+ workspace_id = 'personal' # String | The workspace: 'personal' for your own workspace, or the UUID of an organization. A call made for one of your managed users (`X-Managed-User-Id`) always uses 'personal': a managed user has no other workspace, and a call that names an organization is refused with 403.
1227
+ workflow_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | The workflow's id
1228
+ idempotency_key = '9b2d6f0a-3c41-4e5a-8d77-1f2e3a4b5c6d' # String | Required: a call without it is refused with `400`. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, `-` and `_`. Send the same key again when you retry (after a timeout, a dropped connection or a `5xx`) and the call is carried out once: the retry gets the first answer back, marked `X-Idempotency-Cached: true`. The same key with a different body is refused with `422`, and a retry that arrives while the first call is still running with `409` (see `Retry-After`).
1229
+ publish_workspace_workflow_request = ApiSdkRb::PublishWorkspaceWorkflowRequest.new({revision: 37}) # PublishWorkspaceWorkflowRequest |
1230
+ opts = {
1231
+ x_managed_user_id: '3f2b8c1e-7a4d-4e0b-9c55-2d1a6b7e8f90', # String | The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
1232
+ x_managed_user_external_id: 'customer-1042' # String | Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
1233
+ }
1234
+
1235
+ begin
1236
+ # Publish the Draft of a Workflow
1237
+ result = api_instance.publish_workspace_workflow_0(workspace_id, workflow_id, idempotency_key, publish_workspace_workflow_request, opts)
1238
+ p result
1239
+ rescue ApiSdkRb::ApiError => e
1240
+ puts "Error when calling WorkflowsApi->publish_workspace_workflow_0: #{e}"
1241
+ end
1242
+ ```
1243
+
1244
+ #### Using the publish_workspace_workflow_0_with_http_info variant
1245
+
1246
+ This returns an Array which contains the response data, status code and headers.
1247
+
1248
+ > <Array(<PublishWorkspaceWorkflow200Response>, Integer, Hash)> publish_workspace_workflow_0_with_http_info(workspace_id, workflow_id, idempotency_key, publish_workspace_workflow_request, opts)
1249
+
1250
+ ```ruby
1251
+ begin
1252
+ # Publish the Draft of a Workflow
1253
+ data, status_code, headers = api_instance.publish_workspace_workflow_0_with_http_info(workspace_id, workflow_id, idempotency_key, publish_workspace_workflow_request, opts)
1254
+ p status_code # => 2xx
1255
+ p headers # => { ... }
1256
+ p data # => <PublishWorkspaceWorkflow200Response>
1257
+ rescue ApiSdkRb::ApiError => e
1258
+ puts "Error when calling WorkflowsApi->publish_workspace_workflow_0_with_http_info: #{e}"
1259
+ end
1260
+ ```
1261
+
1262
+ ### Parameters
1263
+
1264
+ | Name | Type | Description | Notes |
1265
+ | ---- | ---- | ----------- | ----- |
1266
+ | **workspace_id** | **String** | The workspace: &#39;personal&#39; for your own workspace, or the UUID of an organization. A call made for one of your managed users (&#x60;X-Managed-User-Id&#x60;) always uses &#39;personal&#39;: a managed user has no other workspace, and a call that names an organization is refused with 403. | |
1267
+ | **workflow_id** | **String** | The workflow&#39;s id | |
1268
+ | **idempotency_key** | **String** | Required: a call without it is refused with &#x60;400&#x60;. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, &#x60;-&#x60; and &#x60;_&#x60;. Send the same key again when you retry (after a timeout, a dropped connection or a &#x60;5xx&#x60;) and the call is carried out once: the retry gets the first answer back, marked &#x60;X-Idempotency-Cached: true&#x60;. The same key with a different body is refused with &#x60;422&#x60;, and a retry that arrives while the first call is still running with &#x60;409&#x60; (see &#x60;Retry-After&#x60;). | |
1269
+ | **publish_workspace_workflow_request** | [**PublishWorkspaceWorkflowRequest**](PublishWorkspaceWorkflowRequest.md) | | |
1270
+ | **x_managed_user_id** | **String** | The id Widgetic gave the managed user (&#x60;POST /managed-users&#x60;). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user. | [optional] |
1271
+ | **x_managed_user_external_id** | **String** | Your own id for the managed user (its &#x60;externalId&#x60;), when you do not keep Widgetic&#39;s. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user. | [optional] |
1272
+
1273
+ ### Return type
1274
+
1275
+ [**PublishWorkspaceWorkflow200Response**](PublishWorkspaceWorkflow200Response.md)
1276
+
1277
+ ### Authorization
1278
+
1279
+ [apiKeyAuth](../README.md#apiKeyAuth)
1280
+
1281
+ ### HTTP request headers
1282
+
1283
+ - **Content-Type**: application/json
1284
+ - **Accept**: application/json
1285
+
1286
+
1287
+ ## remove_partner_workflow_preset_1
1288
+
1289
+ > <RemovePartnerWorkflowPreset200Response> remove_partner_workflow_preset_1(partner_id, key)
1290
+
1291
+ Stop offering a workflow as a place to start
1292
+
1293
+ Removes the starting point under `key`. The workflow itself is not touched, and neither are the workflows people already started from it. Removing a starting point the partner does not offer is not an error: the answer is `removed: false`.
1294
+
1295
+ ### Examples
1296
+
1297
+ ```ruby
1298
+ require 'time'
1299
+ require 'api-sdk-rb'
1300
+ # setup authorization
1301
+ ApiSdkRb.configure do |config|
1302
+ # Configure Bearer authorization (JWT): apiKeyAuth
1303
+ config.access_token = 'YOUR_BEARER_TOKEN'
1304
+ end
1305
+
1306
+ api_instance = ApiSdkRb::WorkflowsApi.new
1307
+ partner_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | The partner whose starting point to remove
1308
+ key = 'key_example' # String | The key of the starting point to remove
1309
+
1310
+ begin
1311
+ # Stop offering a workflow as a place to start
1312
+ result = api_instance.remove_partner_workflow_preset_1(partner_id, key)
1313
+ p result
1314
+ rescue ApiSdkRb::ApiError => e
1315
+ puts "Error when calling WorkflowsApi->remove_partner_workflow_preset_1: #{e}"
1316
+ end
1317
+ ```
1318
+
1319
+ #### Using the remove_partner_workflow_preset_1_with_http_info variant
1320
+
1321
+ This returns an Array which contains the response data, status code and headers.
1322
+
1323
+ > <Array(<RemovePartnerWorkflowPreset200Response>, Integer, Hash)> remove_partner_workflow_preset_1_with_http_info(partner_id, key)
1324
+
1325
+ ```ruby
1326
+ begin
1327
+ # Stop offering a workflow as a place to start
1328
+ data, status_code, headers = api_instance.remove_partner_workflow_preset_1_with_http_info(partner_id, key)
1329
+ p status_code # => 2xx
1330
+ p headers # => { ... }
1331
+ p data # => <RemovePartnerWorkflowPreset200Response>
1332
+ rescue ApiSdkRb::ApiError => e
1333
+ puts "Error when calling WorkflowsApi->remove_partner_workflow_preset_1_with_http_info: #{e}"
1334
+ end
1335
+ ```
1336
+
1337
+ ### Parameters
1338
+
1339
+ | Name | Type | Description | Notes |
1340
+ | ---- | ---- | ----------- | ----- |
1341
+ | **partner_id** | **String** | The partner whose starting point to remove | |
1342
+ | **key** | **String** | The key of the starting point to remove | |
1343
+
1344
+ ### Return type
1345
+
1346
+ [**RemovePartnerWorkflowPreset200Response**](RemovePartnerWorkflowPreset200Response.md)
1347
+
1348
+ ### Authorization
1349
+
1350
+ [apiKeyAuth](../README.md#apiKeyAuth)
1351
+
1352
+ ### HTTP request headers
1353
+
1354
+ - **Content-Type**: Not defined
1355
+ - **Accept**: application/json
1356
+
1357
+
1358
+ ## restore_workspace_workflow_version_0
1359
+
1360
+ > <CreateWorkspaceWorkflowFromPreset201Response> restore_workspace_workflow_version_0(workspace_id, workflow_id, version_id, publish_workspace_workflow_request, opts)
1361
+
1362
+ Restore a Version of a Workflow into the Draft
1363
+
1364
+ Copies a published version into the draft, so it can be changed and published again. Nothing is published and nothing visitors see changes: the version stays in the history as it was. Names the `revision` the editor read. For personal workspace, use 'personal' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can restore.
1365
+
1366
+ ### Examples
1367
+
1368
+ ```ruby
1369
+ require 'time'
1370
+ require 'api-sdk-rb'
1371
+ # setup authorization
1372
+ ApiSdkRb.configure do |config|
1373
+ # Configure Bearer authorization (JWT): apiKeyAuth
1374
+ config.access_token = 'YOUR_BEARER_TOKEN'
1375
+ end
1376
+
1377
+ api_instance = ApiSdkRb::WorkflowsApi.new
1378
+ workspace_id = 'personal' # String | The workspace: 'personal' for your own workspace, or the UUID of an organization. A call made for one of your managed users (`X-Managed-User-Id`) always uses 'personal': a managed user has no other workspace, and a call that names an organization is refused with 403.
1379
+ workflow_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | The workflow's id
1380
+ version_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | The id of a published version of the workflow
1381
+ publish_workspace_workflow_request = ApiSdkRb::PublishWorkspaceWorkflowRequest.new({revision: 37}) # PublishWorkspaceWorkflowRequest |
1382
+ opts = {
1383
+ x_managed_user_id: '3f2b8c1e-7a4d-4e0b-9c55-2d1a6b7e8f90', # String | The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
1384
+ x_managed_user_external_id: 'customer-1042' # String | Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
1385
+ }
1386
+
1387
+ begin
1388
+ # Restore a Version of a Workflow into the Draft
1389
+ result = api_instance.restore_workspace_workflow_version_0(workspace_id, workflow_id, version_id, publish_workspace_workflow_request, opts)
1390
+ p result
1391
+ rescue ApiSdkRb::ApiError => e
1392
+ puts "Error when calling WorkflowsApi->restore_workspace_workflow_version_0: #{e}"
1393
+ end
1394
+ ```
1395
+
1396
+ #### Using the restore_workspace_workflow_version_0_with_http_info variant
1397
+
1398
+ This returns an Array which contains the response data, status code and headers.
1399
+
1400
+ > <Array(<CreateWorkspaceWorkflowFromPreset201Response>, Integer, Hash)> restore_workspace_workflow_version_0_with_http_info(workspace_id, workflow_id, version_id, publish_workspace_workflow_request, opts)
1401
+
1402
+ ```ruby
1403
+ begin
1404
+ # Restore a Version of a Workflow into the Draft
1405
+ data, status_code, headers = api_instance.restore_workspace_workflow_version_0_with_http_info(workspace_id, workflow_id, version_id, publish_workspace_workflow_request, opts)
1406
+ p status_code # => 2xx
1407
+ p headers # => { ... }
1408
+ p data # => <CreateWorkspaceWorkflowFromPreset201Response>
1409
+ rescue ApiSdkRb::ApiError => e
1410
+ puts "Error when calling WorkflowsApi->restore_workspace_workflow_version_0_with_http_info: #{e}"
1411
+ end
1412
+ ```
1413
+
1414
+ ### Parameters
1415
+
1416
+ | Name | Type | Description | Notes |
1417
+ | ---- | ---- | ----------- | ----- |
1418
+ | **workspace_id** | **String** | The workspace: &#39;personal&#39; for your own workspace, or the UUID of an organization. A call made for one of your managed users (&#x60;X-Managed-User-Id&#x60;) always uses &#39;personal&#39;: a managed user has no other workspace, and a call that names an organization is refused with 403. | |
1419
+ | **workflow_id** | **String** | The workflow&#39;s id | |
1420
+ | **version_id** | **String** | The id of a published version of the workflow | |
1421
+ | **publish_workspace_workflow_request** | [**PublishWorkspaceWorkflowRequest**](PublishWorkspaceWorkflowRequest.md) | | |
1422
+ | **x_managed_user_id** | **String** | The id Widgetic gave the managed user (&#x60;POST /managed-users&#x60;). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user. | [optional] |
1423
+ | **x_managed_user_external_id** | **String** | Your own id for the managed user (its &#x60;externalId&#x60;), when you do not keep Widgetic&#39;s. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user. | [optional] |
1424
+
1425
+ ### Return type
1426
+
1427
+ [**CreateWorkspaceWorkflowFromPreset201Response**](CreateWorkspaceWorkflowFromPreset201Response.md)
1428
+
1429
+ ### Authorization
1430
+
1431
+ [apiKeyAuth](../README.md#apiKeyAuth)
1432
+
1433
+ ### HTTP request headers
1434
+
1435
+ - **Content-Type**: application/json
1436
+ - **Accept**: application/json
1437
+
1438
+
1439
+ ## resume_workspace_workflow_0
1440
+
1441
+ > <SaveWorkspaceWorkflow200Response> resume_workspace_workflow_0(workspace_id, workflow_id, opts)
1442
+
1443
+ Resume a Paused Workflow
1444
+
1445
+ Makes a paused workflow live again, on the version that was live when it was paused. For personal workspace, use 'personal' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can resume.
1446
+
1447
+ ### Examples
1448
+
1449
+ ```ruby
1450
+ require 'time'
1451
+ require 'api-sdk-rb'
1452
+ # setup authorization
1453
+ ApiSdkRb.configure do |config|
1454
+ # Configure Bearer authorization (JWT): apiKeyAuth
1455
+ config.access_token = 'YOUR_BEARER_TOKEN'
1456
+ end
1457
+
1458
+ api_instance = ApiSdkRb::WorkflowsApi.new
1459
+ workspace_id = 'personal' # String | The workspace: 'personal' for your own workspace, or the UUID of an organization. A call made for one of your managed users (`X-Managed-User-Id`) always uses 'personal': a managed user has no other workspace, and a call that names an organization is refused with 403.
1460
+ workflow_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | The workflow's id
1461
+ opts = {
1462
+ x_managed_user_id: '3f2b8c1e-7a4d-4e0b-9c55-2d1a6b7e8f90', # String | The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
1463
+ x_managed_user_external_id: 'customer-1042' # String | Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
1464
+ }
1465
+
1466
+ begin
1467
+ # Resume a Paused Workflow
1468
+ result = api_instance.resume_workspace_workflow_0(workspace_id, workflow_id, opts)
1469
+ p result
1470
+ rescue ApiSdkRb::ApiError => e
1471
+ puts "Error when calling WorkflowsApi->resume_workspace_workflow_0: #{e}"
1472
+ end
1473
+ ```
1474
+
1475
+ #### Using the resume_workspace_workflow_0_with_http_info variant
1476
+
1477
+ This returns an Array which contains the response data, status code and headers.
1478
+
1479
+ > <Array(<SaveWorkspaceWorkflow200Response>, Integer, Hash)> resume_workspace_workflow_0_with_http_info(workspace_id, workflow_id, opts)
1480
+
1481
+ ```ruby
1482
+ begin
1483
+ # Resume a Paused Workflow
1484
+ data, status_code, headers = api_instance.resume_workspace_workflow_0_with_http_info(workspace_id, workflow_id, opts)
1485
+ p status_code # => 2xx
1486
+ p headers # => { ... }
1487
+ p data # => <SaveWorkspaceWorkflow200Response>
1488
+ rescue ApiSdkRb::ApiError => e
1489
+ puts "Error when calling WorkflowsApi->resume_workspace_workflow_0_with_http_info: #{e}"
1490
+ end
1491
+ ```
1492
+
1493
+ ### Parameters
1494
+
1495
+ | Name | Type | Description | Notes |
1496
+ | ---- | ---- | ----------- | ----- |
1497
+ | **workspace_id** | **String** | The workspace: &#39;personal&#39; for your own workspace, or the UUID of an organization. A call made for one of your managed users (&#x60;X-Managed-User-Id&#x60;) always uses &#39;personal&#39;: a managed user has no other workspace, and a call that names an organization is refused with 403. | |
1498
+ | **workflow_id** | **String** | The workflow&#39;s id | |
1499
+ | **x_managed_user_id** | **String** | The id Widgetic gave the managed user (&#x60;POST /managed-users&#x60;). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user. | [optional] |
1500
+ | **x_managed_user_external_id** | **String** | Your own id for the managed user (its &#x60;externalId&#x60;), when you do not keep Widgetic&#39;s. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user. | [optional] |
1501
+
1502
+ ### Return type
1503
+
1504
+ [**SaveWorkspaceWorkflow200Response**](SaveWorkspaceWorkflow200Response.md)
1505
+
1506
+ ### Authorization
1507
+
1508
+ [apiKeyAuth](../README.md#apiKeyAuth)
1509
+
1510
+ ### HTTP request headers
1511
+
1512
+ - **Content-Type**: Not defined
1513
+ - **Accept**: application/json
1514
+
1515
+
1516
+ ## save_workspace_workflow_0
1517
+
1518
+ > <SaveWorkspaceWorkflow200Response> save_workspace_workflow_0(workspace_id, workflow_id, save_workspace_workflow_request, opts)
1519
+
1520
+ Save the Draft of a Workflow
1521
+
1522
+ Saves the name, the time zone and/or the graph of the draft. Send at least one. The save names the `revision` the editor started from and is refused with 409 (`BUSINESS_STATE_CONFLICT`) when the draft has moved on, so two people editing do not overwrite each other without knowing; read the workflow again and apply the change to it. A save is never refused for what is wrong with the graph (a block with no connection yet is normal in a draft): only the shape is judged here, and what stops a workflow going live is told when it is published. A graph larger than 200,000 bytes, or with more than 100 blocks or 300 connections, is refused. An archived workflow cannot be saved. Saving a live workflow changes the draft only: visitors keep getting the published version until the changes are published. For personal workspace, use 'personal' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can save.
1523
+
1524
+ ### Examples
1525
+
1526
+ ```ruby
1527
+ require 'time'
1528
+ require 'api-sdk-rb'
1529
+ # setup authorization
1530
+ ApiSdkRb.configure do |config|
1531
+ # Configure Bearer authorization (JWT): apiKeyAuth
1532
+ config.access_token = 'YOUR_BEARER_TOKEN'
1533
+ end
1534
+
1535
+ api_instance = ApiSdkRb::WorkflowsApi.new
1536
+ workspace_id = 'personal' # String | The workspace: 'personal' for your own workspace, or the UUID of an organization. A call made for one of your managed users (`X-Managed-User-Id`) always uses 'personal': a managed user has no other workspace, and a call that names an organization is refused with 403.
1537
+ workflow_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | The workflow's id
1538
+ save_workspace_workflow_request = ApiSdkRb::SaveWorkspaceWorkflowRequest.new({revision: 37}) # SaveWorkspaceWorkflowRequest |
1539
+ opts = {
1540
+ x_managed_user_id: '3f2b8c1e-7a4d-4e0b-9c55-2d1a6b7e8f90', # String | The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
1541
+ x_managed_user_external_id: 'customer-1042' # String | Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
1542
+ }
1543
+
1544
+ begin
1545
+ # Save the Draft of a Workflow
1546
+ result = api_instance.save_workspace_workflow_0(workspace_id, workflow_id, save_workspace_workflow_request, opts)
1547
+ p result
1548
+ rescue ApiSdkRb::ApiError => e
1549
+ puts "Error when calling WorkflowsApi->save_workspace_workflow_0: #{e}"
1550
+ end
1551
+ ```
1552
+
1553
+ #### Using the save_workspace_workflow_0_with_http_info variant
1554
+
1555
+ This returns an Array which contains the response data, status code and headers.
1556
+
1557
+ > <Array(<SaveWorkspaceWorkflow200Response>, Integer, Hash)> save_workspace_workflow_0_with_http_info(workspace_id, workflow_id, save_workspace_workflow_request, opts)
1558
+
1559
+ ```ruby
1560
+ begin
1561
+ # Save the Draft of a Workflow
1562
+ data, status_code, headers = api_instance.save_workspace_workflow_0_with_http_info(workspace_id, workflow_id, save_workspace_workflow_request, opts)
1563
+ p status_code # => 2xx
1564
+ p headers # => { ... }
1565
+ p data # => <SaveWorkspaceWorkflow200Response>
1566
+ rescue ApiSdkRb::ApiError => e
1567
+ puts "Error when calling WorkflowsApi->save_workspace_workflow_0_with_http_info: #{e}"
1568
+ end
1569
+ ```
1570
+
1571
+ ### Parameters
1572
+
1573
+ | Name | Type | Description | Notes |
1574
+ | ---- | ---- | ----------- | ----- |
1575
+ | **workspace_id** | **String** | The workspace: &#39;personal&#39; for your own workspace, or the UUID of an organization. A call made for one of your managed users (&#x60;X-Managed-User-Id&#x60;) always uses &#39;personal&#39;: a managed user has no other workspace, and a call that names an organization is refused with 403. | |
1576
+ | **workflow_id** | **String** | The workflow&#39;s id | |
1577
+ | **save_workspace_workflow_request** | [**SaveWorkspaceWorkflowRequest**](SaveWorkspaceWorkflowRequest.md) | | |
1578
+ | **x_managed_user_id** | **String** | The id Widgetic gave the managed user (&#x60;POST /managed-users&#x60;). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user. | [optional] |
1579
+ | **x_managed_user_external_id** | **String** | Your own id for the managed user (its &#x60;externalId&#x60;), when you do not keep Widgetic&#39;s. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user. | [optional] |
1580
+
1581
+ ### Return type
1582
+
1583
+ [**SaveWorkspaceWorkflow200Response**](SaveWorkspaceWorkflow200Response.md)
1584
+
1585
+ ### Authorization
1586
+
1587
+ [apiKeyAuth](../README.md#apiKeyAuth)
1588
+
1589
+ ### HTTP request headers
1590
+
1591
+ - **Content-Type**: application/json
1592
+ - **Accept**: application/json
1593
+
1594
+
1595
+ ## set_partner_workflow_preset_1
1596
+
1597
+ > <SetPartnerWorkflowPreset200Response> set_partner_workflow_preset_1(partner_id, key, offer_workflow_preset_request)
1598
+
1599
+ Offer a workflow as a place to start, or replace what a key offers
1600
+
1601
+ Offers one of the partner account's own published workflows to its managed users under `key`. If the partner already offers something under that key it is replaced, so sending the same request twice is safe. Saving replaces the whole starting point: a `title`, `description` or `position` you leave out goes back to its default. Keys are 1 to 64 characters: lowercase letters, digits, hyphens and underscores, the first a letter or a digit. A workflow is offered once. What people get is the workflow's live version as it is when they start, so publishing the workflow changes what new starts get; workflows people already started are never touched. The offer is refused, and `error.details.reason` says why, when the workflow: - is not the partner account's own (a workflow of a team or of a customer, or of somebody else), or does not exist: 404, the same for both; - is archived (409 `workflow_archived`), or was never published (409 `workflow_not_published`); - shows no composition (422 `workflow_empty`), or a block shows a composition made for a customer or a team (422 `composition_not_own`); - chains more than 10 widgets (422 `too_many_widgets`), or a widget that the partner does not offer as a preset (422 `widget_not_preset`; `error.details.widgets` lists them, each with its `id` and `name`, so they can be offered first with `setPartnerPreset`); - is already offered under another key (409 `workflow_already_offered`; `error.details.key` says which), or the partner already offers 50 (409 `too_many_presets`). The caller must be the person who administers the partner (an API key of that account works), or a Widgetic administrator, who offers the partner's workflow on its behalf.
1602
+
1603
+ ### Examples
1604
+
1605
+ ```ruby
1606
+ require 'time'
1607
+ require 'api-sdk-rb'
1608
+ # setup authorization
1609
+ ApiSdkRb.configure do |config|
1610
+ # Configure Bearer authorization (JWT): apiKeyAuth
1611
+ config.access_token = 'YOUR_BEARER_TOKEN'
1612
+ end
1613
+
1614
+ api_instance = ApiSdkRb::WorkflowsApi.new
1615
+ partner_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | The partner whose starting point to set
1616
+ key = 'key_example' # String | The name your code and the picker use for the starting point
1617
+ offer_workflow_preset_request = ApiSdkRb::OfferWorkflowPresetRequest.new({workflow_id: 'workflow_id_example'}) # OfferWorkflowPresetRequest |
1618
+
1619
+ begin
1620
+ # Offer a workflow as a place to start, or replace what a key offers
1621
+ result = api_instance.set_partner_workflow_preset_1(partner_id, key, offer_workflow_preset_request)
1622
+ p result
1623
+ rescue ApiSdkRb::ApiError => e
1624
+ puts "Error when calling WorkflowsApi->set_partner_workflow_preset_1: #{e}"
1625
+ end
1626
+ ```
1627
+
1628
+ #### Using the set_partner_workflow_preset_1_with_http_info variant
1629
+
1630
+ This returns an Array which contains the response data, status code and headers.
1631
+
1632
+ > <Array(<SetPartnerWorkflowPreset200Response>, Integer, Hash)> set_partner_workflow_preset_1_with_http_info(partner_id, key, offer_workflow_preset_request)
1633
+
1634
+ ```ruby
1635
+ begin
1636
+ # Offer a workflow as a place to start, or replace what a key offers
1637
+ data, status_code, headers = api_instance.set_partner_workflow_preset_1_with_http_info(partner_id, key, offer_workflow_preset_request)
1638
+ p status_code # => 2xx
1639
+ p headers # => { ... }
1640
+ p data # => <SetPartnerWorkflowPreset200Response>
1641
+ rescue ApiSdkRb::ApiError => e
1642
+ puts "Error when calling WorkflowsApi->set_partner_workflow_preset_1_with_http_info: #{e}"
1643
+ end
1644
+ ```
1645
+
1646
+ ### Parameters
1647
+
1648
+ | Name | Type | Description | Notes |
1649
+ | ---- | ---- | ----------- | ----- |
1650
+ | **partner_id** | **String** | The partner whose starting point to set | |
1651
+ | **key** | **String** | The name your code and the picker use for the starting point | |
1652
+ | **offer_workflow_preset_request** | [**OfferWorkflowPresetRequest**](OfferWorkflowPresetRequest.md) | | |
1653
+
1654
+ ### Return type
1655
+
1656
+ [**SetPartnerWorkflowPreset200Response**](SetPartnerWorkflowPreset200Response.md)
1657
+
1658
+ ### Authorization
1659
+
1660
+ [apiKeyAuth](../README.md#apiKeyAuth)
1661
+
1662
+ ### HTTP request headers
1663
+
1664
+ - **Content-Type**: application/json
1665
+ - **Accept**: application/json
1666
+
1667
+
1668
+ ## unarchive_workspace_workflow_0
1669
+
1670
+ > <SaveWorkspaceWorkflow200Response> unarchive_workspace_workflow_0(workspace_id, workflow_id, opts)
1671
+
1672
+ Unarchive a Workflow
1673
+
1674
+ Brings an archived workflow back into the list: as paused when it was ever published (resume it to serve visitors again), as a draft when it never was. For personal workspace, use 'personal' as workspaceId. For organization workspace, use the organization UUID as workspaceId. Any active member can unarchive.
1675
+
1676
+ ### Examples
1677
+
1678
+ ```ruby
1679
+ require 'time'
1680
+ require 'api-sdk-rb'
1681
+ # setup authorization
1682
+ ApiSdkRb.configure do |config|
1683
+ # Configure Bearer authorization (JWT): apiKeyAuth
1684
+ config.access_token = 'YOUR_BEARER_TOKEN'
1685
+ end
1686
+
1687
+ api_instance = ApiSdkRb::WorkflowsApi.new
1688
+ workspace_id = 'personal' # String | The workspace: 'personal' for your own workspace, or the UUID of an organization. A call made for one of your managed users (`X-Managed-User-Id`) always uses 'personal': a managed user has no other workspace, and a call that names an organization is refused with 403.
1689
+ workflow_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | The workflow's id
1690
+ opts = {
1691
+ x_managed_user_id: '3f2b8c1e-7a4d-4e0b-9c55-2d1a6b7e8f90', # String | The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
1692
+ x_managed_user_external_id: 'customer-1042' # String | Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers `404` (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers `404` with `MANAGED_USER_NOT_FOUND`. An empty, repeated or malformed header is `400` with `MANAGED_USER_SCOPE_INVALID`; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with `403` and `MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE`: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An `Idempotency-Key` is kept apart for each managed user.
1693
+ }
1694
+
1695
+ begin
1696
+ # Unarchive a Workflow
1697
+ result = api_instance.unarchive_workspace_workflow_0(workspace_id, workflow_id, opts)
1698
+ p result
1699
+ rescue ApiSdkRb::ApiError => e
1700
+ puts "Error when calling WorkflowsApi->unarchive_workspace_workflow_0: #{e}"
1701
+ end
1702
+ ```
1703
+
1704
+ #### Using the unarchive_workspace_workflow_0_with_http_info variant
1705
+
1706
+ This returns an Array which contains the response data, status code and headers.
1707
+
1708
+ > <Array(<SaveWorkspaceWorkflow200Response>, Integer, Hash)> unarchive_workspace_workflow_0_with_http_info(workspace_id, workflow_id, opts)
1709
+
1710
+ ```ruby
1711
+ begin
1712
+ # Unarchive a Workflow
1713
+ data, status_code, headers = api_instance.unarchive_workspace_workflow_0_with_http_info(workspace_id, workflow_id, opts)
1714
+ p status_code # => 2xx
1715
+ p headers # => { ... }
1716
+ p data # => <SaveWorkspaceWorkflow200Response>
1717
+ rescue ApiSdkRb::ApiError => e
1718
+ puts "Error when calling WorkflowsApi->unarchive_workspace_workflow_0_with_http_info: #{e}"
1719
+ end
1720
+ ```
1721
+
1722
+ ### Parameters
1723
+
1724
+ | Name | Type | Description | Notes |
1725
+ | ---- | ---- | ----------- | ----- |
1726
+ | **workspace_id** | **String** | The workspace: &#39;personal&#39; for your own workspace, or the UUID of an organization. A call made for one of your managed users (&#x60;X-Managed-User-Id&#x60;) always uses &#39;personal&#39;: a managed user has no other workspace, and a call that names an organization is refused with 403. | |
1727
+ | **workflow_id** | **String** | The workflow&#39;s id | |
1728
+ | **x_managed_user_id** | **String** | The id Widgetic gave the managed user (&#x60;POST /managed-users&#x60;). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user. | [optional] |
1729
+ | **x_managed_user_external_id** | **String** | Your own id for the managed user (its &#x60;externalId&#x60;), when you do not keep Widgetic&#39;s. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer&#39;s work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user&#39;s compositions and workflows: a list shows only theirs, a composition or a workflow the call makes is filed under them, and one of another user, or one that does not exist, answers &#x60;404&#x60; (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers &#x60;404&#x60; with &#x60;MANAGED_USER_NOT_FOUND&#x60;. An empty, repeated or malformed header is &#x60;400&#x60; with &#x60;MANAGED_USER_SCOPE_INVALID&#x60;; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with &#x60;403&#x60; and &#x60;MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE&#x60;: send it without the header. Only your API key can send it. The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer&#39;s browser holds, use an editor session. An &#x60;Idempotency-Key&#x60; is kept apart for each managed user. | [optional] |
1730
+
1731
+ ### Return type
1732
+
1733
+ [**SaveWorkspaceWorkflow200Response**](SaveWorkspaceWorkflow200Response.md)
1734
+
1735
+ ### Authorization
1736
+
1737
+ [apiKeyAuth](../README.md#apiKeyAuth)
1738
+
1739
+ ### HTTP request headers
1740
+
1741
+ - **Content-Type**: Not defined
1742
+ - **Accept**: application/json
1743
+