Workflow Builder
API Execution

API Execution

The section Triggers: API Trigger explains how you can start your workflow by posting to the Paradym server with the ID of the workflow that you want to execute. This section goes into the API usage in more depth.

Api Key

To execute through the API, you first need a valid API key:

Go to API Keys

To create the key, go to the API Keys (opens in a new tab) in the settings.

Create key

Give your API key a unique name and create your key.

Save key

Make sure to copy and save the key as it won't be displayed again.

Get API Key

Creation of a Paradym API key.

You can use your newly generated key to make POST requests and to access the Paradym API on Swagger UI.

Triggering Execution

There's a few properties and steps involved in executing a workflow through the API:

Project ID

You can find the projectId in the Settings tab on the Paradym dashboard.

Extracting Project ID

Workflow ID

You can find the workflowId on the executions tab of a workflow.

Extracting Workflow ID

Input

Based on the input defined in your worklow, you need to provide the input data for the execution.

For example if the input of your workflow is defined as:

input:
  type: object
  properties:
    invitationUrl:
      type: string
    message:
      type: string
  required:
    - invitationUrl
    - message

The value for the input key in the POST request body should look something like:

{
  "invitationUrl": "https://example.com/invitationUrl",
  "message": "Hello World"
}

POST

Finally to interact with the API, make a POST request and provide the API key as the value for the x-access-token header.

POST https://api.paradym.id/v1/projects/<project_id>/executions with the following body:

{
  "workflowId": "<workflowId>",
  "input": {
    // input data
  }
}

For example:

{
  "workflowId": "cllxhk5x60001pj01gnaa3mu3",
  "input": {
    "invitationUrl": "https://example.com/invitationUrl",
    "message": "Hello World"
  }
}

Follow the execution's progress

Once the workflow execution is triggered, you can follow the progress of an execution in the UI, use webhooks to listen to system events and trigger actions, or extract data from it.

Using cURL

An example of executing a workflow with the above example data using cURL may look like this:

curl --location --request POST 'https://api.paradym.id/v1/projects/<project_id>/executions' \
--header 'x-access-token: paradym_xxxxxxxx' \
--header 'Content-Type: application/json' \
--data-raw '{
    "workflowId": "cllxhk5x60001pj01gnaa3mu3",
    "input": {
      "invitationUrl": "https://example.com/invitationUrl",
      "message": "Hello World"
    }
}'

API Reference

The Paradym API Reference provides documentation for the API, and an interactive playground to play with it. To use it, go to the Paradym API Reference (opens in a new tab) while signed in and you should be able to use the API directly. This will allow you to use the UI to interact with your workflows through the API.

Swagger UI

Paradym API Documentation via Swagger UI.