Workflows

Want to execute a set of API calls to simulate a customer interaction or to pass variables between calls? Workflows makes this an easy process

Workflows allow you to create a series of API calls, either for your already monitored ones or new ones, that will run in sequence. You can extract variables from the output of earlier calls in the Workflow and use them as part of the input to later ones in the Workflow. This simulates real-world business processes that involve multiple linked API calls, giving more realistic monitoring. The API calls can also be completely independent of each other.

Just like a normal API call in APImetrics, Workflows are deployed to be run periodically from agents in the same way.

Example Workflow

Below is an example of a Workflow to give a clearer idea of the possibilities of a Workflow.

  1. API call that creates a user in a particular system. Extract the user ID from the returned payload.
  2. API call that creates a record associated with the user account for the user ID. Extract the record ID from the returned payload.
  3. API call that obtains the record associated with the user account for the user ID and the record ID. Validate the returned payload using API Conditions to demonstrate that the record was created successfully.
  4. API call that deletes the record associated with the user account for the user ID and the record ID.
  5. API call that obtains the record associated with the user account for the user ID and the record ID. Validate the returned payload using API Conditions to demonstrate that the record was deleted successfully (trying to obtain a deleted record should lead to the returned payload containing an error message).
  6. API call that deletes the user account associated with the user ID.

❗️

Variables in workflows

A variable used in a Workflow only persists for use in that Workflow. We provide pre-set variables for services like DATE and TIME, and global variables that can be used to handle externally generated tokens and IDs. To learn more about these, follow the link here.

Creating a Workflow

Workflows can be found under Configuration in the sidebar.

To create a new Workflow, enter a name in the text field and then select the Add button.

If you already have created some Workflows, they will be listed on the page.

To Edit a Workflow, select the row containing the Workflow and it will direct you to the Edit page.

To add an existing API call to your Workflow, select the Add Step button below the Steps table.

After this, you can select from an existing API call from the dropdown.

You can also create a new API call within the Edit Workflow page by selecting the Add New API Call button.

Enter the details in the prompt, choosing the Method, URL, and Name before selecting the Add button to complete the new API call.

Variables and Conditions

Passing variables between Workflows is a key part of simulating a real business interaction. We have tutorials on parsing content in JSON and XML. There is also a set of pre-set variables that we provide, more information can be found here.

In case of a failure, there are Conditions, which allow you to stop Workflows. See the section on Assertions and conditions for more details on handling these situations.


What’s Next

Interested in learning about editing, scheduling & reading results? Below are tutorials for different functions within Workflows