Gallery API: Migratable Endpoint

Version:
Current
Last modified: August 25, 2020

Do not delete this has styles that are applied to the article.

Use the migratable endpoint to migrate workflows across Server environments. You can use this to manage workflow deployments during development and testing phases.

To begin, enable workflows for migration on the Workflows page of the Gallery Admin interface. Once you mark workflows for migration, follow these steps to publish them from the source environment into the appropriate subscription (studio) of a target environment.

Step 1. Get a List of Workflows Ready to Migrate

Next, get a list of workflows ready to migrate using the following endpoint:

  • Environment: Source
  • Method: GET
  • Endpoint: api/admin/v1/workflows/migratable/?subscriptionIds={subscriptionIds}/

Include a comma-separated list of subscriptionIds as a query parameter. Subscription IDs identify a specific studio.

The return is an array of workflows marked as ready to migrate under the specified subscription (studio). If you do not provide subscriptionsIds, the return includes all workflows marked as ready to migrate. The return includes 3 properties: appId, the currently published revisionId, and the subscriptionID the workflow belongs to.

Step 2. Download Workflows from the Source Environment

The following endpoint downloads the workflow as a YXZP file.

  • Environment: Source
  • Method: GET
  • Endpoint: api/admin/v1/{appID}/package/

Include an appID as a path parameter. The return will be a download of the entire workflow as a package.

Step 3. Publish Workflows in the Target Environment

The following endpoint publishes the downloaded workflow to the target environment.

  • Environment: Target
  • Method: POST
  • Endpoint: api/admin/v1/workflows/
Parameters
Parameter Description Type Required
file The filename of the new workflow. String True
name The new workflow name. String True
owner The owner of the migrated workflow. The email address must exist in the target environment. String True
validate Flag to validate the workflow upon migrating to the target environment. Boolean True
isPublic Flag to set the workflow to public to show in “My Company’s Gallery” in the target environment. Boolean True
SourceId This is the Source environment appId of the to-be-migrated workflow. If a workflow with the same sourceId exists, this replaces that workflow in the target environment. Otherwise, a new workflow will be generated.

(Send an empty string if you do not wish to specify an appID.)

String True
workerTag

Add a worker tag to the workflow to have a specific worker to run the workflow. 

(Send an empty string if you do not wish to specify worker.)

String

True

 

canDownload Flag to set the workflow as available for download by other users in the target environment. Boolean True

(Optional) Step 4. Reset Migration Setting Workflows in the Source Environment

If you want, you can use the migratable endpoint to toggle the This workflow is ready to be migrated setting on a workflow back to No in the source environment after workflow migration in the target environment.

  • Environment: Source
  • Method: PUT
  • Endpoint: api/admin/v1/workflows/migratable/{appID}/
Was This Helpful?

Running into problems or issues with your Alteryx product? Visit the Alteryx Community or contact support.