Workflow Use Case

The Astera Data Stack provides you with the flexibility to execute your jobs through a third-party tool, without using the Astera client. Let’s learn how to achieve this in the article below.

Use Case

In this use case, we have our Astera client on a local machine and a server installed on a virtual machine. Instead of using the Astera client, we will use Postman as a third-party tool to send REST requests to the server in order to execute the job.

Workflow in Astera

The workflow document in Astera consists of a Variables object, a FileTransferTask object and a RunDataflow object.

We will pass the name of the file that we want to download and process to the FileTransferTask from the Variables object. The Variables object takes an input from the REST call sent through Postman, and passes it to FTP to download the file with that name. We then pass the file path of the downloaded file to the RunDataflow object.

In the following section, we will cover a step-by-step overview of how you can achieve this.

How to Execute a Job Using Postman

  1. We will make the first API call for logging into the Astera server to generate an access token. Provide the following credentials in the request body and click on Send.

  • User: admin

  • Password: Admin123

  • RememberMe: 1

The Astera server will provide you with an access token in response.

  1. In the second step, we will send the path of the file that we want to download from FTP, in the form of a string, to the Variables object.

In the parameters:

  • ActionName: Variables

    Name of the object present inside the workflow to which the name of the file will be passed

  • Parameters: sourceFilePath

    The value of the input variable field inside the workflow

  • Value: [file path of the file that you want to download]

    The value of the input variable field inside the workflow

    As soon as you send this API request, Astera will provide you with a jobID that you can use to get the job status.

  1. In the third step, we will make a GET call to fetch the job’s status by providing the job ID.

This is what Astera’s response would look like.

This concludes accessing Astera’s server APIs through a third-party tool.

Last updated

© Copyright 2023, Astera Software