See Stacksync in action with a solution architect. Book a demo ↗
Connectors

Connectors

Run an action

POST
/v1/workspaces/{workspace_id}/workflows/modules/runs

Run one action of an app on its own, outside any workflow, with a connection and the values of its form: the values are checked against the app's live form, then the app runs them once. A read action (get, list, search...) is open to a viewer; any other can change data in the app and needs an editor. A run the app failed or did not answer is answered with its status. With validate_only, every check runs and the answer tells what would run, nothing runs; with validate_only_for_writes, a read runs and an action that can change data only answers that dry run.

Authorization

Authorizationstringheaderrequired

Bearer <key>, where <key> is a workspace API key or a user API key. See Authentication.

Path Parameters

workspace_id*integer

The workspace. List the ones your key can reach with GET /v1/workspaces.

Query Parameters

region*Region

Region whose catalog to read: besg or usnv

Value in"besg""usnv"

Request Body

application/json
  1. body
module_id*Module Id

The action, from the actions of GET .../workflows/modules/apps/<app_type> (its current version)

Length1 <= length
module_version*Module Version

The action's version, from the same answer

Length1 <= length
connection_id?|

The connection the action uses, from GET .../connections (same region); None for an action that takes none

Defaultnull
values?

The action's form values, as the module form describes them (POST .../workflows/modules/forms)

validate_only?Validate Only

Run every check of the run (action, role, connection, values against the app's live form) and answer what would run, with whether it only reads, without running it: a refused request answers the error the run would

Defaultfalse
validate_only_for_writes?Validate Only For Writes

true runs a read action at once and only validates a write action (as validate_only would); false runs any action

Defaultfalse

Response Body

OK

application/json
  1. response
module_id*Module Id
module_version*Module Version
module_name*Module Name
app_type*App Type
connection_id*string|null
connection_name*|

The name of the connection the action used, None for none

is_read_action*Is Read Action

True for an action that only reads from the app (a viewer may run it); any other action can change data and needs an editor

status*ModuleRunStatus

How a run ended

Value in"validated""succeeded""failed""outcome_unknown"
data?JsonValue

What the action answered, as the next step of a workflow would receive it; None unless it succeeded

Defaultnull
is_data_truncated?Is Data Truncated

True when data was too large to answer: data is then the start of it as JSON text; narrow the action's filters to get it whole

Defaultfalse
error_message?|

Why the action failed, or why its outcome is unknown

Defaultnull
Run an action
curl -X POST 'https://api.stacksync.com/v1/workspaces/0/workflows/modules/runs?region=usnv' \  -H 'Content-Type: application/json' \  -d '{  "module_id": "<module_id>",  "module_version": "<module_version>"}'
{  "module_id": "<module_id>",  "module_version": "<module_version>",  "module_name": "<module_name>",  "app_type": "<app_type>",  "connection_id": "<connection_id>",  "connection_name": "<connection_name>",  "is_read_action": false,  "status": "validated",  "data": "<data>",  "is_data_truncated": false,  "error_message": "<error_message>"}