Automation is currently in limited beta.
Welcome to the Automation API,Â a RESTful API that lets you create automated workflows that initiate file transfers, integrate with web services via API calls, and notify your stakeholders. Automation can monitor your file storage system for event triggers; for example, a file uploaded to a shared folder can initiate a transfer, and the completed transfer can trigger an email notification.
You can transfer files and folders to shared inboxes and shared folders in an Aspera on Cloud (AoC) workspace, or to folders on an on-premises node or a node in the cloud. The IBM Aspera FASP protocol embedded in AoC allows you to transfer files of any size, securely and reliably, at unrivaled speed.
For detailed endpoint reference for the Automation API, visit our API Explorer.
To use the Automation API, the following must be true:
- You have an Enterprise or Advanced subscription for Aspera on Cloud.
- You are enabled with both the Activity app and the Automation app. To confirm that you are enabled, follow the procedure in Enabling the Automation App and Activity App.
Enabling the Automation App and Activity App
Follow this procedure twiceâ€”one time for the Activity app and a second time for the Automation app.
- Open the Admin app in AoC.
- In the left navigation menu, click Applications, then click Activity (for the Activity app). When you do this procedure a second time, click Automation (for the Automation app).
- Select Enable application, if it is not already selected.
- Click the Members tab.
- Click Add Member
- Enter your email address, then click Add.
You must include a bearer token in the header for each request to the Automation API. The bearer token (JSON Web Token) is a type of OAuth2 authentication that includes a public key and a private key. In Aspera on Cloud, we create the bearer token with the Files API.
For detailed information on obtaining the bearer token, see the tutorial, Making a Request to the Activity API.
Here is an example of a bearer token:
Bearer twJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6IjIwMTgtMDYtMDZUMjI6MzU6MTQrMDA6MDAifQ.eyJ1c 2VyX2lkIjoiMzIwMSIsInNjb3BlIjoiYWRtaW4tdXNlcjphbGwiLCJ1dWlkIjoiNGQ3OGViOWQtNTYyYS00NmQ1LTljMWEtY 2IzODczZDdjZTE4Iiwib3JnYW5pemF0aW9uX2lkIjoiNTgiLCJleHBpcmVzX2F0IjoiMjAxOS0wOC0wMlQxOTowNDoxMVoiL [and more characters like this] . . . tKpcB88IU0sgy556jW38r2zlFIcvYdhvjSfGsKCCkuhyaUw/pre>
Creating Workflows with the Automation API
After you create the overall workflow, you create a first step that contains the trigger for your workflow. The trigger can be manual (a call to the Automation API), a scheduled time, a new file added to a folder, or a package arriving in a shared inbox.
The rest of the steps in the workflow contain one or more actions. An action can transfer a file, send a package, call an API, or notify users.
Note: If your workflow has a manual trigger or a time trigger, it must contain at least one actionâ€”anywhere in the workflowâ€”that transfers a file or sends a package.
After you finish building your workflow, you activate it with a request to update the workflow state to
active. At this point, your workflow launches running jobs that are initiated by the conditions of the trigger step. If your workflow has a manual trigger, you need to make an additional request to launch the workflow.
Example Use Case
For a team that submits video content to a shared inbox in the AoC Packages app, you can create a workflow that triggers each time a member submits a package with the metadata value, “
rev“. When the workflow is triggered, the following things happen:
- AoC automatically transfers the video files in the package from shared storage to remote cloud storage.
- Three stakeholders receive email notifications that the files have successfully transferred.
- Once the transfer is successfully completed, an API triggers a step than runs a transcoder on the files.
- The project lead receives an email that contains the success or error response code from the API.