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.
- checksums.yaml +4 -4
- data/README.md +192 -9
- data/docs/AdapterConnection.md +7 -1
- data/docs/BrandColor.md +22 -0
- data/docs/BrandFont.md +24 -0
- data/docs/BrandKitApi.md +593 -0
- data/docs/BrandKitAssetView.md +42 -0
- data/docs/BrandKitFigmaSource.md +26 -0
- data/docs/BrandKitTokens.md +24 -0
- data/docs/BrandKitTokensFonts.md +24 -0
- data/docs/BrandKitView.md +36 -0
- data/docs/BrandKitViewOwner.md +20 -0
- data/docs/BrandKitViewResponse.md +22 -0
- data/docs/BrandSpacing.md +32 -0
- data/docs/Composition.md +5 -1
- data/docs/CompositionLastEditedBy.md +20 -0
- data/docs/CompositionsApi.md +217 -135
- data/docs/ConfirmAdapterConnectionRequest.md +18 -0
- data/docs/CreateWidget201ResponseData.md +2 -4
- data/docs/CreateWorkspaceWorkflowFromPreset201Response.md +22 -0
- data/docs/CreateWorkspaceWorkflowFromPresetRequest.md +20 -0
- data/docs/CreateWorkspaceWorkflowRequest.md +22 -0
- data/docs/DeleteWorkspaceWorkflow200Response.md +22 -0
- data/docs/GetPublicCompositionEmbed200Response.md +7 -1
- data/docs/GetPublicCompositionEmbed200ResponseAdapters.md +20 -0
- data/docs/GetPublicCompositionEmbed200ResponseAdaptersCaptcha.md +18 -0
- data/docs/GetPublicCompositionEmbed200ResponseEntries.md +20 -0
- data/docs/GetPublicCompositionEmbed200ResponseMedia.md +18 -0
- data/docs/GetPublicWorkflow200Response.md +22 -0
- data/docs/GetWorkspaceWorkflowStats200Response.md +22 -0
- data/docs/GetWorkspaceWorkflowVersion200Response.md +22 -0
- data/docs/ListPartnerWorkflowPresets200Response.md +22 -0
- data/docs/ListWorkspaceWorkflowCompositionOptions200Response.md +22 -0
- data/docs/ListWorkspaceWorkflowPresets200Response.md +22 -0
- data/docs/ListWorkspaceWorkflowVersions200Response.md +22 -0
- data/docs/ListWorkspaceWorkflows200Response.md +22 -0
- data/docs/ManagedUsersApi.md +1 -1
- data/docs/NewComposition.md +1 -1
- data/docs/NewEditorSession.md +1 -1
- data/docs/OfferWorkflowPresetRequest.md +24 -0
- data/docs/OfferedWorkflowPreset.md +40 -0
- data/docs/OfferedWorkflowPresetList.md +18 -0
- data/docs/OfferedWorkflowPresetWidget.md +22 -0
- data/docs/PartnerApi.md +3360 -538
- data/docs/PartnerCustomization.md +2 -2
- data/docs/PartnerNotification.md +1 -1
- data/docs/PartnersApi.md +294 -2
- data/docs/PatchBrandKitAssetRequest.md +24 -0
- data/docs/PatchBrandKitRequest.md +28 -0
- data/docs/PatchBrandKitRequestFonts.md +24 -0
- data/docs/PatchBrandKitRequestSpacing.md +32 -0
- data/docs/PostBrandKitIconRequest.md +20 -0
- data/docs/PublicEmbedApi.md +270 -4
- data/docs/PublicWorkflow.md +36 -0
- data/docs/PublicWorkflowEventsAccepted.md +22 -0
- data/docs/PublicWorkflowEventsRequest.md +24 -0
- data/docs/PublicWorkflowEventsRequestEventsInner.md +22 -0
- data/docs/PublicWorkflowEventsRequestHeightsInner.md +20 -0
- data/docs/PublicWorkflowTranslation.md +20 -0
- data/docs/PublishWorkspaceWorkflow200Response.md +22 -0
- data/docs/PublishWorkspaceWorkflowRequest.md +18 -0
- data/docs/PutBrandKitRequest.md +22 -0
- data/docs/RemovePartnerWorkflowPreset200Response.md +22 -0
- data/docs/ReportPublicWorkflowEvents200Response.md +22 -0
- data/docs/SaveWorkspaceWorkflow200Response.md +22 -0
- data/docs/SaveWorkspaceWorkflowRequest.md +24 -0
- data/docs/SetAdapterConnectionRequest.md +1 -1
- data/docs/SetPartnerWorkflowPreset200Response.md +22 -0
- data/docs/UpdateComposition.md +1 -1
- data/docs/UsersApi.md +77 -1
- data/docs/Widget.md +2 -4
- data/docs/Workflow.md +50 -0
- data/docs/WorkflowCompositionAction.md +24 -0
- data/docs/WorkflowCompositionField.md +24 -0
- data/docs/WorkflowCompositionOption.md +30 -0
- data/docs/WorkflowCompositionOptionActions.md +22 -0
- data/docs/WorkflowCompositionOptionInputs.md +24 -0
- data/docs/WorkflowCompositionOptions.md +24 -0
- data/docs/WorkflowConditionCase.md +24 -0
- data/docs/WorkflowConditionTest.md +22 -0
- data/docs/WorkflowCounter.md +20 -0
- data/docs/WorkflowDetail.md +60 -0
- data/docs/WorkflowDetailAllOfLastEditedBy.md +20 -0
- data/docs/WorkflowEdge.md +24 -0
- data/docs/WorkflowFieldReference.md +22 -0
- data/docs/WorkflowGraph.md +22 -0
- data/docs/WorkflowIssue.md +28 -0
- data/docs/WorkflowList.md +24 -0
- data/docs/WorkflowNode.md +30 -0
- data/docs/WorkflowNodePosition.md +20 -0
- data/docs/WorkflowPresetChoice.md +26 -0
- data/docs/WorkflowPresetChoices.md +18 -0
- data/docs/WorkflowPresetRemoval.md +18 -0
- data/docs/WorkflowPresetWidget.md +20 -0
- data/docs/WorkflowPublishResult.md +22 -0
- data/docs/WorkflowRemoved.md +18 -0
- data/docs/WorkflowSchedule.md +24 -0
- data/docs/WorkflowStats.md +32 -0
- data/docs/WorkflowStatus.md +15 -0
- data/docs/WorkflowTrigger.md +28 -0
- data/docs/WorkflowTriggerValuesInner.md +20 -0
- data/docs/WorkflowVersion.md +28 -0
- data/docs/WorkflowVersionDetail.md +32 -0
- data/docs/WorkflowVersionList.md +18 -0
- data/docs/WorkflowVersionPublishedBy.md +20 -0
- data/docs/WorkflowsApi.md +1743 -0
- data/docs/WorkspacesApi.md +1527 -0
- data/lib/api-sdk-rb/api/brand_kit_api.rb +581 -0
- data/lib/api-sdk-rb/api/compositions_api.rb +237 -138
- data/lib/api-sdk-rb/api/managed_users_api.rb +2 -2
- data/lib/api-sdk-rb/api/partner_api.rb +3907 -809
- data/lib/api-sdk-rb/api/partners_api.rb +320 -4
- data/lib/api-sdk-rb/api/public_embed_api.rb +283 -6
- data/lib/api-sdk-rb/api/users_api.rb +96 -2
- data/lib/api-sdk-rb/api/workflows_api.rb +1997 -0
- data/lib/api-sdk-rb/api/workspaces_api.rb +1775 -0
- data/lib/api-sdk-rb/configuration.rb +50 -2
- data/lib/api-sdk-rb/models/adapter_connection.rb +48 -5
- data/lib/api-sdk-rb/models/brand_color.rb +329 -0
- data/lib/api-sdk-rb/models/brand_font.rb +357 -0
- data/lib/api-sdk-rb/models/brand_kit_asset_view.rb +409 -0
- data/lib/api-sdk-rb/models/brand_kit_figma_source.rb +277 -0
- data/lib/api-sdk-rb/models/brand_kit_tokens.rb +304 -0
- data/lib/api-sdk-rb/models/brand_kit_tokens_fonts.rb +241 -0
- data/lib/api-sdk-rb/models/brand_kit_view.rb +344 -0
- data/lib/api-sdk-rb/models/brand_kit_view_owner.rb +267 -0
- data/lib/api-sdk-rb/models/brand_kit_view_response.rb +247 -0
- data/lib/api-sdk-rb/models/brand_spacing.rb +557 -0
- data/lib/api-sdk-rb/models/composition.rb +26 -5
- data/lib/api-sdk-rb/models/composition_last_edited_by.rb +242 -0
- data/lib/api-sdk-rb/models/confirm_adapter_connection_request.rb +241 -0
- data/lib/api-sdk-rb/models/create_widget201_response_data.rb +9 -20
- data/lib/api-sdk-rb/models/create_workspace_workflow_from_preset201_response.rb +246 -0
- data/lib/api-sdk-rb/models/create_workspace_workflow_from_preset_request.rb +278 -0
- data/lib/api-sdk-rb/models/create_workspace_workflow_request.rb +271 -0
- data/lib/api-sdk-rb/models/delete_workspace_workflow200_response.rb +246 -0
- data/lib/api-sdk-rb/models/get_public_composition_embed200_response.rb +29 -2
- data/lib/api-sdk-rb/models/get_public_composition_embed200_response_adapters.rb +225 -0
- data/lib/api-sdk-rb/models/get_public_composition_embed200_response_adapters_captcha.rb +216 -0
- data/lib/api-sdk-rb/models/get_public_composition_embed200_response_entries.rb +224 -0
- data/lib/api-sdk-rb/models/get_public_composition_embed200_response_media.rb +216 -0
- data/lib/api-sdk-rb/models/get_public_workflow200_response.rb +246 -0
- data/lib/api-sdk-rb/models/get_workspace_workflow_stats200_response.rb +246 -0
- data/lib/api-sdk-rb/models/get_workspace_workflow_version200_response.rb +246 -0
- data/lib/api-sdk-rb/models/list_partner_workflow_presets200_response.rb +246 -0
- data/lib/api-sdk-rb/models/list_workspace_workflow_composition_options200_response.rb +246 -0
- data/lib/api-sdk-rb/models/list_workspace_workflow_presets200_response.rb +246 -0
- data/lib/api-sdk-rb/models/list_workspace_workflow_versions200_response.rb +246 -0
- data/lib/api-sdk-rb/models/list_workspace_workflows200_response.rb +246 -0
- data/lib/api-sdk-rb/models/new_composition.rb +1 -1
- data/lib/api-sdk-rb/models/new_editor_session.rb +1 -1
- data/lib/api-sdk-rb/models/offer_workflow_preset_request.rb +322 -0
- data/lib/api-sdk-rb/models/offered_workflow_preset.rb +423 -0
- data/lib/api-sdk-rb/models/offered_workflow_preset_list.rb +223 -0
- data/lib/api-sdk-rb/models/offered_workflow_preset_widget.rb +251 -0
- data/lib/api-sdk-rb/models/partner_notification.rb +1 -1
- data/lib/api-sdk-rb/models/partner_notification_event_type.rb +5 -1
- data/lib/api-sdk-rb/models/patch_brand_kit_asset_request.rb +289 -0
- data/lib/api-sdk-rb/models/patch_brand_kit_request.rb +332 -0
- data/lib/api-sdk-rb/models/patch_brand_kit_request_fonts.rb +242 -0
- data/lib/api-sdk-rb/models/patch_brand_kit_request_spacing.rb +502 -0
- data/lib/api-sdk-rb/models/post_brand_kit_icon_request.rb +237 -0
- data/lib/api-sdk-rb/models/public_workflow.rb +351 -0
- data/lib/api-sdk-rb/models/public_workflow_events_accepted.rb +242 -0
- data/lib/api-sdk-rb/models/public_workflow_events_request.rb +301 -0
- data/lib/api-sdk-rb/models/public_workflow_events_request_events_inner.rb +332 -0
- data/lib/api-sdk-rb/models/public_workflow_events_request_heights_inner.rb +267 -0
- data/lib/api-sdk-rb/models/public_workflow_translation.rb +242 -0
- data/lib/api-sdk-rb/models/publish_workspace_workflow200_response.rb +246 -0
- data/lib/api-sdk-rb/models/publish_workspace_workflow_request.rb +240 -0
- data/lib/api-sdk-rb/models/put_brand_kit_request.rb +239 -0
- data/lib/api-sdk-rb/models/remove_partner_workflow_preset200_response.rb +246 -0
- data/lib/api-sdk-rb/models/report_public_workflow_events200_response.rb +246 -0
- data/lib/api-sdk-rb/models/save_workspace_workflow200_response.rb +246 -0
- data/lib/api-sdk-rb/models/save_workspace_workflow_request.rb +296 -0
- data/lib/api-sdk-rb/models/set_adapter_connection_request.rb +1 -1
- data/lib/api-sdk-rb/models/set_partner_workflow_preset200_response.rb +246 -0
- data/lib/api-sdk-rb/models/update_composition.rb +1 -1
- data/lib/api-sdk-rb/models/widget.rb +9 -20
- data/lib/api-sdk-rb/models/workflow.rb +509 -0
- data/lib/api-sdk-rb/models/workflow_composition_action.rb +266 -0
- data/lib/api-sdk-rb/models/workflow_composition_field.rb +303 -0
- data/lib/api-sdk-rb/models/workflow_composition_option.rb +316 -0
- data/lib/api-sdk-rb/models/workflow_composition_option_actions.rb +284 -0
- data/lib/api-sdk-rb/models/workflow_composition_option_inputs.rb +304 -0
- data/lib/api-sdk-rb/models/workflow_composition_options.rb +271 -0
- data/lib/api-sdk-rb/models/workflow_condition_case.rb +322 -0
- data/lib/api-sdk-rb/models/workflow_condition_test.rb +284 -0
- data/lib/api-sdk-rb/models/workflow_counter.rb +238 -0
- data/lib/api-sdk-rb/models/workflow_detail.rb +580 -0
- data/lib/api-sdk-rb/models/workflow_detail_all_of_last_edited_by.rb +242 -0
- data/lib/api-sdk-rb/models/workflow_edge.rb +292 -0
- data/lib/api-sdk-rb/models/workflow_field_reference.rb +300 -0
- data/lib/api-sdk-rb/models/workflow_graph.rb +330 -0
- data/lib/api-sdk-rb/models/workflow_issue.rb +309 -0
- data/lib/api-sdk-rb/models/workflow_list.rb +271 -0
- data/lib/api-sdk-rb/models/workflow_node.rb +343 -0
- data/lib/api-sdk-rb/models/workflow_node_position.rb +238 -0
- data/lib/api-sdk-rb/models/workflow_preset_choice.rb +288 -0
- data/lib/api-sdk-rb/models/workflow_preset_choices.rb +224 -0
- data/lib/api-sdk-rb/models/workflow_preset_removal.rb +222 -0
- data/lib/api-sdk-rb/models/workflow_preset_widget.rb +234 -0
- data/lib/api-sdk-rb/models/workflow_publish_result.rb +256 -0
- data/lib/api-sdk-rb/models/workflow_removed.rb +221 -0
- data/lib/api-sdk-rb/models/workflow_schedule.rb +298 -0
- data/lib/api-sdk-rb/models/workflow_stats.rb +335 -0
- data/lib/api-sdk-rb/models/workflow_status.rb +42 -0
- data/lib/api-sdk-rb/models/workflow_trigger.rb +303 -0
- data/lib/api-sdk-rb/models/workflow_trigger_values_inner.rb +271 -0
- data/lib/api-sdk-rb/models/workflow_version.rb +316 -0
- data/lib/api-sdk-rb/models/workflow_version_detail.rb +354 -0
- data/lib/api-sdk-rb/models/workflow_version_list.rb +224 -0
- data/lib/api-sdk-rb/models/workflow_version_published_by.rb +225 -0
- data/lib/api-sdk-rb/version.rb +1 -1
- data/lib/api-sdk-rb.rb +88 -0
- data/spec/api/brand_kit_api_spec.rb +136 -0
- data/spec/api/compositions_api_spec.rb +86 -69
- data/spec/api/managed_users_api_spec.rb +1 -1
- data/spec/api/partner_api_spec.rb +624 -82
- data/spec/api/partners_api_spec.rb +56 -2
- data/spec/api/public_embed_api_spec.rb +54 -3
- data/spec/api/users_api_spec.rb +16 -1
- data/spec/api/workflows_api_spec.rb +378 -0
- data/spec/api/workspaces_api_spec.rb +339 -0
- data/spec/models/adapter_connection_spec.rb +18 -0
- data/spec/models/brand_color_spec.rb +52 -0
- data/spec/models/brand_font_spec.rb +62 -0
- data/spec/models/brand_kit_asset_view_spec.rb +120 -0
- data/spec/models/brand_kit_figma_source_spec.rb +60 -0
- data/spec/models/brand_kit_tokens_fonts_spec.rb +54 -0
- data/spec/models/brand_kit_tokens_spec.rb +54 -0
- data/spec/models/brand_kit_view_owner_spec.rb +46 -0
- data/spec/models/brand_kit_view_response_spec.rb +48 -0
- data/spec/models/brand_kit_view_spec.rb +90 -0
- data/spec/models/brand_spacing_spec.rb +78 -0
- data/spec/models/composition_last_edited_by_spec.rb +42 -0
- data/spec/models/composition_spec.rb +12 -0
- data/spec/models/confirm_adapter_connection_request_spec.rb +36 -0
- data/spec/models/create_widget201_response_data_spec.rb +1 -7
- data/spec/models/create_workspace_workflow_from_preset201_response_spec.rb +48 -0
- data/spec/models/create_workspace_workflow_from_preset_request_spec.rb +42 -0
- data/spec/models/create_workspace_workflow_request_spec.rb +48 -0
- data/spec/models/delete_workspace_workflow200_response_spec.rb +48 -0
- data/spec/models/editor_session_spec.rb +1 -1
- data/spec/models/get_public_composition_embed200_response_adapters_captcha_spec.rb +36 -0
- data/spec/models/get_public_composition_embed200_response_adapters_spec.rb +42 -0
- data/spec/models/get_public_composition_embed200_response_entries_spec.rb +42 -0
- data/spec/models/get_public_composition_embed200_response_media_spec.rb +36 -0
- data/spec/models/get_public_composition_embed200_response_spec.rb +18 -0
- data/spec/models/get_public_workflow200_response_spec.rb +48 -0
- data/spec/models/get_workspace_workflow_stats200_response_spec.rb +48 -0
- data/spec/models/get_workspace_workflow_version200_response_spec.rb +48 -0
- data/spec/models/list_partner_workflow_presets200_response_spec.rb +48 -0
- data/spec/models/list_workspace_workflow_composition_options200_response_spec.rb +48 -0
- data/spec/models/list_workspace_workflow_presets200_response_spec.rb +48 -0
- data/spec/models/list_workspace_workflow_versions200_response_spec.rb +48 -0
- data/spec/models/list_workspace_workflows200_response_spec.rb +48 -0
- data/spec/models/new_editor_session_spec.rb +1 -1
- data/spec/models/offer_workflow_preset_request_spec.rb +54 -0
- data/spec/models/offered_workflow_preset_list_spec.rb +36 -0
- data/spec/models/offered_workflow_preset_spec.rb +106 -0
- data/spec/models/offered_workflow_preset_widget_spec.rb +48 -0
- data/spec/models/patch_brand_kit_asset_request_spec.rb +62 -0
- data/spec/models/patch_brand_kit_request_fonts_spec.rb +54 -0
- data/spec/models/patch_brand_kit_request_spacing_spec.rb +78 -0
- data/spec/models/patch_brand_kit_request_spec.rb +66 -0
- data/spec/models/post_brand_kit_icon_request_spec.rb +42 -0
- data/spec/models/public_workflow_events_accepted_spec.rb +48 -0
- data/spec/models/public_workflow_events_request_events_inner_spec.rb +52 -0
- data/spec/models/public_workflow_events_request_heights_inner_spec.rb +42 -0
- data/spec/models/public_workflow_events_request_spec.rb +54 -0
- data/spec/models/public_workflow_spec.rb +94 -0
- data/spec/models/public_workflow_translation_spec.rb +42 -0
- data/spec/models/publish_workspace_workflow200_response_spec.rb +48 -0
- data/spec/models/publish_workspace_workflow_request_spec.rb +36 -0
- data/spec/models/put_brand_kit_request_spec.rb +48 -0
- data/spec/models/remove_partner_workflow_preset200_response_spec.rb +48 -0
- data/spec/models/report_public_workflow_events200_response_spec.rb +48 -0
- data/spec/models/save_workspace_workflow200_response_spec.rb +48 -0
- data/spec/models/save_workspace_workflow_request_spec.rb +54 -0
- data/spec/models/set_partner_workflow_preset200_response_spec.rb +48 -0
- data/spec/models/widget_spec.rb +1 -7
- data/spec/models/workflow_composition_action_spec.rb +54 -0
- data/spec/models/workflow_composition_field_spec.rb +58 -0
- data/spec/models/workflow_composition_option_actions_spec.rb +52 -0
- data/spec/models/workflow_composition_option_inputs_spec.rb +58 -0
- data/spec/models/workflow_composition_option_spec.rb +72 -0
- data/spec/models/workflow_composition_options_spec.rb +54 -0
- data/spec/models/workflow_condition_case_spec.rb +58 -0
- data/spec/models/workflow_condition_test_spec.rb +52 -0
- data/spec/models/workflow_counter_spec.rb +42 -0
- data/spec/models/workflow_detail_all_of_last_edited_by_spec.rb +42 -0
- data/spec/models/workflow_detail_spec.rb +162 -0
- data/spec/models/workflow_edge_spec.rb +54 -0
- data/spec/models/workflow_field_reference_spec.rb +56 -0
- data/spec/models/workflow_graph_spec.rb +52 -0
- data/spec/models/workflow_issue_spec.rb +70 -0
- data/spec/models/workflow_list_spec.rb +54 -0
- data/spec/models/workflow_node_position_spec.rb +42 -0
- data/spec/models/workflow_node_spec.rb +76 -0
- data/spec/models/workflow_preset_choice_spec.rb +60 -0
- data/spec/models/workflow_preset_choices_spec.rb +36 -0
- data/spec/models/workflow_preset_removal_spec.rb +36 -0
- data/spec/models/workflow_preset_widget_spec.rb +42 -0
- data/spec/models/workflow_publish_result_spec.rb +48 -0
- data/spec/models/workflow_removed_spec.rb +36 -0
- data/spec/models/workflow_schedule_spec.rb +62 -0
- data/spec/models/workflow_spec.rb +132 -0
- data/spec/models/workflow_stats_spec.rb +78 -0
- data/spec/models/workflow_status_spec.rb +30 -0
- data/spec/models/workflow_trigger_spec.rb +70 -0
- data/spec/models/workflow_trigger_values_inner_spec.rb +46 -0
- data/spec/models/workflow_version_detail_spec.rb +78 -0
- data/spec/models/workflow_version_list_spec.rb +36 -0
- data/spec/models/workflow_version_published_by_spec.rb +42 -0
- data/spec/models/workflow_version_spec.rb +66 -0
- metadata +364 -12
|
@@ -0,0 +1,1775 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Widgetic API Gateway
|
|
3
|
+
|
|
4
|
+
#API documentation for the Widgetic API Gateway
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.9.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module ApiSdkRb
|
|
16
|
+
class WorkspacesApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Archive a Workflow
|
|
23
|
+
# 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.
|
|
24
|
+
# @param workspace_id [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.
|
|
25
|
+
# @param workflow_id [String] The workflow's id
|
|
26
|
+
# @param [Hash] opts the optional parameters
|
|
27
|
+
# @option opts [String] :x_managed_user_id 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.
|
|
28
|
+
# @option opts [String] :x_managed_user_external_id 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.
|
|
29
|
+
# @return [SaveWorkspaceWorkflow200Response]
|
|
30
|
+
def archive_workspace_workflow_1(workspace_id, workflow_id, opts = {})
|
|
31
|
+
data, _status_code, _headers = archive_workspace_workflow_1_with_http_info(workspace_id, workflow_id, opts)
|
|
32
|
+
data
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# Archive a Workflow
|
|
36
|
+
# 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.
|
|
37
|
+
# @param workspace_id [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.
|
|
38
|
+
# @param workflow_id [String] The workflow's id
|
|
39
|
+
# @param [Hash] opts the optional parameters
|
|
40
|
+
# @option opts [String] :x_managed_user_id 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.
|
|
41
|
+
# @option opts [String] :x_managed_user_external_id 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.
|
|
42
|
+
# @return [Array<(SaveWorkspaceWorkflow200Response, Integer, Hash)>] SaveWorkspaceWorkflow200Response data, response status code and response headers
|
|
43
|
+
def archive_workspace_workflow_1_with_http_info(workspace_id, workflow_id, opts = {})
|
|
44
|
+
if @api_client.config.debugging
|
|
45
|
+
@api_client.config.logger.debug 'Calling API: WorkspacesApi.archive_workspace_workflow_1 ...'
|
|
46
|
+
end
|
|
47
|
+
# verify the required parameter 'workspace_id' is set
|
|
48
|
+
if @api_client.config.client_side_validation && workspace_id.nil?
|
|
49
|
+
fail ArgumentError, "Missing the required parameter 'workspace_id' when calling WorkspacesApi.archive_workspace_workflow_1"
|
|
50
|
+
end
|
|
51
|
+
# verify the required parameter 'workflow_id' is set
|
|
52
|
+
if @api_client.config.client_side_validation && workflow_id.nil?
|
|
53
|
+
fail ArgumentError, "Missing the required parameter 'workflow_id' when calling WorkspacesApi.archive_workspace_workflow_1"
|
|
54
|
+
end
|
|
55
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length > 255
|
|
56
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling WorkspacesApi.archive_workspace_workflow_1, the character length must be smaller than or equal to 255.'
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length < 1
|
|
60
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling WorkspacesApi.archive_workspace_workflow_1, the character length must be great than or equal to 1.'
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# resource path
|
|
64
|
+
local_var_path = '/workspaces/{workspaceId}/workflows/{workflowId}/archive'.sub('{' + 'workspaceId' + '}', CGI.escape(workspace_id.to_s)).sub('{' + 'workflowId' + '}', CGI.escape(workflow_id.to_s))
|
|
65
|
+
|
|
66
|
+
# query parameters
|
|
67
|
+
query_params = opts[:query_params] || {}
|
|
68
|
+
|
|
69
|
+
# header parameters
|
|
70
|
+
header_params = opts[:header_params] || {}
|
|
71
|
+
# HTTP header 'Accept' (if needed)
|
|
72
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
73
|
+
header_params[:'X-Managed-User-Id'] = opts[:'x_managed_user_id'] if !opts[:'x_managed_user_id'].nil?
|
|
74
|
+
header_params[:'X-Managed-User-External-Id'] = opts[:'x_managed_user_external_id'] if !opts[:'x_managed_user_external_id'].nil?
|
|
75
|
+
|
|
76
|
+
# form parameters
|
|
77
|
+
form_params = opts[:form_params] || {}
|
|
78
|
+
|
|
79
|
+
# http body (model)
|
|
80
|
+
post_body = opts[:debug_body]
|
|
81
|
+
|
|
82
|
+
# return_type
|
|
83
|
+
return_type = opts[:debug_return_type] || 'SaveWorkspaceWorkflow200Response'
|
|
84
|
+
|
|
85
|
+
# auth_names
|
|
86
|
+
auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
|
|
87
|
+
|
|
88
|
+
new_options = opts.merge(
|
|
89
|
+
:operation => :"WorkspacesApi.archive_workspace_workflow_1",
|
|
90
|
+
:header_params => header_params,
|
|
91
|
+
:query_params => query_params,
|
|
92
|
+
:form_params => form_params,
|
|
93
|
+
:body => post_body,
|
|
94
|
+
:auth_names => auth_names,
|
|
95
|
+
:return_type => return_type
|
|
96
|
+
)
|
|
97
|
+
|
|
98
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
99
|
+
if @api_client.config.debugging
|
|
100
|
+
@api_client.config.logger.debug "API called: WorkspacesApi#archive_workspace_workflow_1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
101
|
+
end
|
|
102
|
+
return data, status_code, headers
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# Create a Workflow
|
|
106
|
+
# 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.
|
|
107
|
+
# @param workspace_id [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.
|
|
108
|
+
# @param idempotency_key [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`).
|
|
109
|
+
# @param create_workspace_workflow_request [CreateWorkspaceWorkflowRequest]
|
|
110
|
+
# @param [Hash] opts the optional parameters
|
|
111
|
+
# @option opts [String] :x_managed_user_id 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.
|
|
112
|
+
# @option opts [String] :x_managed_user_external_id 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.
|
|
113
|
+
# @return [CreateWorkspaceWorkflowFromPreset201Response]
|
|
114
|
+
def create_workspace_workflow_1(workspace_id, idempotency_key, create_workspace_workflow_request, opts = {})
|
|
115
|
+
data, _status_code, _headers = create_workspace_workflow_1_with_http_info(workspace_id, idempotency_key, create_workspace_workflow_request, opts)
|
|
116
|
+
data
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
# Create a Workflow
|
|
120
|
+
# 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.
|
|
121
|
+
# @param workspace_id [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.
|
|
122
|
+
# @param idempotency_key [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`).
|
|
123
|
+
# @param create_workspace_workflow_request [CreateWorkspaceWorkflowRequest]
|
|
124
|
+
# @param [Hash] opts the optional parameters
|
|
125
|
+
# @option opts [String] :x_managed_user_id 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.
|
|
126
|
+
# @option opts [String] :x_managed_user_external_id 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.
|
|
127
|
+
# @return [Array<(CreateWorkspaceWorkflowFromPreset201Response, Integer, Hash)>] CreateWorkspaceWorkflowFromPreset201Response data, response status code and response headers
|
|
128
|
+
def create_workspace_workflow_1_with_http_info(workspace_id, idempotency_key, create_workspace_workflow_request, opts = {})
|
|
129
|
+
if @api_client.config.debugging
|
|
130
|
+
@api_client.config.logger.debug 'Calling API: WorkspacesApi.create_workspace_workflow_1 ...'
|
|
131
|
+
end
|
|
132
|
+
# verify the required parameter 'workspace_id' is set
|
|
133
|
+
if @api_client.config.client_side_validation && workspace_id.nil?
|
|
134
|
+
fail ArgumentError, "Missing the required parameter 'workspace_id' when calling WorkspacesApi.create_workspace_workflow_1"
|
|
135
|
+
end
|
|
136
|
+
# verify the required parameter 'idempotency_key' is set
|
|
137
|
+
if @api_client.config.client_side_validation && idempotency_key.nil?
|
|
138
|
+
fail ArgumentError, "Missing the required parameter 'idempotency_key' when calling WorkspacesApi.create_workspace_workflow_1"
|
|
139
|
+
end
|
|
140
|
+
if @api_client.config.client_side_validation && idempotency_key.to_s.length > 50
|
|
141
|
+
fail ArgumentError, 'invalid value for "idempotency_key" when calling WorkspacesApi.create_workspace_workflow_1, the character length must be smaller than or equal to 50.'
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
if @api_client.config.client_side_validation && idempotency_key.to_s.length < 8
|
|
145
|
+
fail ArgumentError, 'invalid value for "idempotency_key" when calling WorkspacesApi.create_workspace_workflow_1, the character length must be great than or equal to 8.'
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
pattern = Regexp.new(/^[a-zA-Z0-9_-]{8,50}$/)
|
|
149
|
+
if @api_client.config.client_side_validation && idempotency_key !~ pattern
|
|
150
|
+
fail ArgumentError, "invalid value for 'idempotency_key' when calling WorkspacesApi.create_workspace_workflow_1, must conform to the pattern #{pattern}."
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
# verify the required parameter 'create_workspace_workflow_request' is set
|
|
154
|
+
if @api_client.config.client_side_validation && create_workspace_workflow_request.nil?
|
|
155
|
+
fail ArgumentError, "Missing the required parameter 'create_workspace_workflow_request' when calling WorkspacesApi.create_workspace_workflow_1"
|
|
156
|
+
end
|
|
157
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length > 255
|
|
158
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling WorkspacesApi.create_workspace_workflow_1, the character length must be smaller than or equal to 255.'
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length < 1
|
|
162
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling WorkspacesApi.create_workspace_workflow_1, the character length must be great than or equal to 1.'
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
# resource path
|
|
166
|
+
local_var_path = '/workspaces/{workspaceId}/workflows'.sub('{' + 'workspaceId' + '}', CGI.escape(workspace_id.to_s))
|
|
167
|
+
|
|
168
|
+
# query parameters
|
|
169
|
+
query_params = opts[:query_params] || {}
|
|
170
|
+
|
|
171
|
+
# header parameters
|
|
172
|
+
header_params = opts[:header_params] || {}
|
|
173
|
+
# HTTP header 'Accept' (if needed)
|
|
174
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
175
|
+
# HTTP header 'Content-Type'
|
|
176
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
177
|
+
if !content_type.nil?
|
|
178
|
+
header_params['Content-Type'] = content_type
|
|
179
|
+
end
|
|
180
|
+
header_params[:'Idempotency-Key'] = idempotency_key
|
|
181
|
+
header_params[:'X-Managed-User-Id'] = opts[:'x_managed_user_id'] if !opts[:'x_managed_user_id'].nil?
|
|
182
|
+
header_params[:'X-Managed-User-External-Id'] = opts[:'x_managed_user_external_id'] if !opts[:'x_managed_user_external_id'].nil?
|
|
183
|
+
|
|
184
|
+
# form parameters
|
|
185
|
+
form_params = opts[:form_params] || {}
|
|
186
|
+
|
|
187
|
+
# http body (model)
|
|
188
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_workspace_workflow_request)
|
|
189
|
+
|
|
190
|
+
# return_type
|
|
191
|
+
return_type = opts[:debug_return_type] || 'CreateWorkspaceWorkflowFromPreset201Response'
|
|
192
|
+
|
|
193
|
+
# auth_names
|
|
194
|
+
auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
|
|
195
|
+
|
|
196
|
+
new_options = opts.merge(
|
|
197
|
+
:operation => :"WorkspacesApi.create_workspace_workflow_1",
|
|
198
|
+
:header_params => header_params,
|
|
199
|
+
:query_params => query_params,
|
|
200
|
+
:form_params => form_params,
|
|
201
|
+
:body => post_body,
|
|
202
|
+
:auth_names => auth_names,
|
|
203
|
+
:return_type => return_type
|
|
204
|
+
)
|
|
205
|
+
|
|
206
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
207
|
+
if @api_client.config.debugging
|
|
208
|
+
@api_client.config.logger.debug "API called: WorkspacesApi#create_workspace_workflow_1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
209
|
+
end
|
|
210
|
+
return data, status_code, headers
|
|
211
|
+
end
|
|
212
|
+
|
|
213
|
+
# Start a Workflow from a starting point
|
|
214
|
+
# 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.
|
|
215
|
+
# @param workspace_id [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.
|
|
216
|
+
# @param idempotency_key [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`).
|
|
217
|
+
# @param create_workspace_workflow_from_preset_request [CreateWorkspaceWorkflowFromPresetRequest]
|
|
218
|
+
# @param [Hash] opts the optional parameters
|
|
219
|
+
# @option opts [String] :x_managed_user_id 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.
|
|
220
|
+
# @option opts [String] :x_managed_user_external_id 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.
|
|
221
|
+
# @return [CreateWorkspaceWorkflowFromPreset201Response]
|
|
222
|
+
def create_workspace_workflow_from_preset_1(workspace_id, idempotency_key, create_workspace_workflow_from_preset_request, opts = {})
|
|
223
|
+
data, _status_code, _headers = create_workspace_workflow_from_preset_1_with_http_info(workspace_id, idempotency_key, create_workspace_workflow_from_preset_request, opts)
|
|
224
|
+
data
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
# Start a Workflow from a starting point
|
|
228
|
+
# 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.
|
|
229
|
+
# @param workspace_id [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.
|
|
230
|
+
# @param idempotency_key [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`).
|
|
231
|
+
# @param create_workspace_workflow_from_preset_request [CreateWorkspaceWorkflowFromPresetRequest]
|
|
232
|
+
# @param [Hash] opts the optional parameters
|
|
233
|
+
# @option opts [String] :x_managed_user_id 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.
|
|
234
|
+
# @option opts [String] :x_managed_user_external_id 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.
|
|
235
|
+
# @return [Array<(CreateWorkspaceWorkflowFromPreset201Response, Integer, Hash)>] CreateWorkspaceWorkflowFromPreset201Response data, response status code and response headers
|
|
236
|
+
def create_workspace_workflow_from_preset_1_with_http_info(workspace_id, idempotency_key, create_workspace_workflow_from_preset_request, opts = {})
|
|
237
|
+
if @api_client.config.debugging
|
|
238
|
+
@api_client.config.logger.debug 'Calling API: WorkspacesApi.create_workspace_workflow_from_preset_1 ...'
|
|
239
|
+
end
|
|
240
|
+
# verify the required parameter 'workspace_id' is set
|
|
241
|
+
if @api_client.config.client_side_validation && workspace_id.nil?
|
|
242
|
+
fail ArgumentError, "Missing the required parameter 'workspace_id' when calling WorkspacesApi.create_workspace_workflow_from_preset_1"
|
|
243
|
+
end
|
|
244
|
+
# verify the required parameter 'idempotency_key' is set
|
|
245
|
+
if @api_client.config.client_side_validation && idempotency_key.nil?
|
|
246
|
+
fail ArgumentError, "Missing the required parameter 'idempotency_key' when calling WorkspacesApi.create_workspace_workflow_from_preset_1"
|
|
247
|
+
end
|
|
248
|
+
if @api_client.config.client_side_validation && idempotency_key.to_s.length > 50
|
|
249
|
+
fail ArgumentError, 'invalid value for "idempotency_key" when calling WorkspacesApi.create_workspace_workflow_from_preset_1, the character length must be smaller than or equal to 50.'
|
|
250
|
+
end
|
|
251
|
+
|
|
252
|
+
if @api_client.config.client_side_validation && idempotency_key.to_s.length < 8
|
|
253
|
+
fail ArgumentError, 'invalid value for "idempotency_key" when calling WorkspacesApi.create_workspace_workflow_from_preset_1, the character length must be great than or equal to 8.'
|
|
254
|
+
end
|
|
255
|
+
|
|
256
|
+
pattern = Regexp.new(/^[a-zA-Z0-9_-]{8,50}$/)
|
|
257
|
+
if @api_client.config.client_side_validation && idempotency_key !~ pattern
|
|
258
|
+
fail ArgumentError, "invalid value for 'idempotency_key' when calling WorkspacesApi.create_workspace_workflow_from_preset_1, must conform to the pattern #{pattern}."
|
|
259
|
+
end
|
|
260
|
+
|
|
261
|
+
# verify the required parameter 'create_workspace_workflow_from_preset_request' is set
|
|
262
|
+
if @api_client.config.client_side_validation && create_workspace_workflow_from_preset_request.nil?
|
|
263
|
+
fail ArgumentError, "Missing the required parameter 'create_workspace_workflow_from_preset_request' when calling WorkspacesApi.create_workspace_workflow_from_preset_1"
|
|
264
|
+
end
|
|
265
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length > 255
|
|
266
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling WorkspacesApi.create_workspace_workflow_from_preset_1, the character length must be smaller than or equal to 255.'
|
|
267
|
+
end
|
|
268
|
+
|
|
269
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length < 1
|
|
270
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling WorkspacesApi.create_workspace_workflow_from_preset_1, the character length must be great than or equal to 1.'
|
|
271
|
+
end
|
|
272
|
+
|
|
273
|
+
# resource path
|
|
274
|
+
local_var_path = '/workspaces/{workspaceId}/workflows/from-preset'.sub('{' + 'workspaceId' + '}', CGI.escape(workspace_id.to_s))
|
|
275
|
+
|
|
276
|
+
# query parameters
|
|
277
|
+
query_params = opts[:query_params] || {}
|
|
278
|
+
|
|
279
|
+
# header parameters
|
|
280
|
+
header_params = opts[:header_params] || {}
|
|
281
|
+
# HTTP header 'Accept' (if needed)
|
|
282
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
283
|
+
# HTTP header 'Content-Type'
|
|
284
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
285
|
+
if !content_type.nil?
|
|
286
|
+
header_params['Content-Type'] = content_type
|
|
287
|
+
end
|
|
288
|
+
header_params[:'Idempotency-Key'] = idempotency_key
|
|
289
|
+
header_params[:'X-Managed-User-Id'] = opts[:'x_managed_user_id'] if !opts[:'x_managed_user_id'].nil?
|
|
290
|
+
header_params[:'X-Managed-User-External-Id'] = opts[:'x_managed_user_external_id'] if !opts[:'x_managed_user_external_id'].nil?
|
|
291
|
+
|
|
292
|
+
# form parameters
|
|
293
|
+
form_params = opts[:form_params] || {}
|
|
294
|
+
|
|
295
|
+
# http body (model)
|
|
296
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_workspace_workflow_from_preset_request)
|
|
297
|
+
|
|
298
|
+
# return_type
|
|
299
|
+
return_type = opts[:debug_return_type] || 'CreateWorkspaceWorkflowFromPreset201Response'
|
|
300
|
+
|
|
301
|
+
# auth_names
|
|
302
|
+
auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
|
|
303
|
+
|
|
304
|
+
new_options = opts.merge(
|
|
305
|
+
:operation => :"WorkspacesApi.create_workspace_workflow_from_preset_1",
|
|
306
|
+
:header_params => header_params,
|
|
307
|
+
:query_params => query_params,
|
|
308
|
+
:form_params => form_params,
|
|
309
|
+
:body => post_body,
|
|
310
|
+
:auth_names => auth_names,
|
|
311
|
+
:return_type => return_type
|
|
312
|
+
)
|
|
313
|
+
|
|
314
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
315
|
+
if @api_client.config.debugging
|
|
316
|
+
@api_client.config.logger.debug "API called: WorkspacesApi#create_workspace_workflow_from_preset_1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
317
|
+
end
|
|
318
|
+
return data, status_code, headers
|
|
319
|
+
end
|
|
320
|
+
|
|
321
|
+
# Delete a Workflow
|
|
322
|
+
# 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.
|
|
323
|
+
# @param workspace_id [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.
|
|
324
|
+
# @param workflow_id [String] The workflow's id
|
|
325
|
+
# @param [Hash] opts the optional parameters
|
|
326
|
+
# @option opts [String] :x_managed_user_id 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.
|
|
327
|
+
# @option opts [String] :x_managed_user_external_id 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.
|
|
328
|
+
# @return [DeleteWorkspaceWorkflow200Response]
|
|
329
|
+
def delete_workspace_workflow_1(workspace_id, workflow_id, opts = {})
|
|
330
|
+
data, _status_code, _headers = delete_workspace_workflow_1_with_http_info(workspace_id, workflow_id, opts)
|
|
331
|
+
data
|
|
332
|
+
end
|
|
333
|
+
|
|
334
|
+
# Delete a Workflow
|
|
335
|
+
# 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.
|
|
336
|
+
# @param workspace_id [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.
|
|
337
|
+
# @param workflow_id [String] The workflow's id
|
|
338
|
+
# @param [Hash] opts the optional parameters
|
|
339
|
+
# @option opts [String] :x_managed_user_id 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.
|
|
340
|
+
# @option opts [String] :x_managed_user_external_id 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.
|
|
341
|
+
# @return [Array<(DeleteWorkspaceWorkflow200Response, Integer, Hash)>] DeleteWorkspaceWorkflow200Response data, response status code and response headers
|
|
342
|
+
def delete_workspace_workflow_1_with_http_info(workspace_id, workflow_id, opts = {})
|
|
343
|
+
if @api_client.config.debugging
|
|
344
|
+
@api_client.config.logger.debug 'Calling API: WorkspacesApi.delete_workspace_workflow_1 ...'
|
|
345
|
+
end
|
|
346
|
+
# verify the required parameter 'workspace_id' is set
|
|
347
|
+
if @api_client.config.client_side_validation && workspace_id.nil?
|
|
348
|
+
fail ArgumentError, "Missing the required parameter 'workspace_id' when calling WorkspacesApi.delete_workspace_workflow_1"
|
|
349
|
+
end
|
|
350
|
+
# verify the required parameter 'workflow_id' is set
|
|
351
|
+
if @api_client.config.client_side_validation && workflow_id.nil?
|
|
352
|
+
fail ArgumentError, "Missing the required parameter 'workflow_id' when calling WorkspacesApi.delete_workspace_workflow_1"
|
|
353
|
+
end
|
|
354
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length > 255
|
|
355
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling WorkspacesApi.delete_workspace_workflow_1, the character length must be smaller than or equal to 255.'
|
|
356
|
+
end
|
|
357
|
+
|
|
358
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length < 1
|
|
359
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling WorkspacesApi.delete_workspace_workflow_1, the character length must be great than or equal to 1.'
|
|
360
|
+
end
|
|
361
|
+
|
|
362
|
+
# resource path
|
|
363
|
+
local_var_path = '/workspaces/{workspaceId}/workflows/{workflowId}'.sub('{' + 'workspaceId' + '}', CGI.escape(workspace_id.to_s)).sub('{' + 'workflowId' + '}', CGI.escape(workflow_id.to_s))
|
|
364
|
+
|
|
365
|
+
# query parameters
|
|
366
|
+
query_params = opts[:query_params] || {}
|
|
367
|
+
|
|
368
|
+
# header parameters
|
|
369
|
+
header_params = opts[:header_params] || {}
|
|
370
|
+
# HTTP header 'Accept' (if needed)
|
|
371
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
372
|
+
header_params[:'X-Managed-User-Id'] = opts[:'x_managed_user_id'] if !opts[:'x_managed_user_id'].nil?
|
|
373
|
+
header_params[:'X-Managed-User-External-Id'] = opts[:'x_managed_user_external_id'] if !opts[:'x_managed_user_external_id'].nil?
|
|
374
|
+
|
|
375
|
+
# form parameters
|
|
376
|
+
form_params = opts[:form_params] || {}
|
|
377
|
+
|
|
378
|
+
# http body (model)
|
|
379
|
+
post_body = opts[:debug_body]
|
|
380
|
+
|
|
381
|
+
# return_type
|
|
382
|
+
return_type = opts[:debug_return_type] || 'DeleteWorkspaceWorkflow200Response'
|
|
383
|
+
|
|
384
|
+
# auth_names
|
|
385
|
+
auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
|
|
386
|
+
|
|
387
|
+
new_options = opts.merge(
|
|
388
|
+
:operation => :"WorkspacesApi.delete_workspace_workflow_1",
|
|
389
|
+
:header_params => header_params,
|
|
390
|
+
:query_params => query_params,
|
|
391
|
+
:form_params => form_params,
|
|
392
|
+
:body => post_body,
|
|
393
|
+
:auth_names => auth_names,
|
|
394
|
+
:return_type => return_type
|
|
395
|
+
)
|
|
396
|
+
|
|
397
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
398
|
+
if @api_client.config.debugging
|
|
399
|
+
@api_client.config.logger.debug "API called: WorkspacesApi#delete_workspace_workflow_1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
400
|
+
end
|
|
401
|
+
return data, status_code, headers
|
|
402
|
+
end
|
|
403
|
+
|
|
404
|
+
# Discard the Unpublished Changes of a Workflow
|
|
405
|
+
# 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.
|
|
406
|
+
# @param workspace_id [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.
|
|
407
|
+
# @param workflow_id [String] The workflow's id
|
|
408
|
+
# @param publish_workspace_workflow_request [PublishWorkspaceWorkflowRequest]
|
|
409
|
+
# @param [Hash] opts the optional parameters
|
|
410
|
+
# @option opts [String] :x_managed_user_id 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.
|
|
411
|
+
# @option opts [String] :x_managed_user_external_id 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.
|
|
412
|
+
# @return [CreateWorkspaceWorkflowFromPreset201Response]
|
|
413
|
+
def discard_workspace_workflow_changes_1(workspace_id, workflow_id, publish_workspace_workflow_request, opts = {})
|
|
414
|
+
data, _status_code, _headers = discard_workspace_workflow_changes_1_with_http_info(workspace_id, workflow_id, publish_workspace_workflow_request, opts)
|
|
415
|
+
data
|
|
416
|
+
end
|
|
417
|
+
|
|
418
|
+
# Discard the Unpublished Changes of a Workflow
|
|
419
|
+
# 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.
|
|
420
|
+
# @param workspace_id [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.
|
|
421
|
+
# @param workflow_id [String] The workflow's id
|
|
422
|
+
# @param publish_workspace_workflow_request [PublishWorkspaceWorkflowRequest]
|
|
423
|
+
# @param [Hash] opts the optional parameters
|
|
424
|
+
# @option opts [String] :x_managed_user_id 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.
|
|
425
|
+
# @option opts [String] :x_managed_user_external_id 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.
|
|
426
|
+
# @return [Array<(CreateWorkspaceWorkflowFromPreset201Response, Integer, Hash)>] CreateWorkspaceWorkflowFromPreset201Response data, response status code and response headers
|
|
427
|
+
def discard_workspace_workflow_changes_1_with_http_info(workspace_id, workflow_id, publish_workspace_workflow_request, opts = {})
|
|
428
|
+
if @api_client.config.debugging
|
|
429
|
+
@api_client.config.logger.debug 'Calling API: WorkspacesApi.discard_workspace_workflow_changes_1 ...'
|
|
430
|
+
end
|
|
431
|
+
# verify the required parameter 'workspace_id' is set
|
|
432
|
+
if @api_client.config.client_side_validation && workspace_id.nil?
|
|
433
|
+
fail ArgumentError, "Missing the required parameter 'workspace_id' when calling WorkspacesApi.discard_workspace_workflow_changes_1"
|
|
434
|
+
end
|
|
435
|
+
# verify the required parameter 'workflow_id' is set
|
|
436
|
+
if @api_client.config.client_side_validation && workflow_id.nil?
|
|
437
|
+
fail ArgumentError, "Missing the required parameter 'workflow_id' when calling WorkspacesApi.discard_workspace_workflow_changes_1"
|
|
438
|
+
end
|
|
439
|
+
# verify the required parameter 'publish_workspace_workflow_request' is set
|
|
440
|
+
if @api_client.config.client_side_validation && publish_workspace_workflow_request.nil?
|
|
441
|
+
fail ArgumentError, "Missing the required parameter 'publish_workspace_workflow_request' when calling WorkspacesApi.discard_workspace_workflow_changes_1"
|
|
442
|
+
end
|
|
443
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length > 255
|
|
444
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling WorkspacesApi.discard_workspace_workflow_changes_1, the character length must be smaller than or equal to 255.'
|
|
445
|
+
end
|
|
446
|
+
|
|
447
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length < 1
|
|
448
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling WorkspacesApi.discard_workspace_workflow_changes_1, the character length must be great than or equal to 1.'
|
|
449
|
+
end
|
|
450
|
+
|
|
451
|
+
# resource path
|
|
452
|
+
local_var_path = '/workspaces/{workspaceId}/workflows/{workflowId}/discard'.sub('{' + 'workspaceId' + '}', CGI.escape(workspace_id.to_s)).sub('{' + 'workflowId' + '}', CGI.escape(workflow_id.to_s))
|
|
453
|
+
|
|
454
|
+
# query parameters
|
|
455
|
+
query_params = opts[:query_params] || {}
|
|
456
|
+
|
|
457
|
+
# header parameters
|
|
458
|
+
header_params = opts[:header_params] || {}
|
|
459
|
+
# HTTP header 'Accept' (if needed)
|
|
460
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
461
|
+
# HTTP header 'Content-Type'
|
|
462
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
463
|
+
if !content_type.nil?
|
|
464
|
+
header_params['Content-Type'] = content_type
|
|
465
|
+
end
|
|
466
|
+
header_params[:'X-Managed-User-Id'] = opts[:'x_managed_user_id'] if !opts[:'x_managed_user_id'].nil?
|
|
467
|
+
header_params[:'X-Managed-User-External-Id'] = opts[:'x_managed_user_external_id'] if !opts[:'x_managed_user_external_id'].nil?
|
|
468
|
+
|
|
469
|
+
# form parameters
|
|
470
|
+
form_params = opts[:form_params] || {}
|
|
471
|
+
|
|
472
|
+
# http body (model)
|
|
473
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(publish_workspace_workflow_request)
|
|
474
|
+
|
|
475
|
+
# return_type
|
|
476
|
+
return_type = opts[:debug_return_type] || 'CreateWorkspaceWorkflowFromPreset201Response'
|
|
477
|
+
|
|
478
|
+
# auth_names
|
|
479
|
+
auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
|
|
480
|
+
|
|
481
|
+
new_options = opts.merge(
|
|
482
|
+
:operation => :"WorkspacesApi.discard_workspace_workflow_changes_1",
|
|
483
|
+
:header_params => header_params,
|
|
484
|
+
:query_params => query_params,
|
|
485
|
+
:form_params => form_params,
|
|
486
|
+
:body => post_body,
|
|
487
|
+
:auth_names => auth_names,
|
|
488
|
+
:return_type => return_type
|
|
489
|
+
)
|
|
490
|
+
|
|
491
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
492
|
+
if @api_client.config.debugging
|
|
493
|
+
@api_client.config.logger.debug "API called: WorkspacesApi#discard_workspace_workflow_changes_1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
494
|
+
end
|
|
495
|
+
return data, status_code, headers
|
|
496
|
+
end
|
|
497
|
+
|
|
498
|
+
# Duplicate a Workflow
|
|
499
|
+
# 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.
|
|
500
|
+
# @param workspace_id [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.
|
|
501
|
+
# @param workflow_id [String] The workflow's id
|
|
502
|
+
# @param idempotency_key [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`).
|
|
503
|
+
# @param [Hash] opts the optional parameters
|
|
504
|
+
# @option opts [String] :x_managed_user_id 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.
|
|
505
|
+
# @option opts [String] :x_managed_user_external_id 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.
|
|
506
|
+
# @return [CreateWorkspaceWorkflowFromPreset201Response]
|
|
507
|
+
def duplicate_workspace_workflow_1(workspace_id, workflow_id, idempotency_key, opts = {})
|
|
508
|
+
data, _status_code, _headers = duplicate_workspace_workflow_1_with_http_info(workspace_id, workflow_id, idempotency_key, opts)
|
|
509
|
+
data
|
|
510
|
+
end
|
|
511
|
+
|
|
512
|
+
# Duplicate a Workflow
|
|
513
|
+
# 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.
|
|
514
|
+
# @param workspace_id [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.
|
|
515
|
+
# @param workflow_id [String] The workflow's id
|
|
516
|
+
# @param idempotency_key [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`).
|
|
517
|
+
# @param [Hash] opts the optional parameters
|
|
518
|
+
# @option opts [String] :x_managed_user_id 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.
|
|
519
|
+
# @option opts [String] :x_managed_user_external_id 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.
|
|
520
|
+
# @return [Array<(CreateWorkspaceWorkflowFromPreset201Response, Integer, Hash)>] CreateWorkspaceWorkflowFromPreset201Response data, response status code and response headers
|
|
521
|
+
def duplicate_workspace_workflow_1_with_http_info(workspace_id, workflow_id, idempotency_key, opts = {})
|
|
522
|
+
if @api_client.config.debugging
|
|
523
|
+
@api_client.config.logger.debug 'Calling API: WorkspacesApi.duplicate_workspace_workflow_1 ...'
|
|
524
|
+
end
|
|
525
|
+
# verify the required parameter 'workspace_id' is set
|
|
526
|
+
if @api_client.config.client_side_validation && workspace_id.nil?
|
|
527
|
+
fail ArgumentError, "Missing the required parameter 'workspace_id' when calling WorkspacesApi.duplicate_workspace_workflow_1"
|
|
528
|
+
end
|
|
529
|
+
# verify the required parameter 'workflow_id' is set
|
|
530
|
+
if @api_client.config.client_side_validation && workflow_id.nil?
|
|
531
|
+
fail ArgumentError, "Missing the required parameter 'workflow_id' when calling WorkspacesApi.duplicate_workspace_workflow_1"
|
|
532
|
+
end
|
|
533
|
+
# verify the required parameter 'idempotency_key' is set
|
|
534
|
+
if @api_client.config.client_side_validation && idempotency_key.nil?
|
|
535
|
+
fail ArgumentError, "Missing the required parameter 'idempotency_key' when calling WorkspacesApi.duplicate_workspace_workflow_1"
|
|
536
|
+
end
|
|
537
|
+
if @api_client.config.client_side_validation && idempotency_key.to_s.length > 50
|
|
538
|
+
fail ArgumentError, 'invalid value for "idempotency_key" when calling WorkspacesApi.duplicate_workspace_workflow_1, the character length must be smaller than or equal to 50.'
|
|
539
|
+
end
|
|
540
|
+
|
|
541
|
+
if @api_client.config.client_side_validation && idempotency_key.to_s.length < 8
|
|
542
|
+
fail ArgumentError, 'invalid value for "idempotency_key" when calling WorkspacesApi.duplicate_workspace_workflow_1, the character length must be great than or equal to 8.'
|
|
543
|
+
end
|
|
544
|
+
|
|
545
|
+
pattern = Regexp.new(/^[a-zA-Z0-9_-]{8,50}$/)
|
|
546
|
+
if @api_client.config.client_side_validation && idempotency_key !~ pattern
|
|
547
|
+
fail ArgumentError, "invalid value for 'idempotency_key' when calling WorkspacesApi.duplicate_workspace_workflow_1, must conform to the pattern #{pattern}."
|
|
548
|
+
end
|
|
549
|
+
|
|
550
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length > 255
|
|
551
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling WorkspacesApi.duplicate_workspace_workflow_1, the character length must be smaller than or equal to 255.'
|
|
552
|
+
end
|
|
553
|
+
|
|
554
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length < 1
|
|
555
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling WorkspacesApi.duplicate_workspace_workflow_1, the character length must be great than or equal to 1.'
|
|
556
|
+
end
|
|
557
|
+
|
|
558
|
+
# resource path
|
|
559
|
+
local_var_path = '/workspaces/{workspaceId}/workflows/{workflowId}/duplicate'.sub('{' + 'workspaceId' + '}', CGI.escape(workspace_id.to_s)).sub('{' + 'workflowId' + '}', CGI.escape(workflow_id.to_s))
|
|
560
|
+
|
|
561
|
+
# query parameters
|
|
562
|
+
query_params = opts[:query_params] || {}
|
|
563
|
+
|
|
564
|
+
# header parameters
|
|
565
|
+
header_params = opts[:header_params] || {}
|
|
566
|
+
# HTTP header 'Accept' (if needed)
|
|
567
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
568
|
+
header_params[:'Idempotency-Key'] = idempotency_key
|
|
569
|
+
header_params[:'X-Managed-User-Id'] = opts[:'x_managed_user_id'] if !opts[:'x_managed_user_id'].nil?
|
|
570
|
+
header_params[:'X-Managed-User-External-Id'] = opts[:'x_managed_user_external_id'] if !opts[:'x_managed_user_external_id'].nil?
|
|
571
|
+
|
|
572
|
+
# form parameters
|
|
573
|
+
form_params = opts[:form_params] || {}
|
|
574
|
+
|
|
575
|
+
# http body (model)
|
|
576
|
+
post_body = opts[:debug_body]
|
|
577
|
+
|
|
578
|
+
# return_type
|
|
579
|
+
return_type = opts[:debug_return_type] || 'CreateWorkspaceWorkflowFromPreset201Response'
|
|
580
|
+
|
|
581
|
+
# auth_names
|
|
582
|
+
auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
|
|
583
|
+
|
|
584
|
+
new_options = opts.merge(
|
|
585
|
+
:operation => :"WorkspacesApi.duplicate_workspace_workflow_1",
|
|
586
|
+
:header_params => header_params,
|
|
587
|
+
:query_params => query_params,
|
|
588
|
+
:form_params => form_params,
|
|
589
|
+
:body => post_body,
|
|
590
|
+
:auth_names => auth_names,
|
|
591
|
+
:return_type => return_type
|
|
592
|
+
)
|
|
593
|
+
|
|
594
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
595
|
+
if @api_client.config.debugging
|
|
596
|
+
@api_client.config.logger.debug "API called: WorkspacesApi#duplicate_workspace_workflow_1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
597
|
+
end
|
|
598
|
+
return data, status_code, headers
|
|
599
|
+
end
|
|
600
|
+
|
|
601
|
+
# Get a Workflow
|
|
602
|
+
# 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.
|
|
603
|
+
# @param workspace_id [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.
|
|
604
|
+
# @param workflow_id [String] The workflow's id
|
|
605
|
+
# @param [Hash] opts the optional parameters
|
|
606
|
+
# @option opts [String] :x_managed_user_id 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.
|
|
607
|
+
# @option opts [String] :x_managed_user_external_id 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.
|
|
608
|
+
# @return [CreateWorkspaceWorkflowFromPreset201Response]
|
|
609
|
+
def get_workspace_workflow_1(workspace_id, workflow_id, opts = {})
|
|
610
|
+
data, _status_code, _headers = get_workspace_workflow_1_with_http_info(workspace_id, workflow_id, opts)
|
|
611
|
+
data
|
|
612
|
+
end
|
|
613
|
+
|
|
614
|
+
# Get a Workflow
|
|
615
|
+
# 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.
|
|
616
|
+
# @param workspace_id [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.
|
|
617
|
+
# @param workflow_id [String] The workflow's id
|
|
618
|
+
# @param [Hash] opts the optional parameters
|
|
619
|
+
# @option opts [String] :x_managed_user_id 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.
|
|
620
|
+
# @option opts [String] :x_managed_user_external_id 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.
|
|
621
|
+
# @return [Array<(CreateWorkspaceWorkflowFromPreset201Response, Integer, Hash)>] CreateWorkspaceWorkflowFromPreset201Response data, response status code and response headers
|
|
622
|
+
def get_workspace_workflow_1_with_http_info(workspace_id, workflow_id, opts = {})
|
|
623
|
+
if @api_client.config.debugging
|
|
624
|
+
@api_client.config.logger.debug 'Calling API: WorkspacesApi.get_workspace_workflow_1 ...'
|
|
625
|
+
end
|
|
626
|
+
# verify the required parameter 'workspace_id' is set
|
|
627
|
+
if @api_client.config.client_side_validation && workspace_id.nil?
|
|
628
|
+
fail ArgumentError, "Missing the required parameter 'workspace_id' when calling WorkspacesApi.get_workspace_workflow_1"
|
|
629
|
+
end
|
|
630
|
+
# verify the required parameter 'workflow_id' is set
|
|
631
|
+
if @api_client.config.client_side_validation && workflow_id.nil?
|
|
632
|
+
fail ArgumentError, "Missing the required parameter 'workflow_id' when calling WorkspacesApi.get_workspace_workflow_1"
|
|
633
|
+
end
|
|
634
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length > 255
|
|
635
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling WorkspacesApi.get_workspace_workflow_1, the character length must be smaller than or equal to 255.'
|
|
636
|
+
end
|
|
637
|
+
|
|
638
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length < 1
|
|
639
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling WorkspacesApi.get_workspace_workflow_1, the character length must be great than or equal to 1.'
|
|
640
|
+
end
|
|
641
|
+
|
|
642
|
+
# resource path
|
|
643
|
+
local_var_path = '/workspaces/{workspaceId}/workflows/{workflowId}'.sub('{' + 'workspaceId' + '}', CGI.escape(workspace_id.to_s)).sub('{' + 'workflowId' + '}', CGI.escape(workflow_id.to_s))
|
|
644
|
+
|
|
645
|
+
# query parameters
|
|
646
|
+
query_params = opts[:query_params] || {}
|
|
647
|
+
|
|
648
|
+
# header parameters
|
|
649
|
+
header_params = opts[:header_params] || {}
|
|
650
|
+
# HTTP header 'Accept' (if needed)
|
|
651
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
652
|
+
header_params[:'X-Managed-User-Id'] = opts[:'x_managed_user_id'] if !opts[:'x_managed_user_id'].nil?
|
|
653
|
+
header_params[:'X-Managed-User-External-Id'] = opts[:'x_managed_user_external_id'] if !opts[:'x_managed_user_external_id'].nil?
|
|
654
|
+
|
|
655
|
+
# form parameters
|
|
656
|
+
form_params = opts[:form_params] || {}
|
|
657
|
+
|
|
658
|
+
# http body (model)
|
|
659
|
+
post_body = opts[:debug_body]
|
|
660
|
+
|
|
661
|
+
# return_type
|
|
662
|
+
return_type = opts[:debug_return_type] || 'CreateWorkspaceWorkflowFromPreset201Response'
|
|
663
|
+
|
|
664
|
+
# auth_names
|
|
665
|
+
auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
|
|
666
|
+
|
|
667
|
+
new_options = opts.merge(
|
|
668
|
+
:operation => :"WorkspacesApi.get_workspace_workflow_1",
|
|
669
|
+
:header_params => header_params,
|
|
670
|
+
:query_params => query_params,
|
|
671
|
+
:form_params => form_params,
|
|
672
|
+
:body => post_body,
|
|
673
|
+
:auth_names => auth_names,
|
|
674
|
+
:return_type => return_type
|
|
675
|
+
)
|
|
676
|
+
|
|
677
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
678
|
+
if @api_client.config.debugging
|
|
679
|
+
@api_client.config.logger.debug "API called: WorkspacesApi#get_workspace_workflow_1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
680
|
+
end
|
|
681
|
+
return data, status_code, headers
|
|
682
|
+
end
|
|
683
|
+
|
|
684
|
+
# Get what Visitors Did in a Workflow
|
|
685
|
+
# 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.
|
|
686
|
+
# @param workspace_id [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.
|
|
687
|
+
# @param workflow_id [String] The workflow's id
|
|
688
|
+
# @param [Hash] opts the optional parameters
|
|
689
|
+
# @option opts [String] :version_id Count one version only
|
|
690
|
+
# @option opts [String] :from First UTC day (YYYY-MM-DD)
|
|
691
|
+
# @option opts [String] :to Last UTC day (YYYY-MM-DD)
|
|
692
|
+
# @option opts [String] :x_managed_user_id 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.
|
|
693
|
+
# @option opts [String] :x_managed_user_external_id 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.
|
|
694
|
+
# @return [GetWorkspaceWorkflowStats200Response]
|
|
695
|
+
def get_workspace_workflow_stats_1(workspace_id, workflow_id, opts = {})
|
|
696
|
+
data, _status_code, _headers = get_workspace_workflow_stats_1_with_http_info(workspace_id, workflow_id, opts)
|
|
697
|
+
data
|
|
698
|
+
end
|
|
699
|
+
|
|
700
|
+
# Get what Visitors Did in a Workflow
|
|
701
|
+
# 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.
|
|
702
|
+
# @param workspace_id [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.
|
|
703
|
+
# @param workflow_id [String] The workflow's id
|
|
704
|
+
# @param [Hash] opts the optional parameters
|
|
705
|
+
# @option opts [String] :version_id Count one version only
|
|
706
|
+
# @option opts [String] :from First UTC day (YYYY-MM-DD)
|
|
707
|
+
# @option opts [String] :to Last UTC day (YYYY-MM-DD)
|
|
708
|
+
# @option opts [String] :x_managed_user_id 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.
|
|
709
|
+
# @option opts [String] :x_managed_user_external_id 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.
|
|
710
|
+
# @return [Array<(GetWorkspaceWorkflowStats200Response, Integer, Hash)>] GetWorkspaceWorkflowStats200Response data, response status code and response headers
|
|
711
|
+
def get_workspace_workflow_stats_1_with_http_info(workspace_id, workflow_id, opts = {})
|
|
712
|
+
if @api_client.config.debugging
|
|
713
|
+
@api_client.config.logger.debug 'Calling API: WorkspacesApi.get_workspace_workflow_stats_1 ...'
|
|
714
|
+
end
|
|
715
|
+
# verify the required parameter 'workspace_id' is set
|
|
716
|
+
if @api_client.config.client_side_validation && workspace_id.nil?
|
|
717
|
+
fail ArgumentError, "Missing the required parameter 'workspace_id' when calling WorkspacesApi.get_workspace_workflow_stats_1"
|
|
718
|
+
end
|
|
719
|
+
# verify the required parameter 'workflow_id' is set
|
|
720
|
+
if @api_client.config.client_side_validation && workflow_id.nil?
|
|
721
|
+
fail ArgumentError, "Missing the required parameter 'workflow_id' when calling WorkspacesApi.get_workspace_workflow_stats_1"
|
|
722
|
+
end
|
|
723
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length > 255
|
|
724
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling WorkspacesApi.get_workspace_workflow_stats_1, the character length must be smaller than or equal to 255.'
|
|
725
|
+
end
|
|
726
|
+
|
|
727
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length < 1
|
|
728
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling WorkspacesApi.get_workspace_workflow_stats_1, the character length must be great than or equal to 1.'
|
|
729
|
+
end
|
|
730
|
+
|
|
731
|
+
# resource path
|
|
732
|
+
local_var_path = '/workspaces/{workspaceId}/workflows/{workflowId}/stats'.sub('{' + 'workspaceId' + '}', CGI.escape(workspace_id.to_s)).sub('{' + 'workflowId' + '}', CGI.escape(workflow_id.to_s))
|
|
733
|
+
|
|
734
|
+
# query parameters
|
|
735
|
+
query_params = opts[:query_params] || {}
|
|
736
|
+
query_params[:'versionId'] = opts[:'version_id'] if !opts[:'version_id'].nil?
|
|
737
|
+
query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil?
|
|
738
|
+
query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil?
|
|
739
|
+
|
|
740
|
+
# header parameters
|
|
741
|
+
header_params = opts[:header_params] || {}
|
|
742
|
+
# HTTP header 'Accept' (if needed)
|
|
743
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
744
|
+
header_params[:'X-Managed-User-Id'] = opts[:'x_managed_user_id'] if !opts[:'x_managed_user_id'].nil?
|
|
745
|
+
header_params[:'X-Managed-User-External-Id'] = opts[:'x_managed_user_external_id'] if !opts[:'x_managed_user_external_id'].nil?
|
|
746
|
+
|
|
747
|
+
# form parameters
|
|
748
|
+
form_params = opts[:form_params] || {}
|
|
749
|
+
|
|
750
|
+
# http body (model)
|
|
751
|
+
post_body = opts[:debug_body]
|
|
752
|
+
|
|
753
|
+
# return_type
|
|
754
|
+
return_type = opts[:debug_return_type] || 'GetWorkspaceWorkflowStats200Response'
|
|
755
|
+
|
|
756
|
+
# auth_names
|
|
757
|
+
auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
|
|
758
|
+
|
|
759
|
+
new_options = opts.merge(
|
|
760
|
+
:operation => :"WorkspacesApi.get_workspace_workflow_stats_1",
|
|
761
|
+
:header_params => header_params,
|
|
762
|
+
:query_params => query_params,
|
|
763
|
+
:form_params => form_params,
|
|
764
|
+
:body => post_body,
|
|
765
|
+
:auth_names => auth_names,
|
|
766
|
+
:return_type => return_type
|
|
767
|
+
)
|
|
768
|
+
|
|
769
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
770
|
+
if @api_client.config.debugging
|
|
771
|
+
@api_client.config.logger.debug "API called: WorkspacesApi#get_workspace_workflow_stats_1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
772
|
+
end
|
|
773
|
+
return data, status_code, headers
|
|
774
|
+
end
|
|
775
|
+
|
|
776
|
+
# Get a Published Version of a Workflow
|
|
777
|
+
# 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.
|
|
778
|
+
# @param workspace_id [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.
|
|
779
|
+
# @param workflow_id [String] The workflow's id
|
|
780
|
+
# @param version_id [String] The id of a published version of the workflow
|
|
781
|
+
# @param [Hash] opts the optional parameters
|
|
782
|
+
# @option opts [String] :x_managed_user_id 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.
|
|
783
|
+
# @option opts [String] :x_managed_user_external_id 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.
|
|
784
|
+
# @return [GetWorkspaceWorkflowVersion200Response]
|
|
785
|
+
def get_workspace_workflow_version_1(workspace_id, workflow_id, version_id, opts = {})
|
|
786
|
+
data, _status_code, _headers = get_workspace_workflow_version_1_with_http_info(workspace_id, workflow_id, version_id, opts)
|
|
787
|
+
data
|
|
788
|
+
end
|
|
789
|
+
|
|
790
|
+
# Get a Published Version of a Workflow
|
|
791
|
+
# 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.
|
|
792
|
+
# @param workspace_id [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.
|
|
793
|
+
# @param workflow_id [String] The workflow's id
|
|
794
|
+
# @param version_id [String] The id of a published version of the workflow
|
|
795
|
+
# @param [Hash] opts the optional parameters
|
|
796
|
+
# @option opts [String] :x_managed_user_id 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.
|
|
797
|
+
# @option opts [String] :x_managed_user_external_id 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.
|
|
798
|
+
# @return [Array<(GetWorkspaceWorkflowVersion200Response, Integer, Hash)>] GetWorkspaceWorkflowVersion200Response data, response status code and response headers
|
|
799
|
+
def get_workspace_workflow_version_1_with_http_info(workspace_id, workflow_id, version_id, opts = {})
|
|
800
|
+
if @api_client.config.debugging
|
|
801
|
+
@api_client.config.logger.debug 'Calling API: WorkspacesApi.get_workspace_workflow_version_1 ...'
|
|
802
|
+
end
|
|
803
|
+
# verify the required parameter 'workspace_id' is set
|
|
804
|
+
if @api_client.config.client_side_validation && workspace_id.nil?
|
|
805
|
+
fail ArgumentError, "Missing the required parameter 'workspace_id' when calling WorkspacesApi.get_workspace_workflow_version_1"
|
|
806
|
+
end
|
|
807
|
+
# verify the required parameter 'workflow_id' is set
|
|
808
|
+
if @api_client.config.client_side_validation && workflow_id.nil?
|
|
809
|
+
fail ArgumentError, "Missing the required parameter 'workflow_id' when calling WorkspacesApi.get_workspace_workflow_version_1"
|
|
810
|
+
end
|
|
811
|
+
# verify the required parameter 'version_id' is set
|
|
812
|
+
if @api_client.config.client_side_validation && version_id.nil?
|
|
813
|
+
fail ArgumentError, "Missing the required parameter 'version_id' when calling WorkspacesApi.get_workspace_workflow_version_1"
|
|
814
|
+
end
|
|
815
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length > 255
|
|
816
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling WorkspacesApi.get_workspace_workflow_version_1, the character length must be smaller than or equal to 255.'
|
|
817
|
+
end
|
|
818
|
+
|
|
819
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length < 1
|
|
820
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling WorkspacesApi.get_workspace_workflow_version_1, the character length must be great than or equal to 1.'
|
|
821
|
+
end
|
|
822
|
+
|
|
823
|
+
# resource path
|
|
824
|
+
local_var_path = '/workspaces/{workspaceId}/workflows/{workflowId}/versions/{versionId}'.sub('{' + 'workspaceId' + '}', CGI.escape(workspace_id.to_s)).sub('{' + 'workflowId' + '}', CGI.escape(workflow_id.to_s)).sub('{' + 'versionId' + '}', CGI.escape(version_id.to_s))
|
|
825
|
+
|
|
826
|
+
# query parameters
|
|
827
|
+
query_params = opts[:query_params] || {}
|
|
828
|
+
|
|
829
|
+
# header parameters
|
|
830
|
+
header_params = opts[:header_params] || {}
|
|
831
|
+
# HTTP header 'Accept' (if needed)
|
|
832
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
833
|
+
header_params[:'X-Managed-User-Id'] = opts[:'x_managed_user_id'] if !opts[:'x_managed_user_id'].nil?
|
|
834
|
+
header_params[:'X-Managed-User-External-Id'] = opts[:'x_managed_user_external_id'] if !opts[:'x_managed_user_external_id'].nil?
|
|
835
|
+
|
|
836
|
+
# form parameters
|
|
837
|
+
form_params = opts[:form_params] || {}
|
|
838
|
+
|
|
839
|
+
# http body (model)
|
|
840
|
+
post_body = opts[:debug_body]
|
|
841
|
+
|
|
842
|
+
# return_type
|
|
843
|
+
return_type = opts[:debug_return_type] || 'GetWorkspaceWorkflowVersion200Response'
|
|
844
|
+
|
|
845
|
+
# auth_names
|
|
846
|
+
auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
|
|
847
|
+
|
|
848
|
+
new_options = opts.merge(
|
|
849
|
+
:operation => :"WorkspacesApi.get_workspace_workflow_version_1",
|
|
850
|
+
:header_params => header_params,
|
|
851
|
+
:query_params => query_params,
|
|
852
|
+
:form_params => form_params,
|
|
853
|
+
:body => post_body,
|
|
854
|
+
:auth_names => auth_names,
|
|
855
|
+
:return_type => return_type
|
|
856
|
+
)
|
|
857
|
+
|
|
858
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
859
|
+
if @api_client.config.debugging
|
|
860
|
+
@api_client.config.logger.debug "API called: WorkspacesApi#get_workspace_workflow_version_1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
861
|
+
end
|
|
862
|
+
return data, status_code, headers
|
|
863
|
+
end
|
|
864
|
+
|
|
865
|
+
# List the compositions a workflow can show, and what each can do
|
|
866
|
+
# 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.
|
|
867
|
+
# @param workspace_id [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.
|
|
868
|
+
# @param [Hash] opts the optional parameters
|
|
869
|
+
# @option opts [String] :search Text the composition's name must contain
|
|
870
|
+
# @option opts [String] :ids 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.
|
|
871
|
+
# @option opts [Integer] :limit Page size (1-100, 50 when not given)
|
|
872
|
+
# @option opts [Integer] :offset How many to skip (0 when not given)
|
|
873
|
+
# @option opts [String] :x_managed_user_id 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.
|
|
874
|
+
# @option opts [String] :x_managed_user_external_id 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.
|
|
875
|
+
# @return [ListWorkspaceWorkflowCompositionOptions200Response]
|
|
876
|
+
def list_workspace_workflow_composition_options_1(workspace_id, opts = {})
|
|
877
|
+
data, _status_code, _headers = list_workspace_workflow_composition_options_1_with_http_info(workspace_id, opts)
|
|
878
|
+
data
|
|
879
|
+
end
|
|
880
|
+
|
|
881
|
+
# List the compositions a workflow can show, and what each can do
|
|
882
|
+
# 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.
|
|
883
|
+
# @param workspace_id [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.
|
|
884
|
+
# @param [Hash] opts the optional parameters
|
|
885
|
+
# @option opts [String] :search Text the composition's name must contain
|
|
886
|
+
# @option opts [String] :ids 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.
|
|
887
|
+
# @option opts [Integer] :limit Page size (1-100, 50 when not given)
|
|
888
|
+
# @option opts [Integer] :offset How many to skip (0 when not given)
|
|
889
|
+
# @option opts [String] :x_managed_user_id 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.
|
|
890
|
+
# @option opts [String] :x_managed_user_external_id 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.
|
|
891
|
+
# @return [Array<(ListWorkspaceWorkflowCompositionOptions200Response, Integer, Hash)>] ListWorkspaceWorkflowCompositionOptions200Response data, response status code and response headers
|
|
892
|
+
def list_workspace_workflow_composition_options_1_with_http_info(workspace_id, opts = {})
|
|
893
|
+
if @api_client.config.debugging
|
|
894
|
+
@api_client.config.logger.debug 'Calling API: WorkspacesApi.list_workspace_workflow_composition_options_1 ...'
|
|
895
|
+
end
|
|
896
|
+
# verify the required parameter 'workspace_id' is set
|
|
897
|
+
if @api_client.config.client_side_validation && workspace_id.nil?
|
|
898
|
+
fail ArgumentError, "Missing the required parameter 'workspace_id' when calling WorkspacesApi.list_workspace_workflow_composition_options_1"
|
|
899
|
+
end
|
|
900
|
+
if @api_client.config.client_side_validation && !opts[:'search'].nil? && opts[:'search'].to_s.length > 120
|
|
901
|
+
fail ArgumentError, 'invalid value for "opts[:"search"]" when calling WorkspacesApi.list_workspace_workflow_composition_options_1, the character length must be smaller than or equal to 120.'
|
|
902
|
+
end
|
|
903
|
+
|
|
904
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length > 255
|
|
905
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling WorkspacesApi.list_workspace_workflow_composition_options_1, the character length must be smaller than or equal to 255.'
|
|
906
|
+
end
|
|
907
|
+
|
|
908
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length < 1
|
|
909
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling WorkspacesApi.list_workspace_workflow_composition_options_1, the character length must be great than or equal to 1.'
|
|
910
|
+
end
|
|
911
|
+
|
|
912
|
+
# resource path
|
|
913
|
+
local_var_path = '/workspaces/{workspaceId}/workflows/composition-options'.sub('{' + 'workspaceId' + '}', CGI.escape(workspace_id.to_s))
|
|
914
|
+
|
|
915
|
+
# query parameters
|
|
916
|
+
query_params = opts[:query_params] || {}
|
|
917
|
+
query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
|
|
918
|
+
query_params[:'ids'] = opts[:'ids'] if !opts[:'ids'].nil?
|
|
919
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
920
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
|
921
|
+
|
|
922
|
+
# header parameters
|
|
923
|
+
header_params = opts[:header_params] || {}
|
|
924
|
+
# HTTP header 'Accept' (if needed)
|
|
925
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
926
|
+
header_params[:'X-Managed-User-Id'] = opts[:'x_managed_user_id'] if !opts[:'x_managed_user_id'].nil?
|
|
927
|
+
header_params[:'X-Managed-User-External-Id'] = opts[:'x_managed_user_external_id'] if !opts[:'x_managed_user_external_id'].nil?
|
|
928
|
+
|
|
929
|
+
# form parameters
|
|
930
|
+
form_params = opts[:form_params] || {}
|
|
931
|
+
|
|
932
|
+
# http body (model)
|
|
933
|
+
post_body = opts[:debug_body]
|
|
934
|
+
|
|
935
|
+
# return_type
|
|
936
|
+
return_type = opts[:debug_return_type] || 'ListWorkspaceWorkflowCompositionOptions200Response'
|
|
937
|
+
|
|
938
|
+
# auth_names
|
|
939
|
+
auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
|
|
940
|
+
|
|
941
|
+
new_options = opts.merge(
|
|
942
|
+
:operation => :"WorkspacesApi.list_workspace_workflow_composition_options_1",
|
|
943
|
+
:header_params => header_params,
|
|
944
|
+
:query_params => query_params,
|
|
945
|
+
:form_params => form_params,
|
|
946
|
+
:body => post_body,
|
|
947
|
+
:auth_names => auth_names,
|
|
948
|
+
:return_type => return_type
|
|
949
|
+
)
|
|
950
|
+
|
|
951
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
952
|
+
if @api_client.config.debugging
|
|
953
|
+
@api_client.config.logger.debug "API called: WorkspacesApi#list_workspace_workflow_composition_options_1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
954
|
+
end
|
|
955
|
+
return data, status_code, headers
|
|
956
|
+
end
|
|
957
|
+
|
|
958
|
+
# List the starting points for a new Workflow
|
|
959
|
+
# 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.
|
|
960
|
+
# @param workspace_id [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.
|
|
961
|
+
# @param [Hash] opts the optional parameters
|
|
962
|
+
# @option opts [String] :x_managed_user_id 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.
|
|
963
|
+
# @option opts [String] :x_managed_user_external_id 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.
|
|
964
|
+
# @return [ListWorkspaceWorkflowPresets200Response]
|
|
965
|
+
def list_workspace_workflow_presets_1(workspace_id, opts = {})
|
|
966
|
+
data, _status_code, _headers = list_workspace_workflow_presets_1_with_http_info(workspace_id, opts)
|
|
967
|
+
data
|
|
968
|
+
end
|
|
969
|
+
|
|
970
|
+
# List the starting points for a new Workflow
|
|
971
|
+
# 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.
|
|
972
|
+
# @param workspace_id [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.
|
|
973
|
+
# @param [Hash] opts the optional parameters
|
|
974
|
+
# @option opts [String] :x_managed_user_id 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.
|
|
975
|
+
# @option opts [String] :x_managed_user_external_id 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.
|
|
976
|
+
# @return [Array<(ListWorkspaceWorkflowPresets200Response, Integer, Hash)>] ListWorkspaceWorkflowPresets200Response data, response status code and response headers
|
|
977
|
+
def list_workspace_workflow_presets_1_with_http_info(workspace_id, opts = {})
|
|
978
|
+
if @api_client.config.debugging
|
|
979
|
+
@api_client.config.logger.debug 'Calling API: WorkspacesApi.list_workspace_workflow_presets_1 ...'
|
|
980
|
+
end
|
|
981
|
+
# verify the required parameter 'workspace_id' is set
|
|
982
|
+
if @api_client.config.client_side_validation && workspace_id.nil?
|
|
983
|
+
fail ArgumentError, "Missing the required parameter 'workspace_id' when calling WorkspacesApi.list_workspace_workflow_presets_1"
|
|
984
|
+
end
|
|
985
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length > 255
|
|
986
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling WorkspacesApi.list_workspace_workflow_presets_1, the character length must be smaller than or equal to 255.'
|
|
987
|
+
end
|
|
988
|
+
|
|
989
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length < 1
|
|
990
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling WorkspacesApi.list_workspace_workflow_presets_1, the character length must be great than or equal to 1.'
|
|
991
|
+
end
|
|
992
|
+
|
|
993
|
+
# resource path
|
|
994
|
+
local_var_path = '/workspaces/{workspaceId}/workflows/presets'.sub('{' + 'workspaceId' + '}', CGI.escape(workspace_id.to_s))
|
|
995
|
+
|
|
996
|
+
# query parameters
|
|
997
|
+
query_params = opts[:query_params] || {}
|
|
998
|
+
|
|
999
|
+
# header parameters
|
|
1000
|
+
header_params = opts[:header_params] || {}
|
|
1001
|
+
# HTTP header 'Accept' (if needed)
|
|
1002
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1003
|
+
header_params[:'X-Managed-User-Id'] = opts[:'x_managed_user_id'] if !opts[:'x_managed_user_id'].nil?
|
|
1004
|
+
header_params[:'X-Managed-User-External-Id'] = opts[:'x_managed_user_external_id'] if !opts[:'x_managed_user_external_id'].nil?
|
|
1005
|
+
|
|
1006
|
+
# form parameters
|
|
1007
|
+
form_params = opts[:form_params] || {}
|
|
1008
|
+
|
|
1009
|
+
# http body (model)
|
|
1010
|
+
post_body = opts[:debug_body]
|
|
1011
|
+
|
|
1012
|
+
# return_type
|
|
1013
|
+
return_type = opts[:debug_return_type] || 'ListWorkspaceWorkflowPresets200Response'
|
|
1014
|
+
|
|
1015
|
+
# auth_names
|
|
1016
|
+
auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
|
|
1017
|
+
|
|
1018
|
+
new_options = opts.merge(
|
|
1019
|
+
:operation => :"WorkspacesApi.list_workspace_workflow_presets_1",
|
|
1020
|
+
:header_params => header_params,
|
|
1021
|
+
:query_params => query_params,
|
|
1022
|
+
:form_params => form_params,
|
|
1023
|
+
:body => post_body,
|
|
1024
|
+
:auth_names => auth_names,
|
|
1025
|
+
:return_type => return_type
|
|
1026
|
+
)
|
|
1027
|
+
|
|
1028
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1029
|
+
if @api_client.config.debugging
|
|
1030
|
+
@api_client.config.logger.debug "API called: WorkspacesApi#list_workspace_workflow_presets_1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1031
|
+
end
|
|
1032
|
+
return data, status_code, headers
|
|
1033
|
+
end
|
|
1034
|
+
|
|
1035
|
+
# List the Published Versions of a Workflow
|
|
1036
|
+
# 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.
|
|
1037
|
+
# @param workspace_id [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.
|
|
1038
|
+
# @param workflow_id [String] The workflow's id
|
|
1039
|
+
# @param [Hash] opts the optional parameters
|
|
1040
|
+
# @option opts [String] :x_managed_user_id 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.
|
|
1041
|
+
# @option opts [String] :x_managed_user_external_id 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.
|
|
1042
|
+
# @return [ListWorkspaceWorkflowVersions200Response]
|
|
1043
|
+
def list_workspace_workflow_versions_1(workspace_id, workflow_id, opts = {})
|
|
1044
|
+
data, _status_code, _headers = list_workspace_workflow_versions_1_with_http_info(workspace_id, workflow_id, opts)
|
|
1045
|
+
data
|
|
1046
|
+
end
|
|
1047
|
+
|
|
1048
|
+
# List the Published Versions of a Workflow
|
|
1049
|
+
# 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.
|
|
1050
|
+
# @param workspace_id [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.
|
|
1051
|
+
# @param workflow_id [String] The workflow's id
|
|
1052
|
+
# @param [Hash] opts the optional parameters
|
|
1053
|
+
# @option opts [String] :x_managed_user_id 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.
|
|
1054
|
+
# @option opts [String] :x_managed_user_external_id 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.
|
|
1055
|
+
# @return [Array<(ListWorkspaceWorkflowVersions200Response, Integer, Hash)>] ListWorkspaceWorkflowVersions200Response data, response status code and response headers
|
|
1056
|
+
def list_workspace_workflow_versions_1_with_http_info(workspace_id, workflow_id, opts = {})
|
|
1057
|
+
if @api_client.config.debugging
|
|
1058
|
+
@api_client.config.logger.debug 'Calling API: WorkspacesApi.list_workspace_workflow_versions_1 ...'
|
|
1059
|
+
end
|
|
1060
|
+
# verify the required parameter 'workspace_id' is set
|
|
1061
|
+
if @api_client.config.client_side_validation && workspace_id.nil?
|
|
1062
|
+
fail ArgumentError, "Missing the required parameter 'workspace_id' when calling WorkspacesApi.list_workspace_workflow_versions_1"
|
|
1063
|
+
end
|
|
1064
|
+
# verify the required parameter 'workflow_id' is set
|
|
1065
|
+
if @api_client.config.client_side_validation && workflow_id.nil?
|
|
1066
|
+
fail ArgumentError, "Missing the required parameter 'workflow_id' when calling WorkspacesApi.list_workspace_workflow_versions_1"
|
|
1067
|
+
end
|
|
1068
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length > 255
|
|
1069
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling WorkspacesApi.list_workspace_workflow_versions_1, the character length must be smaller than or equal to 255.'
|
|
1070
|
+
end
|
|
1071
|
+
|
|
1072
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length < 1
|
|
1073
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling WorkspacesApi.list_workspace_workflow_versions_1, the character length must be great than or equal to 1.'
|
|
1074
|
+
end
|
|
1075
|
+
|
|
1076
|
+
# resource path
|
|
1077
|
+
local_var_path = '/workspaces/{workspaceId}/workflows/{workflowId}/versions'.sub('{' + 'workspaceId' + '}', CGI.escape(workspace_id.to_s)).sub('{' + 'workflowId' + '}', CGI.escape(workflow_id.to_s))
|
|
1078
|
+
|
|
1079
|
+
# query parameters
|
|
1080
|
+
query_params = opts[:query_params] || {}
|
|
1081
|
+
|
|
1082
|
+
# header parameters
|
|
1083
|
+
header_params = opts[:header_params] || {}
|
|
1084
|
+
# HTTP header 'Accept' (if needed)
|
|
1085
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1086
|
+
header_params[:'X-Managed-User-Id'] = opts[:'x_managed_user_id'] if !opts[:'x_managed_user_id'].nil?
|
|
1087
|
+
header_params[:'X-Managed-User-External-Id'] = opts[:'x_managed_user_external_id'] if !opts[:'x_managed_user_external_id'].nil?
|
|
1088
|
+
|
|
1089
|
+
# form parameters
|
|
1090
|
+
form_params = opts[:form_params] || {}
|
|
1091
|
+
|
|
1092
|
+
# http body (model)
|
|
1093
|
+
post_body = opts[:debug_body]
|
|
1094
|
+
|
|
1095
|
+
# return_type
|
|
1096
|
+
return_type = opts[:debug_return_type] || 'ListWorkspaceWorkflowVersions200Response'
|
|
1097
|
+
|
|
1098
|
+
# auth_names
|
|
1099
|
+
auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
|
|
1100
|
+
|
|
1101
|
+
new_options = opts.merge(
|
|
1102
|
+
:operation => :"WorkspacesApi.list_workspace_workflow_versions_1",
|
|
1103
|
+
:header_params => header_params,
|
|
1104
|
+
:query_params => query_params,
|
|
1105
|
+
:form_params => form_params,
|
|
1106
|
+
:body => post_body,
|
|
1107
|
+
:auth_names => auth_names,
|
|
1108
|
+
:return_type => return_type
|
|
1109
|
+
)
|
|
1110
|
+
|
|
1111
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1112
|
+
if @api_client.config.debugging
|
|
1113
|
+
@api_client.config.logger.debug "API called: WorkspacesApi#list_workspace_workflow_versions_1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1114
|
+
end
|
|
1115
|
+
return data, status_code, headers
|
|
1116
|
+
end
|
|
1117
|
+
|
|
1118
|
+
# List the Workflows of a Workspace
|
|
1119
|
+
# 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.
|
|
1120
|
+
# @param workspace_id [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.
|
|
1121
|
+
# @param [Hash] opts the optional parameters
|
|
1122
|
+
# @option opts [String] :search Text the workflow's name must contain
|
|
1123
|
+
# @option opts [String] :status One state to list (`draft`, `live`, `paused`, `archived`), or `all` for every state. Without it, the ones in use (draft, live and paused).
|
|
1124
|
+
# @option opts [String] :sort `<field>:<asc|desc>` where field is createdAt, lastPublishedAt, runsCount or name (or just asc / desc for createdAt). Newest first when not given.
|
|
1125
|
+
# @option opts [Integer] :limit Page size (1-100, 50 when not given)
|
|
1126
|
+
# @option opts [Integer] :offset How many to skip (0 when not given)
|
|
1127
|
+
# @option opts [String] :x_managed_user_id 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.
|
|
1128
|
+
# @option opts [String] :x_managed_user_external_id 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.
|
|
1129
|
+
# @return [ListWorkspaceWorkflows200Response]
|
|
1130
|
+
def list_workspace_workflows_1(workspace_id, opts = {})
|
|
1131
|
+
data, _status_code, _headers = list_workspace_workflows_1_with_http_info(workspace_id, opts)
|
|
1132
|
+
data
|
|
1133
|
+
end
|
|
1134
|
+
|
|
1135
|
+
# List the Workflows of a Workspace
|
|
1136
|
+
# 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.
|
|
1137
|
+
# @param workspace_id [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.
|
|
1138
|
+
# @param [Hash] opts the optional parameters
|
|
1139
|
+
# @option opts [String] :search Text the workflow's name must contain
|
|
1140
|
+
# @option opts [String] :status One state to list (`draft`, `live`, `paused`, `archived`), or `all` for every state. Without it, the ones in use (draft, live and paused).
|
|
1141
|
+
# @option opts [String] :sort `<field>:<asc|desc>` where field is createdAt, lastPublishedAt, runsCount or name (or just asc / desc for createdAt). Newest first when not given.
|
|
1142
|
+
# @option opts [Integer] :limit Page size (1-100, 50 when not given)
|
|
1143
|
+
# @option opts [Integer] :offset How many to skip (0 when not given)
|
|
1144
|
+
# @option opts [String] :x_managed_user_id 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.
|
|
1145
|
+
# @option opts [String] :x_managed_user_external_id 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.
|
|
1146
|
+
# @return [Array<(ListWorkspaceWorkflows200Response, Integer, Hash)>] ListWorkspaceWorkflows200Response data, response status code and response headers
|
|
1147
|
+
def list_workspace_workflows_1_with_http_info(workspace_id, opts = {})
|
|
1148
|
+
if @api_client.config.debugging
|
|
1149
|
+
@api_client.config.logger.debug 'Calling API: WorkspacesApi.list_workspace_workflows_1 ...'
|
|
1150
|
+
end
|
|
1151
|
+
# verify the required parameter 'workspace_id' is set
|
|
1152
|
+
if @api_client.config.client_side_validation && workspace_id.nil?
|
|
1153
|
+
fail ArgumentError, "Missing the required parameter 'workspace_id' when calling WorkspacesApi.list_workspace_workflows_1"
|
|
1154
|
+
end
|
|
1155
|
+
if @api_client.config.client_side_validation && !opts[:'search'].nil? && opts[:'search'].to_s.length > 120
|
|
1156
|
+
fail ArgumentError, 'invalid value for "opts[:"search"]" when calling WorkspacesApi.list_workspace_workflows_1, the character length must be smaller than or equal to 120.'
|
|
1157
|
+
end
|
|
1158
|
+
|
|
1159
|
+
allowable_values = ["draft", "live", "paused", "archived", "all"]
|
|
1160
|
+
if @api_client.config.client_side_validation && opts[:'status'] && !allowable_values.include?(opts[:'status'])
|
|
1161
|
+
fail ArgumentError, "invalid value for \"status\", must be one of #{allowable_values}"
|
|
1162
|
+
end
|
|
1163
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length > 255
|
|
1164
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling WorkspacesApi.list_workspace_workflows_1, the character length must be smaller than or equal to 255.'
|
|
1165
|
+
end
|
|
1166
|
+
|
|
1167
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length < 1
|
|
1168
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling WorkspacesApi.list_workspace_workflows_1, the character length must be great than or equal to 1.'
|
|
1169
|
+
end
|
|
1170
|
+
|
|
1171
|
+
# resource path
|
|
1172
|
+
local_var_path = '/workspaces/{workspaceId}/workflows'.sub('{' + 'workspaceId' + '}', CGI.escape(workspace_id.to_s))
|
|
1173
|
+
|
|
1174
|
+
# query parameters
|
|
1175
|
+
query_params = opts[:query_params] || {}
|
|
1176
|
+
query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
|
|
1177
|
+
query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
|
|
1178
|
+
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
|
1179
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
1180
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
|
1181
|
+
|
|
1182
|
+
# header parameters
|
|
1183
|
+
header_params = opts[:header_params] || {}
|
|
1184
|
+
# HTTP header 'Accept' (if needed)
|
|
1185
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1186
|
+
header_params[:'X-Managed-User-Id'] = opts[:'x_managed_user_id'] if !opts[:'x_managed_user_id'].nil?
|
|
1187
|
+
header_params[:'X-Managed-User-External-Id'] = opts[:'x_managed_user_external_id'] if !opts[:'x_managed_user_external_id'].nil?
|
|
1188
|
+
|
|
1189
|
+
# form parameters
|
|
1190
|
+
form_params = opts[:form_params] || {}
|
|
1191
|
+
|
|
1192
|
+
# http body (model)
|
|
1193
|
+
post_body = opts[:debug_body]
|
|
1194
|
+
|
|
1195
|
+
# return_type
|
|
1196
|
+
return_type = opts[:debug_return_type] || 'ListWorkspaceWorkflows200Response'
|
|
1197
|
+
|
|
1198
|
+
# auth_names
|
|
1199
|
+
auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
|
|
1200
|
+
|
|
1201
|
+
new_options = opts.merge(
|
|
1202
|
+
:operation => :"WorkspacesApi.list_workspace_workflows_1",
|
|
1203
|
+
:header_params => header_params,
|
|
1204
|
+
:query_params => query_params,
|
|
1205
|
+
:form_params => form_params,
|
|
1206
|
+
:body => post_body,
|
|
1207
|
+
:auth_names => auth_names,
|
|
1208
|
+
:return_type => return_type
|
|
1209
|
+
)
|
|
1210
|
+
|
|
1211
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1212
|
+
if @api_client.config.debugging
|
|
1213
|
+
@api_client.config.logger.debug "API called: WorkspacesApi#list_workspace_workflows_1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1214
|
+
end
|
|
1215
|
+
return data, status_code, headers
|
|
1216
|
+
end
|
|
1217
|
+
|
|
1218
|
+
# Pause a Workflow
|
|
1219
|
+
# 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.
|
|
1220
|
+
# @param workspace_id [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.
|
|
1221
|
+
# @param workflow_id [String] The workflow's id
|
|
1222
|
+
# @param [Hash] opts the optional parameters
|
|
1223
|
+
# @option opts [String] :x_managed_user_id 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.
|
|
1224
|
+
# @option opts [String] :x_managed_user_external_id 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.
|
|
1225
|
+
# @return [SaveWorkspaceWorkflow200Response]
|
|
1226
|
+
def pause_workspace_workflow_1(workspace_id, workflow_id, opts = {})
|
|
1227
|
+
data, _status_code, _headers = pause_workspace_workflow_1_with_http_info(workspace_id, workflow_id, opts)
|
|
1228
|
+
data
|
|
1229
|
+
end
|
|
1230
|
+
|
|
1231
|
+
# Pause a Workflow
|
|
1232
|
+
# 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.
|
|
1233
|
+
# @param workspace_id [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.
|
|
1234
|
+
# @param workflow_id [String] The workflow's id
|
|
1235
|
+
# @param [Hash] opts the optional parameters
|
|
1236
|
+
# @option opts [String] :x_managed_user_id 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.
|
|
1237
|
+
# @option opts [String] :x_managed_user_external_id 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.
|
|
1238
|
+
# @return [Array<(SaveWorkspaceWorkflow200Response, Integer, Hash)>] SaveWorkspaceWorkflow200Response data, response status code and response headers
|
|
1239
|
+
def pause_workspace_workflow_1_with_http_info(workspace_id, workflow_id, opts = {})
|
|
1240
|
+
if @api_client.config.debugging
|
|
1241
|
+
@api_client.config.logger.debug 'Calling API: WorkspacesApi.pause_workspace_workflow_1 ...'
|
|
1242
|
+
end
|
|
1243
|
+
# verify the required parameter 'workspace_id' is set
|
|
1244
|
+
if @api_client.config.client_side_validation && workspace_id.nil?
|
|
1245
|
+
fail ArgumentError, "Missing the required parameter 'workspace_id' when calling WorkspacesApi.pause_workspace_workflow_1"
|
|
1246
|
+
end
|
|
1247
|
+
# verify the required parameter 'workflow_id' is set
|
|
1248
|
+
if @api_client.config.client_side_validation && workflow_id.nil?
|
|
1249
|
+
fail ArgumentError, "Missing the required parameter 'workflow_id' when calling WorkspacesApi.pause_workspace_workflow_1"
|
|
1250
|
+
end
|
|
1251
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length > 255
|
|
1252
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling WorkspacesApi.pause_workspace_workflow_1, the character length must be smaller than or equal to 255.'
|
|
1253
|
+
end
|
|
1254
|
+
|
|
1255
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length < 1
|
|
1256
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling WorkspacesApi.pause_workspace_workflow_1, the character length must be great than or equal to 1.'
|
|
1257
|
+
end
|
|
1258
|
+
|
|
1259
|
+
# resource path
|
|
1260
|
+
local_var_path = '/workspaces/{workspaceId}/workflows/{workflowId}/pause'.sub('{' + 'workspaceId' + '}', CGI.escape(workspace_id.to_s)).sub('{' + 'workflowId' + '}', CGI.escape(workflow_id.to_s))
|
|
1261
|
+
|
|
1262
|
+
# query parameters
|
|
1263
|
+
query_params = opts[:query_params] || {}
|
|
1264
|
+
|
|
1265
|
+
# header parameters
|
|
1266
|
+
header_params = opts[:header_params] || {}
|
|
1267
|
+
# HTTP header 'Accept' (if needed)
|
|
1268
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1269
|
+
header_params[:'X-Managed-User-Id'] = opts[:'x_managed_user_id'] if !opts[:'x_managed_user_id'].nil?
|
|
1270
|
+
header_params[:'X-Managed-User-External-Id'] = opts[:'x_managed_user_external_id'] if !opts[:'x_managed_user_external_id'].nil?
|
|
1271
|
+
|
|
1272
|
+
# form parameters
|
|
1273
|
+
form_params = opts[:form_params] || {}
|
|
1274
|
+
|
|
1275
|
+
# http body (model)
|
|
1276
|
+
post_body = opts[:debug_body]
|
|
1277
|
+
|
|
1278
|
+
# return_type
|
|
1279
|
+
return_type = opts[:debug_return_type] || 'SaveWorkspaceWorkflow200Response'
|
|
1280
|
+
|
|
1281
|
+
# auth_names
|
|
1282
|
+
auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
|
|
1283
|
+
|
|
1284
|
+
new_options = opts.merge(
|
|
1285
|
+
:operation => :"WorkspacesApi.pause_workspace_workflow_1",
|
|
1286
|
+
:header_params => header_params,
|
|
1287
|
+
:query_params => query_params,
|
|
1288
|
+
:form_params => form_params,
|
|
1289
|
+
:body => post_body,
|
|
1290
|
+
:auth_names => auth_names,
|
|
1291
|
+
:return_type => return_type
|
|
1292
|
+
)
|
|
1293
|
+
|
|
1294
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
1295
|
+
if @api_client.config.debugging
|
|
1296
|
+
@api_client.config.logger.debug "API called: WorkspacesApi#pause_workspace_workflow_1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1297
|
+
end
|
|
1298
|
+
return data, status_code, headers
|
|
1299
|
+
end
|
|
1300
|
+
|
|
1301
|
+
# Publish the Draft of a Workflow
|
|
1302
|
+
# 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.
|
|
1303
|
+
# @param workspace_id [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.
|
|
1304
|
+
# @param workflow_id [String] The workflow's id
|
|
1305
|
+
# @param idempotency_key [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`).
|
|
1306
|
+
# @param publish_workspace_workflow_request [PublishWorkspaceWorkflowRequest]
|
|
1307
|
+
# @param [Hash] opts the optional parameters
|
|
1308
|
+
# @option opts [String] :x_managed_user_id 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.
|
|
1309
|
+
# @option opts [String] :x_managed_user_external_id 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.
|
|
1310
|
+
# @return [PublishWorkspaceWorkflow200Response]
|
|
1311
|
+
def publish_workspace_workflow_1(workspace_id, workflow_id, idempotency_key, publish_workspace_workflow_request, opts = {})
|
|
1312
|
+
data, _status_code, _headers = publish_workspace_workflow_1_with_http_info(workspace_id, workflow_id, idempotency_key, publish_workspace_workflow_request, opts)
|
|
1313
|
+
data
|
|
1314
|
+
end
|
|
1315
|
+
|
|
1316
|
+
# Publish the Draft of a Workflow
|
|
1317
|
+
# 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.
|
|
1318
|
+
# @param workspace_id [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.
|
|
1319
|
+
# @param workflow_id [String] The workflow's id
|
|
1320
|
+
# @param idempotency_key [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`).
|
|
1321
|
+
# @param publish_workspace_workflow_request [PublishWorkspaceWorkflowRequest]
|
|
1322
|
+
# @param [Hash] opts the optional parameters
|
|
1323
|
+
# @option opts [String] :x_managed_user_id 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.
|
|
1324
|
+
# @option opts [String] :x_managed_user_external_id 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.
|
|
1325
|
+
# @return [Array<(PublishWorkspaceWorkflow200Response, Integer, Hash)>] PublishWorkspaceWorkflow200Response data, response status code and response headers
|
|
1326
|
+
def publish_workspace_workflow_1_with_http_info(workspace_id, workflow_id, idempotency_key, publish_workspace_workflow_request, opts = {})
|
|
1327
|
+
if @api_client.config.debugging
|
|
1328
|
+
@api_client.config.logger.debug 'Calling API: WorkspacesApi.publish_workspace_workflow_1 ...'
|
|
1329
|
+
end
|
|
1330
|
+
# verify the required parameter 'workspace_id' is set
|
|
1331
|
+
if @api_client.config.client_side_validation && workspace_id.nil?
|
|
1332
|
+
fail ArgumentError, "Missing the required parameter 'workspace_id' when calling WorkspacesApi.publish_workspace_workflow_1"
|
|
1333
|
+
end
|
|
1334
|
+
# verify the required parameter 'workflow_id' is set
|
|
1335
|
+
if @api_client.config.client_side_validation && workflow_id.nil?
|
|
1336
|
+
fail ArgumentError, "Missing the required parameter 'workflow_id' when calling WorkspacesApi.publish_workspace_workflow_1"
|
|
1337
|
+
end
|
|
1338
|
+
# verify the required parameter 'idempotency_key' is set
|
|
1339
|
+
if @api_client.config.client_side_validation && idempotency_key.nil?
|
|
1340
|
+
fail ArgumentError, "Missing the required parameter 'idempotency_key' when calling WorkspacesApi.publish_workspace_workflow_1"
|
|
1341
|
+
end
|
|
1342
|
+
if @api_client.config.client_side_validation && idempotency_key.to_s.length > 50
|
|
1343
|
+
fail ArgumentError, 'invalid value for "idempotency_key" when calling WorkspacesApi.publish_workspace_workflow_1, the character length must be smaller than or equal to 50.'
|
|
1344
|
+
end
|
|
1345
|
+
|
|
1346
|
+
if @api_client.config.client_side_validation && idempotency_key.to_s.length < 8
|
|
1347
|
+
fail ArgumentError, 'invalid value for "idempotency_key" when calling WorkspacesApi.publish_workspace_workflow_1, the character length must be great than or equal to 8.'
|
|
1348
|
+
end
|
|
1349
|
+
|
|
1350
|
+
pattern = Regexp.new(/^[a-zA-Z0-9_-]{8,50}$/)
|
|
1351
|
+
if @api_client.config.client_side_validation && idempotency_key !~ pattern
|
|
1352
|
+
fail ArgumentError, "invalid value for 'idempotency_key' when calling WorkspacesApi.publish_workspace_workflow_1, must conform to the pattern #{pattern}."
|
|
1353
|
+
end
|
|
1354
|
+
|
|
1355
|
+
# verify the required parameter 'publish_workspace_workflow_request' is set
|
|
1356
|
+
if @api_client.config.client_side_validation && publish_workspace_workflow_request.nil?
|
|
1357
|
+
fail ArgumentError, "Missing the required parameter 'publish_workspace_workflow_request' when calling WorkspacesApi.publish_workspace_workflow_1"
|
|
1358
|
+
end
|
|
1359
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length > 255
|
|
1360
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling WorkspacesApi.publish_workspace_workflow_1, the character length must be smaller than or equal to 255.'
|
|
1361
|
+
end
|
|
1362
|
+
|
|
1363
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length < 1
|
|
1364
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling WorkspacesApi.publish_workspace_workflow_1, the character length must be great than or equal to 1.'
|
|
1365
|
+
end
|
|
1366
|
+
|
|
1367
|
+
# resource path
|
|
1368
|
+
local_var_path = '/workspaces/{workspaceId}/workflows/{workflowId}/publish'.sub('{' + 'workspaceId' + '}', CGI.escape(workspace_id.to_s)).sub('{' + 'workflowId' + '}', CGI.escape(workflow_id.to_s))
|
|
1369
|
+
|
|
1370
|
+
# query parameters
|
|
1371
|
+
query_params = opts[:query_params] || {}
|
|
1372
|
+
|
|
1373
|
+
# header parameters
|
|
1374
|
+
header_params = opts[:header_params] || {}
|
|
1375
|
+
# HTTP header 'Accept' (if needed)
|
|
1376
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1377
|
+
# HTTP header 'Content-Type'
|
|
1378
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
1379
|
+
if !content_type.nil?
|
|
1380
|
+
header_params['Content-Type'] = content_type
|
|
1381
|
+
end
|
|
1382
|
+
header_params[:'Idempotency-Key'] = idempotency_key
|
|
1383
|
+
header_params[:'X-Managed-User-Id'] = opts[:'x_managed_user_id'] if !opts[:'x_managed_user_id'].nil?
|
|
1384
|
+
header_params[:'X-Managed-User-External-Id'] = opts[:'x_managed_user_external_id'] if !opts[:'x_managed_user_external_id'].nil?
|
|
1385
|
+
|
|
1386
|
+
# form parameters
|
|
1387
|
+
form_params = opts[:form_params] || {}
|
|
1388
|
+
|
|
1389
|
+
# http body (model)
|
|
1390
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(publish_workspace_workflow_request)
|
|
1391
|
+
|
|
1392
|
+
# return_type
|
|
1393
|
+
return_type = opts[:debug_return_type] || 'PublishWorkspaceWorkflow200Response'
|
|
1394
|
+
|
|
1395
|
+
# auth_names
|
|
1396
|
+
auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
|
|
1397
|
+
|
|
1398
|
+
new_options = opts.merge(
|
|
1399
|
+
:operation => :"WorkspacesApi.publish_workspace_workflow_1",
|
|
1400
|
+
:header_params => header_params,
|
|
1401
|
+
:query_params => query_params,
|
|
1402
|
+
:form_params => form_params,
|
|
1403
|
+
:body => post_body,
|
|
1404
|
+
:auth_names => auth_names,
|
|
1405
|
+
:return_type => return_type
|
|
1406
|
+
)
|
|
1407
|
+
|
|
1408
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
1409
|
+
if @api_client.config.debugging
|
|
1410
|
+
@api_client.config.logger.debug "API called: WorkspacesApi#publish_workspace_workflow_1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1411
|
+
end
|
|
1412
|
+
return data, status_code, headers
|
|
1413
|
+
end
|
|
1414
|
+
|
|
1415
|
+
# Restore a Version of a Workflow into the Draft
|
|
1416
|
+
# 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.
|
|
1417
|
+
# @param workspace_id [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.
|
|
1418
|
+
# @param workflow_id [String] The workflow's id
|
|
1419
|
+
# @param version_id [String] The id of a published version of the workflow
|
|
1420
|
+
# @param publish_workspace_workflow_request [PublishWorkspaceWorkflowRequest]
|
|
1421
|
+
# @param [Hash] opts the optional parameters
|
|
1422
|
+
# @option opts [String] :x_managed_user_id 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.
|
|
1423
|
+
# @option opts [String] :x_managed_user_external_id 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.
|
|
1424
|
+
# @return [CreateWorkspaceWorkflowFromPreset201Response]
|
|
1425
|
+
def restore_workspace_workflow_version_1(workspace_id, workflow_id, version_id, publish_workspace_workflow_request, opts = {})
|
|
1426
|
+
data, _status_code, _headers = restore_workspace_workflow_version_1_with_http_info(workspace_id, workflow_id, version_id, publish_workspace_workflow_request, opts)
|
|
1427
|
+
data
|
|
1428
|
+
end
|
|
1429
|
+
|
|
1430
|
+
# Restore a Version of a Workflow into the Draft
|
|
1431
|
+
# 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.
|
|
1432
|
+
# @param workspace_id [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.
|
|
1433
|
+
# @param workflow_id [String] The workflow's id
|
|
1434
|
+
# @param version_id [String] The id of a published version of the workflow
|
|
1435
|
+
# @param publish_workspace_workflow_request [PublishWorkspaceWorkflowRequest]
|
|
1436
|
+
# @param [Hash] opts the optional parameters
|
|
1437
|
+
# @option opts [String] :x_managed_user_id 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.
|
|
1438
|
+
# @option opts [String] :x_managed_user_external_id 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.
|
|
1439
|
+
# @return [Array<(CreateWorkspaceWorkflowFromPreset201Response, Integer, Hash)>] CreateWorkspaceWorkflowFromPreset201Response data, response status code and response headers
|
|
1440
|
+
def restore_workspace_workflow_version_1_with_http_info(workspace_id, workflow_id, version_id, publish_workspace_workflow_request, opts = {})
|
|
1441
|
+
if @api_client.config.debugging
|
|
1442
|
+
@api_client.config.logger.debug 'Calling API: WorkspacesApi.restore_workspace_workflow_version_1 ...'
|
|
1443
|
+
end
|
|
1444
|
+
# verify the required parameter 'workspace_id' is set
|
|
1445
|
+
if @api_client.config.client_side_validation && workspace_id.nil?
|
|
1446
|
+
fail ArgumentError, "Missing the required parameter 'workspace_id' when calling WorkspacesApi.restore_workspace_workflow_version_1"
|
|
1447
|
+
end
|
|
1448
|
+
# verify the required parameter 'workflow_id' is set
|
|
1449
|
+
if @api_client.config.client_side_validation && workflow_id.nil?
|
|
1450
|
+
fail ArgumentError, "Missing the required parameter 'workflow_id' when calling WorkspacesApi.restore_workspace_workflow_version_1"
|
|
1451
|
+
end
|
|
1452
|
+
# verify the required parameter 'version_id' is set
|
|
1453
|
+
if @api_client.config.client_side_validation && version_id.nil?
|
|
1454
|
+
fail ArgumentError, "Missing the required parameter 'version_id' when calling WorkspacesApi.restore_workspace_workflow_version_1"
|
|
1455
|
+
end
|
|
1456
|
+
# verify the required parameter 'publish_workspace_workflow_request' is set
|
|
1457
|
+
if @api_client.config.client_side_validation && publish_workspace_workflow_request.nil?
|
|
1458
|
+
fail ArgumentError, "Missing the required parameter 'publish_workspace_workflow_request' when calling WorkspacesApi.restore_workspace_workflow_version_1"
|
|
1459
|
+
end
|
|
1460
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length > 255
|
|
1461
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling WorkspacesApi.restore_workspace_workflow_version_1, the character length must be smaller than or equal to 255.'
|
|
1462
|
+
end
|
|
1463
|
+
|
|
1464
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length < 1
|
|
1465
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling WorkspacesApi.restore_workspace_workflow_version_1, the character length must be great than or equal to 1.'
|
|
1466
|
+
end
|
|
1467
|
+
|
|
1468
|
+
# resource path
|
|
1469
|
+
local_var_path = '/workspaces/{workspaceId}/workflows/{workflowId}/versions/{versionId}/restore'.sub('{' + 'workspaceId' + '}', CGI.escape(workspace_id.to_s)).sub('{' + 'workflowId' + '}', CGI.escape(workflow_id.to_s)).sub('{' + 'versionId' + '}', CGI.escape(version_id.to_s))
|
|
1470
|
+
|
|
1471
|
+
# query parameters
|
|
1472
|
+
query_params = opts[:query_params] || {}
|
|
1473
|
+
|
|
1474
|
+
# header parameters
|
|
1475
|
+
header_params = opts[:header_params] || {}
|
|
1476
|
+
# HTTP header 'Accept' (if needed)
|
|
1477
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1478
|
+
# HTTP header 'Content-Type'
|
|
1479
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
1480
|
+
if !content_type.nil?
|
|
1481
|
+
header_params['Content-Type'] = content_type
|
|
1482
|
+
end
|
|
1483
|
+
header_params[:'X-Managed-User-Id'] = opts[:'x_managed_user_id'] if !opts[:'x_managed_user_id'].nil?
|
|
1484
|
+
header_params[:'X-Managed-User-External-Id'] = opts[:'x_managed_user_external_id'] if !opts[:'x_managed_user_external_id'].nil?
|
|
1485
|
+
|
|
1486
|
+
# form parameters
|
|
1487
|
+
form_params = opts[:form_params] || {}
|
|
1488
|
+
|
|
1489
|
+
# http body (model)
|
|
1490
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(publish_workspace_workflow_request)
|
|
1491
|
+
|
|
1492
|
+
# return_type
|
|
1493
|
+
return_type = opts[:debug_return_type] || 'CreateWorkspaceWorkflowFromPreset201Response'
|
|
1494
|
+
|
|
1495
|
+
# auth_names
|
|
1496
|
+
auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
|
|
1497
|
+
|
|
1498
|
+
new_options = opts.merge(
|
|
1499
|
+
:operation => :"WorkspacesApi.restore_workspace_workflow_version_1",
|
|
1500
|
+
:header_params => header_params,
|
|
1501
|
+
:query_params => query_params,
|
|
1502
|
+
:form_params => form_params,
|
|
1503
|
+
:body => post_body,
|
|
1504
|
+
:auth_names => auth_names,
|
|
1505
|
+
:return_type => return_type
|
|
1506
|
+
)
|
|
1507
|
+
|
|
1508
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
1509
|
+
if @api_client.config.debugging
|
|
1510
|
+
@api_client.config.logger.debug "API called: WorkspacesApi#restore_workspace_workflow_version_1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1511
|
+
end
|
|
1512
|
+
return data, status_code, headers
|
|
1513
|
+
end
|
|
1514
|
+
|
|
1515
|
+
# Resume a Paused Workflow
|
|
1516
|
+
# 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.
|
|
1517
|
+
# @param workspace_id [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.
|
|
1518
|
+
# @param workflow_id [String] The workflow's id
|
|
1519
|
+
# @param [Hash] opts the optional parameters
|
|
1520
|
+
# @option opts [String] :x_managed_user_id 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.
|
|
1521
|
+
# @option opts [String] :x_managed_user_external_id 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.
|
|
1522
|
+
# @return [SaveWorkspaceWorkflow200Response]
|
|
1523
|
+
def resume_workspace_workflow_1(workspace_id, workflow_id, opts = {})
|
|
1524
|
+
data, _status_code, _headers = resume_workspace_workflow_1_with_http_info(workspace_id, workflow_id, opts)
|
|
1525
|
+
data
|
|
1526
|
+
end
|
|
1527
|
+
|
|
1528
|
+
# Resume a Paused Workflow
|
|
1529
|
+
# 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.
|
|
1530
|
+
# @param workspace_id [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.
|
|
1531
|
+
# @param workflow_id [String] The workflow's id
|
|
1532
|
+
# @param [Hash] opts the optional parameters
|
|
1533
|
+
# @option opts [String] :x_managed_user_id 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.
|
|
1534
|
+
# @option opts [String] :x_managed_user_external_id 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.
|
|
1535
|
+
# @return [Array<(SaveWorkspaceWorkflow200Response, Integer, Hash)>] SaveWorkspaceWorkflow200Response data, response status code and response headers
|
|
1536
|
+
def resume_workspace_workflow_1_with_http_info(workspace_id, workflow_id, opts = {})
|
|
1537
|
+
if @api_client.config.debugging
|
|
1538
|
+
@api_client.config.logger.debug 'Calling API: WorkspacesApi.resume_workspace_workflow_1 ...'
|
|
1539
|
+
end
|
|
1540
|
+
# verify the required parameter 'workspace_id' is set
|
|
1541
|
+
if @api_client.config.client_side_validation && workspace_id.nil?
|
|
1542
|
+
fail ArgumentError, "Missing the required parameter 'workspace_id' when calling WorkspacesApi.resume_workspace_workflow_1"
|
|
1543
|
+
end
|
|
1544
|
+
# verify the required parameter 'workflow_id' is set
|
|
1545
|
+
if @api_client.config.client_side_validation && workflow_id.nil?
|
|
1546
|
+
fail ArgumentError, "Missing the required parameter 'workflow_id' when calling WorkspacesApi.resume_workspace_workflow_1"
|
|
1547
|
+
end
|
|
1548
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length > 255
|
|
1549
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling WorkspacesApi.resume_workspace_workflow_1, the character length must be smaller than or equal to 255.'
|
|
1550
|
+
end
|
|
1551
|
+
|
|
1552
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length < 1
|
|
1553
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling WorkspacesApi.resume_workspace_workflow_1, the character length must be great than or equal to 1.'
|
|
1554
|
+
end
|
|
1555
|
+
|
|
1556
|
+
# resource path
|
|
1557
|
+
local_var_path = '/workspaces/{workspaceId}/workflows/{workflowId}/resume'.sub('{' + 'workspaceId' + '}', CGI.escape(workspace_id.to_s)).sub('{' + 'workflowId' + '}', CGI.escape(workflow_id.to_s))
|
|
1558
|
+
|
|
1559
|
+
# query parameters
|
|
1560
|
+
query_params = opts[:query_params] || {}
|
|
1561
|
+
|
|
1562
|
+
# header parameters
|
|
1563
|
+
header_params = opts[:header_params] || {}
|
|
1564
|
+
# HTTP header 'Accept' (if needed)
|
|
1565
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1566
|
+
header_params[:'X-Managed-User-Id'] = opts[:'x_managed_user_id'] if !opts[:'x_managed_user_id'].nil?
|
|
1567
|
+
header_params[:'X-Managed-User-External-Id'] = opts[:'x_managed_user_external_id'] if !opts[:'x_managed_user_external_id'].nil?
|
|
1568
|
+
|
|
1569
|
+
# form parameters
|
|
1570
|
+
form_params = opts[:form_params] || {}
|
|
1571
|
+
|
|
1572
|
+
# http body (model)
|
|
1573
|
+
post_body = opts[:debug_body]
|
|
1574
|
+
|
|
1575
|
+
# return_type
|
|
1576
|
+
return_type = opts[:debug_return_type] || 'SaveWorkspaceWorkflow200Response'
|
|
1577
|
+
|
|
1578
|
+
# auth_names
|
|
1579
|
+
auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
|
|
1580
|
+
|
|
1581
|
+
new_options = opts.merge(
|
|
1582
|
+
:operation => :"WorkspacesApi.resume_workspace_workflow_1",
|
|
1583
|
+
:header_params => header_params,
|
|
1584
|
+
:query_params => query_params,
|
|
1585
|
+
:form_params => form_params,
|
|
1586
|
+
:body => post_body,
|
|
1587
|
+
:auth_names => auth_names,
|
|
1588
|
+
:return_type => return_type
|
|
1589
|
+
)
|
|
1590
|
+
|
|
1591
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
1592
|
+
if @api_client.config.debugging
|
|
1593
|
+
@api_client.config.logger.debug "API called: WorkspacesApi#resume_workspace_workflow_1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1594
|
+
end
|
|
1595
|
+
return data, status_code, headers
|
|
1596
|
+
end
|
|
1597
|
+
|
|
1598
|
+
# Save the Draft of a Workflow
|
|
1599
|
+
# 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.
|
|
1600
|
+
# @param workspace_id [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.
|
|
1601
|
+
# @param workflow_id [String] The workflow's id
|
|
1602
|
+
# @param save_workspace_workflow_request [SaveWorkspaceWorkflowRequest]
|
|
1603
|
+
# @param [Hash] opts the optional parameters
|
|
1604
|
+
# @option opts [String] :x_managed_user_id 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.
|
|
1605
|
+
# @option opts [String] :x_managed_user_external_id 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.
|
|
1606
|
+
# @return [SaveWorkspaceWorkflow200Response]
|
|
1607
|
+
def save_workspace_workflow_1(workspace_id, workflow_id, save_workspace_workflow_request, opts = {})
|
|
1608
|
+
data, _status_code, _headers = save_workspace_workflow_1_with_http_info(workspace_id, workflow_id, save_workspace_workflow_request, opts)
|
|
1609
|
+
data
|
|
1610
|
+
end
|
|
1611
|
+
|
|
1612
|
+
# Save the Draft of a Workflow
|
|
1613
|
+
# 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.
|
|
1614
|
+
# @param workspace_id [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.
|
|
1615
|
+
# @param workflow_id [String] The workflow's id
|
|
1616
|
+
# @param save_workspace_workflow_request [SaveWorkspaceWorkflowRequest]
|
|
1617
|
+
# @param [Hash] opts the optional parameters
|
|
1618
|
+
# @option opts [String] :x_managed_user_id 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.
|
|
1619
|
+
# @option opts [String] :x_managed_user_external_id 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.
|
|
1620
|
+
# @return [Array<(SaveWorkspaceWorkflow200Response, Integer, Hash)>] SaveWorkspaceWorkflow200Response data, response status code and response headers
|
|
1621
|
+
def save_workspace_workflow_1_with_http_info(workspace_id, workflow_id, save_workspace_workflow_request, opts = {})
|
|
1622
|
+
if @api_client.config.debugging
|
|
1623
|
+
@api_client.config.logger.debug 'Calling API: WorkspacesApi.save_workspace_workflow_1 ...'
|
|
1624
|
+
end
|
|
1625
|
+
# verify the required parameter 'workspace_id' is set
|
|
1626
|
+
if @api_client.config.client_side_validation && workspace_id.nil?
|
|
1627
|
+
fail ArgumentError, "Missing the required parameter 'workspace_id' when calling WorkspacesApi.save_workspace_workflow_1"
|
|
1628
|
+
end
|
|
1629
|
+
# verify the required parameter 'workflow_id' is set
|
|
1630
|
+
if @api_client.config.client_side_validation && workflow_id.nil?
|
|
1631
|
+
fail ArgumentError, "Missing the required parameter 'workflow_id' when calling WorkspacesApi.save_workspace_workflow_1"
|
|
1632
|
+
end
|
|
1633
|
+
# verify the required parameter 'save_workspace_workflow_request' is set
|
|
1634
|
+
if @api_client.config.client_side_validation && save_workspace_workflow_request.nil?
|
|
1635
|
+
fail ArgumentError, "Missing the required parameter 'save_workspace_workflow_request' when calling WorkspacesApi.save_workspace_workflow_1"
|
|
1636
|
+
end
|
|
1637
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length > 255
|
|
1638
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling WorkspacesApi.save_workspace_workflow_1, the character length must be smaller than or equal to 255.'
|
|
1639
|
+
end
|
|
1640
|
+
|
|
1641
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length < 1
|
|
1642
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling WorkspacesApi.save_workspace_workflow_1, the character length must be great than or equal to 1.'
|
|
1643
|
+
end
|
|
1644
|
+
|
|
1645
|
+
# resource path
|
|
1646
|
+
local_var_path = '/workspaces/{workspaceId}/workflows/{workflowId}'.sub('{' + 'workspaceId' + '}', CGI.escape(workspace_id.to_s)).sub('{' + 'workflowId' + '}', CGI.escape(workflow_id.to_s))
|
|
1647
|
+
|
|
1648
|
+
# query parameters
|
|
1649
|
+
query_params = opts[:query_params] || {}
|
|
1650
|
+
|
|
1651
|
+
# header parameters
|
|
1652
|
+
header_params = opts[:header_params] || {}
|
|
1653
|
+
# HTTP header 'Accept' (if needed)
|
|
1654
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1655
|
+
# HTTP header 'Content-Type'
|
|
1656
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
1657
|
+
if !content_type.nil?
|
|
1658
|
+
header_params['Content-Type'] = content_type
|
|
1659
|
+
end
|
|
1660
|
+
header_params[:'X-Managed-User-Id'] = opts[:'x_managed_user_id'] if !opts[:'x_managed_user_id'].nil?
|
|
1661
|
+
header_params[:'X-Managed-User-External-Id'] = opts[:'x_managed_user_external_id'] if !opts[:'x_managed_user_external_id'].nil?
|
|
1662
|
+
|
|
1663
|
+
# form parameters
|
|
1664
|
+
form_params = opts[:form_params] || {}
|
|
1665
|
+
|
|
1666
|
+
# http body (model)
|
|
1667
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(save_workspace_workflow_request)
|
|
1668
|
+
|
|
1669
|
+
# return_type
|
|
1670
|
+
return_type = opts[:debug_return_type] || 'SaveWorkspaceWorkflow200Response'
|
|
1671
|
+
|
|
1672
|
+
# auth_names
|
|
1673
|
+
auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
|
|
1674
|
+
|
|
1675
|
+
new_options = opts.merge(
|
|
1676
|
+
:operation => :"WorkspacesApi.save_workspace_workflow_1",
|
|
1677
|
+
:header_params => header_params,
|
|
1678
|
+
:query_params => query_params,
|
|
1679
|
+
:form_params => form_params,
|
|
1680
|
+
:body => post_body,
|
|
1681
|
+
:auth_names => auth_names,
|
|
1682
|
+
:return_type => return_type
|
|
1683
|
+
)
|
|
1684
|
+
|
|
1685
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
1686
|
+
if @api_client.config.debugging
|
|
1687
|
+
@api_client.config.logger.debug "API called: WorkspacesApi#save_workspace_workflow_1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1688
|
+
end
|
|
1689
|
+
return data, status_code, headers
|
|
1690
|
+
end
|
|
1691
|
+
|
|
1692
|
+
# Unarchive a Workflow
|
|
1693
|
+
# 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.
|
|
1694
|
+
# @param workspace_id [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.
|
|
1695
|
+
# @param workflow_id [String] The workflow's id
|
|
1696
|
+
# @param [Hash] opts the optional parameters
|
|
1697
|
+
# @option opts [String] :x_managed_user_id 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.
|
|
1698
|
+
# @option opts [String] :x_managed_user_external_id 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.
|
|
1699
|
+
# @return [SaveWorkspaceWorkflow200Response]
|
|
1700
|
+
def unarchive_workspace_workflow_1(workspace_id, workflow_id, opts = {})
|
|
1701
|
+
data, _status_code, _headers = unarchive_workspace_workflow_1_with_http_info(workspace_id, workflow_id, opts)
|
|
1702
|
+
data
|
|
1703
|
+
end
|
|
1704
|
+
|
|
1705
|
+
# Unarchive a Workflow
|
|
1706
|
+
# 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.
|
|
1707
|
+
# @param workspace_id [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.
|
|
1708
|
+
# @param workflow_id [String] The workflow's id
|
|
1709
|
+
# @param [Hash] opts the optional parameters
|
|
1710
|
+
# @option opts [String] :x_managed_user_id 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.
|
|
1711
|
+
# @option opts [String] :x_managed_user_external_id 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.
|
|
1712
|
+
# @return [Array<(SaveWorkspaceWorkflow200Response, Integer, Hash)>] SaveWorkspaceWorkflow200Response data, response status code and response headers
|
|
1713
|
+
def unarchive_workspace_workflow_1_with_http_info(workspace_id, workflow_id, opts = {})
|
|
1714
|
+
if @api_client.config.debugging
|
|
1715
|
+
@api_client.config.logger.debug 'Calling API: WorkspacesApi.unarchive_workspace_workflow_1 ...'
|
|
1716
|
+
end
|
|
1717
|
+
# verify the required parameter 'workspace_id' is set
|
|
1718
|
+
if @api_client.config.client_side_validation && workspace_id.nil?
|
|
1719
|
+
fail ArgumentError, "Missing the required parameter 'workspace_id' when calling WorkspacesApi.unarchive_workspace_workflow_1"
|
|
1720
|
+
end
|
|
1721
|
+
# verify the required parameter 'workflow_id' is set
|
|
1722
|
+
if @api_client.config.client_side_validation && workflow_id.nil?
|
|
1723
|
+
fail ArgumentError, "Missing the required parameter 'workflow_id' when calling WorkspacesApi.unarchive_workspace_workflow_1"
|
|
1724
|
+
end
|
|
1725
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length > 255
|
|
1726
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling WorkspacesApi.unarchive_workspace_workflow_1, the character length must be smaller than or equal to 255.'
|
|
1727
|
+
end
|
|
1728
|
+
|
|
1729
|
+
if @api_client.config.client_side_validation && !opts[:'x_managed_user_external_id'].nil? && opts[:'x_managed_user_external_id'].to_s.length < 1
|
|
1730
|
+
fail ArgumentError, 'invalid value for "opts[:"x_managed_user_external_id"]" when calling WorkspacesApi.unarchive_workspace_workflow_1, the character length must be great than or equal to 1.'
|
|
1731
|
+
end
|
|
1732
|
+
|
|
1733
|
+
# resource path
|
|
1734
|
+
local_var_path = '/workspaces/{workspaceId}/workflows/{workflowId}/unarchive'.sub('{' + 'workspaceId' + '}', CGI.escape(workspace_id.to_s)).sub('{' + 'workflowId' + '}', CGI.escape(workflow_id.to_s))
|
|
1735
|
+
|
|
1736
|
+
# query parameters
|
|
1737
|
+
query_params = opts[:query_params] || {}
|
|
1738
|
+
|
|
1739
|
+
# header parameters
|
|
1740
|
+
header_params = opts[:header_params] || {}
|
|
1741
|
+
# HTTP header 'Accept' (if needed)
|
|
1742
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1743
|
+
header_params[:'X-Managed-User-Id'] = opts[:'x_managed_user_id'] if !opts[:'x_managed_user_id'].nil?
|
|
1744
|
+
header_params[:'X-Managed-User-External-Id'] = opts[:'x_managed_user_external_id'] if !opts[:'x_managed_user_external_id'].nil?
|
|
1745
|
+
|
|
1746
|
+
# form parameters
|
|
1747
|
+
form_params = opts[:form_params] || {}
|
|
1748
|
+
|
|
1749
|
+
# http body (model)
|
|
1750
|
+
post_body = opts[:debug_body]
|
|
1751
|
+
|
|
1752
|
+
# return_type
|
|
1753
|
+
return_type = opts[:debug_return_type] || 'SaveWorkspaceWorkflow200Response'
|
|
1754
|
+
|
|
1755
|
+
# auth_names
|
|
1756
|
+
auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
|
|
1757
|
+
|
|
1758
|
+
new_options = opts.merge(
|
|
1759
|
+
:operation => :"WorkspacesApi.unarchive_workspace_workflow_1",
|
|
1760
|
+
:header_params => header_params,
|
|
1761
|
+
:query_params => query_params,
|
|
1762
|
+
:form_params => form_params,
|
|
1763
|
+
:body => post_body,
|
|
1764
|
+
:auth_names => auth_names,
|
|
1765
|
+
:return_type => return_type
|
|
1766
|
+
)
|
|
1767
|
+
|
|
1768
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
1769
|
+
if @api_client.config.debugging
|
|
1770
|
+
@api_client.config.logger.debug "API called: WorkspacesApi#unarchive_workspace_workflow_1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1771
|
+
end
|
|
1772
|
+
return data, status_code, headers
|
|
1773
|
+
end
|
|
1774
|
+
end
|
|
1775
|
+
end
|