Use a workflow to call a series of APIs you've registered, visualize the sequence as a diagram, and test and document how they work together. A workflow helps you showcase your product's capabilities and demonstrate how its APIs integrate to solve a specific use case.
Each workflow represents a product use case, so to create a workflow, you must choose the product it belongs to. If you don't have a product, create one first.
To create a product:
Once you have a destination product, you can create a workflow in it following these steps:
A workflow consists of tasks and links:
Workflow tasks can be arranged in various sequences as long as they flow in one direction, without forming loops or going backward.
Below are examples of valid task sequences:
Below are examples of invalid task sequences:
To add a task to a workflow
The new task will appear as a green node in the diagram.
Tasks in a workflow can be configured based on the role they play:
Tasks are also classified as compliance or normal:
By default, tasks are normal and non-API. You can configure them to change their role in the workflow through the Task Details View in the right panel.
For non-API tasks: Click the task's node to select it and open the view. If the task is already selected but another view is open, use the panel menu and select Description.
Here you can configure:
Use links to connect pairs of tasks and define the order of execution in a workflow. Links can also pass data from an API response to another API's request.
To connect two tasks in a workflow:
You can configure the link between two API tasks to use data returned by the source task in the payload of the target task.
Currently, you can't pass data between tasks that aren't directly connected by a link. As a workaround, you may need to create an auxiliary link.
To pass data between two API tasks:
The Resource and Path Parameters field expects an object that defines the segments appended to the base URL, while the Path Order field specifies the sequence in which these segments appear.
For example, if the target API has the following setup:
https://api.example.com/api/v1/users/1
https://api.example.com/api/v1
You can reconstruct the Example URL Route with this link configuration:
{
"resource": "users",
"resourceId": 1
}
["resource", "resourceId"]
Using meaningful parameter key names is a best practice, but you can use any key names as long as you're consistent. For instance, the following configuration is equivalent to the previous example:
{
"partA": "users",
"partB": 1
}
["partA", "partB"]
Notice that the URL used in the request is the result of appending the resource and path parameters to the base URL, in the order you defined in the Path Order field. This means that you can generate the same URL using different distributions of the URL segments in the Base URL and the Resource and Path Parameters.
For example, here are two different ways to generate the URL: https://api.example.com/api/v1/users/1
.
In this example, the Base URL excludes the version (v1
) because it might vary across API requests. This allows you to manage versioning directly in the link configuration.
Example URL Route: https://api.example.com/api/v1/users/1
Base URL: https://api.example.com/api
Resource and Path Parameters:
{
"version": "v1",
"resource": "users",
"resourceId": 1
}
["version", "resource", "resourceId"]
Here, the Resource and Path Parameters object uses a different key order, but the Path Order ensures the resulting URL remains the same. This highlights that Path Order, not the object's key order, dictates the sequence of appended segments.
Example URL Route: https://api.example.com/api/v1/users/1
Base URL: https://api.example.com/api/v1
Resource and Path Parameters:
{
"resourceId": 1,
"resource": "users"
}
["resource", "resourceId"]
To include additional details in your request, the Query Parameters field expects an object where each key-value pair represents a query parameter appended to the URL after a question mark (?
).
For example, to use this URL in a request: https://api.example.com/api/v1/search?query=chatbots&sortBy=date&order=asc
, you can use the following settings:
Base URL: https://api.example.com/api/v1
Resource and Path Parameters:
{
"resource": "search"
}
["resource"]
{
"query": "chatbots",
"sortBy": "date",
"order": "asc"
}
Unlike Resource and Path Parameters, the key names for Query Parameters are defined by the API and their order is not relevant.
If the target API accepts a request body and you have enabled passing parameters, the request body defined in the API manager or the cURL view will be overwritten by the value provided in this field.
You can dynamically inject values from the response of the previously executed task by wrapping the value in the target payload with double curly braces.
For example, imagine a task to create a post in a forum application, configured with the following details:
https://forum.gwocu.com/api/v1/posts
{
"id": "V1StGXR8_Z5jdHi6B-myT",
"title": "A title",
"content": "Some description"
}
Here, the id
is not a fixed value; it is generated by the server for each request. To verify that the post was successfully registered, you might want to inject this id
dynamically into the payload of the next API call.
Below we'll use hypothetical API definitions to demonstrate how to inject this value into the:
o dynamically set the id
in this endpoint: GET https://forum.gwocu.com/api/v1/posts/:id
, use the following settings:
Base URL: https://forum.gwocu.com/api/v1
Resource and Path Parameters:
{
"resource": "posts",
"resourceId": "{{id}}"
}
["resource", "resourceId"]
To dynamically set the id
in this endpoint GET https://forum.gwocu.com/api/v1/posts/?id=:id
, use the following settings:
Example URL Route: https://forum.gwocu.com/api/v1/posts
Query Parameters:
{
"id": "{{id}}"
}
The Resource and Path Parameters configuration is omitted for simplicity.
To dynamically set the id
in this endpoint GET https://forum.gwocu.com/api/v1/posts
, use the following settings:
Example URL Route: https://forum.gwocu.com/api/v1/posts
Request Body Parameters:
{
"postId": "{{id}}"
}
The Resource and Path Parameters configuration is omitted for simplicity.
While you can rename the resourceId
key to any name of your choice, the value wrapped in double curly braces must match the parameter name returned by the previous API, in this case: id
.
If the name inside the curly braces does not match any field in the response body, the system will search for it in the actions applied to the API, and if that also fails, will ultimately resort to use the name literally.
For example, using the following configuration:
{
"resource": "posts",
"resourceId": "{{postId}}"
}
["resource", "resourceId"]
Will yield this URL: https://forum.gwocu.com/api/v1/posts/%7B%7BpostId%7D%7D
.
This happens because the double curly braces are URL-encoded when no matching value is found before making the request.
When multiple tasks are linked to the same source task, you can use the Sequence property of each link to define the execution order of the target API tasks. Links with higher sequence values will execute their target tasks later.
In this example, we compare two workflows that have the same tasks and structure, but the target tasks execute in reverse order due to the sequence values in their corresponding link configurations.
You can execute API tasks individually within a workflow using the cURL view in the right panel. Click on the corresponding task node in the workflow or select cURL from the right panel menu to open the view, then use the terminal interface at the bottom to make the request.
You can edit the URL and request body before calling the API. These changes:
If the task does not receive parameters from a previous task, you can save changes as a custom payload specific to this task by using the Save toolbar button.
Use the Restore Default toolbar button to revert any saved changes and restore the API's default configuration from the API Manager.
A common issue is not being able to update the payload from this view. If your task receives parameters, the link configuration will overwrite the payload, so you must make changes in the Link View instead. If your task doesn't receive parameters, ensure that the JSON in your request body is valid, as syntax errors can prevent updates.
To execute a workflow, first make sure you have at least one API task connected to another task, as only linked tasks will run. Then, click the Run Workflow button next to the workflow name in the middle panel. The workflow terminal view will open in the right panel.
Use the following commands in the terminal to control execution:
The API response will be displayed as a JSON object containing both the status and the response body. You can hover over a parameter or its value to reveal the Copy to clipboard button.
If your workflow relies on webhook notifications from an API, you can register a webhook listener to handle them. Then, create a task in your workflow to query our server and check for those notifications.
Follow these steps to create and set up a webhook listener that handles your webhook notifications:
Open the main menu in the home page.
Go to Actions & Webhooks > Manage webhooks.
A modal like this will appear:
Fill out the form with the following details:
$-_.+!*'()
), as it will be URL encoded. Can't be changed later.Use the Copy to clipboard buttons next to the form labels to save the values for Webhook Name, URL, and Webhook Key, as they are required to configure APIs in your workflow.
Click on the webhook rows to view or edit their details or click again to unselect it. After making changes, click the Update button to save them.
Use the generated webhook URL as the endpoint for the server awaiting notifications from your API.
You can use a system API to check for webhook notifications by providing the webhook name and its key. To integrate it into your workflow:
{
"name": "The-Webhook-name",
"apiKey": "The-Webhook-Key",
"reset": true
}
Where:
name
: the webhook name used when registering the listener.apiKey
: The webhook key generated during registration.reset
: an optional boolean parameter. If set to:
true
: resets the listener after delivering the latest notification, so subsequent calls return no notification and a "pending" status.false
: returns the most recent notification. reset
is false by default.This is an example of response body returned by the API:
{
"status": 200,
"resultBody": {
"status": "received",
"lastNotificationTimestamp": "2025-01-21T02:55:00.326Z",
"responseStatus": "success",
"notification": {
"parameter": "value"
}
}
}
To duplicate a workflow:
To copy a workflow between workspaces, you can export the product it belongs to and import it into another workspace.
Open the main menu in the tree panel of the home page.
Select Export products.
A modal window like this will appear:
Set a File Name and Version. The final file name will combine these inputs as: FileName-Version
.
Select the products you want to export:
Shift
to select a range of products or Ctrl
(or Cmd
on Mac) to select multiple products individually.Make sure you don't have products with the same name as the ones you want to import, because they will not be overwritten.
Open the main menu in the tree panel of the home page.
Select Import products.
A modal window like this will appear:
Click the Choose File button and select the YAML file containing the products.
Click the Import products button to start the upload. A progress bar will display the upload progress. Once the import is complete, an alert will confirm success. After an automatic page reload, the imported products will appear listed in the tree panel. The APIs associated with the imported products will also be visible in the API manager.
To export your workflow graph as an image:
If you're an Owner or Designer, you can zoom in, zoom out, and pan the graph before exporting to make sure the desired layout is captured in the image.
By default, products and workflows are private, meaning that users with the Reader role—whether registered or accessing your workspace—cannot view or interact with them.
To make a workflow visible to readers, you must set the Status to public for both the workflow and the product that contains it. A product's public status does not automatically apply to its workflows, allowing you to control visibility at the workflow level. However, making a product private will hide all of its workflows from readers.
The Studio can automatically generate Python and JavaScript code for integrating workflows or individual API calls into your application's codebase. The generated code includes the same settings configured in the Studio.
To view the generated code:
To view the generated code for an entire workflow:
To permanently remove a workflow: