Flows

List Flows

get

List all process flows associated with your company profile.

Pagination

Pagination is available for this request. Please see the section on using pagination for more details.

Available Includes

These are the includes that can be used to include addition related data in the results. Please see the section on using includes for more details.

  • latestVersion

  • latestVersion_count

  • latestVersionExists

  • latestVersion.variables

  • deployedVersion

  • deployedVersion_count

  • deployedVersionExists

  • deployedVersion.variables

  • currentVersion

  • currentVersion_count

  • currentVersionExists

  • currentVersion.latestRun

  • currentVersion.steps

  • currentVersion.steps.connector

  • currentVersion.steps.connector.authenticationImplementation

  • currentVersion.steps.connector.authenticationImplementation.system

  • currentVersion.steps.variables

  • currentVersion.steps.cache

  • currentVersion.steps.dataPool

  • currentVersion.steps.scriptVersion

  • currentVersion.steps.scriptVersion.script

  • currentVersion.schedules

  • currentVersion.variables

  • versions

  • versions_count

  • versionsExists

  • versions.schedules

  • versions.variables

  • versions.deployedByUser

  • labels

  • labels_count

  • labelsExists

  • webhooks

  • webhooks_count

  • webhooksExists

  • callbacks

  • callbacks_count

  • callbacksExists

  • notificationGroups

  • notificationGroups_count

  • notificationGroupsExists

  • messageBrokers

  • messageBrokers_count

  • messageBrokersExists

  • messageBrokerQueues

  • messageBrokerQueues_count

  • messageBrokerQueuesExists

  • deployments

  • deployments_count

  • deploymentsExists

  • deployments.virtualEnvironment

  • deployments.flowVersion

  • deployments.package

  • deployments.enabledBy

Available Filters

These are the filters that can be used to specific the data to return. Please see the section on using filters for more details.

  • name

  • marketplace_app_id

  • labelled

  • enabled

  • deployed

Available Fields

These are the fields that can be requested to limit the data returned. Please see the section on using fields for more details.

  • flows.id

  • flows.name

  • flows.enabled_at

Available Sorts

These are the sorts that can be used order the returned data. Please see the section on using sorting for more details.

  • name

  • enabled_at

  • created_at

  • id

Authorizations
AuthorizationstringRequired

API key passed in the Authorization header. Format: <api-key>

Query parameters
filter[name]stringOptional

Filter results by name.

filter[marketplace_app_id]stringOptional

Filter results by marketplace_app_id.

filter[blueprint_id]stringOptional

Filter results by blueprint_id.

filter[blueprint_version_number]stringOptional

Filter results by blueprint_version_number.

filter[labelled]stringOptional

Filter results by label id.

filter[enabled]stringOptional

Filter results by enabled.

filter[deployed]stringOptional

Filter results by deployed.

filter[versions.id]stringOptional

Filter results by versions.id.

filter[,]stringOptional

Filter results by ,.

filter[versions]stringOptional

Filter results by versions.

filter[id]stringOptional

Filter results by id.

includestringOptional

Comma-separated list of relationships to include. Available: latestVersion, latestVersion.variables, deployedVersion, deployedVersion.variables, latestDeployedVersion, latestDeployedVersion.variables, latestDeployedVersion.steps.connector.authenticationImplementation.system, latestDeployedVersion.steps.connector.authenticationImplementation.system.endpoints, latestDeployedVersion.steps.connector.authenticationImplementation.system.endpoints.preScriptVersion, latestDeployedVersion.steps.connector.authenticationImplementation.system.endpoints.postScriptVersion, latestDeployedVersion.steps.connector.authenticationImplementation.system.endpoints.preScriptVersion.script, latestDeployedVersion.steps.connector.authenticationImplementation.system.endpoints.postScriptVersion.script, latestDeployedVersion.steps.scriptVersion.script, latestDeployedVersion.steps.cache, latestDeployedVersion.steps.dataPool, deployedVersion.steps.connector.authenticationImplementation.system, deployedVersion.steps.connector.authenticationImplementation.system.endpoints, deployedVersion.steps.connector.authenticationImplementation.system.endpoints.preScriptVersion, deployedVersion.steps.connector.authenticationImplementation.system.endpoints.postScriptVersion, deployedVersion.steps.connector.authenticationImplementation.system.endpoints.preScriptVersion.script

sortstringOptional

Sort field. Prefix with - for descending. Available: name, enabled_at, created_at, id

pageinteger · min: 1Optional

Page number for pagination.

Default: 1
per_pageinteger · min: 1 · max: 100Optional

Number of results per page.

Responses
chevron-right
200

Successful response

application/json
get
/api/v1/flows

Create Flow

post

Create a new process flow.

Validation Rules

These are the basic validation rules for the request. More detailed validation may apply depending on the data being sent. Please see the response for any extra requirements

Field
Type
Required

flow.name

string

flow.description

string

flow.prod_flag

Authorizations
AuthorizationstringRequired

API key passed in the Authorization header. Format: <api-key>

Body
Responses
chevron-right
200

Successful response

application/json
post
/api/v1/flows

Get Flow

get

Retrieves details for a single process flow by the flow id.

Available Includes

These are the includes that can be used to include addition related data in the results. Please see the section on using includes for more details.

  • latestVersion

  • latestVersion_count

  • latestVersionExists

  • latestVersion.variables

  • deployedVersion

  • deployedVersion_count

  • deployedVersionExists

  • deployedVersion.variables

  • currentVersion

  • currentVersion_count

  • currentVersionExists

  • currentVersion.latestRun

  • currentVersion.steps

  • currentVersion.steps.connector

  • currentVersion.steps.connector.authenticationImplementation

  • currentVersion.steps.connector.authenticationImplementation.system

  • currentVersion.steps.variables

  • currentVersion.steps.cache

  • currentVersion.steps.dataPool

  • currentVersion.steps.scriptVersion

  • currentVersion.steps.scriptVersion.script

  • currentVersion.schedules

  • currentVersion.variables

  • versions

  • versions_count

  • versionsExists

  • versions.schedules

  • versions.variables

  • versions.deployedByUser

  • labels

  • labels_count

  • labelsExists

  • webhooks

  • webhooks_count

  • webhooksExists

  • callbacks

  • callbacks_count

  • callbacksExists

  • notificationGroups

  • notificationGroups_count

  • notificationGroupsExists

  • messageBrokers

  • messageBrokers_count

  • messageBrokersExists

  • messageBrokerQueues

  • messageBrokerQueues_count

  • messageBrokerQueuesExists

  • deployments

  • deployments_count

  • deploymentsExists

  • deployments.virtualEnvironment

  • deployments.flowVersion

  • deployments.package

  • deployments.enabledBy

Available Filters

These are the filters that can be used to specific the data to return. Please see the section on using filters for more details.

  • name

  • marketplace_app_id

  • labelled

  • enabled

  • deployed

Available Fields

These are the fields that can be requested to limit the data returned. Please see the section on using fields for more details.

  • flows.id

  • flows.name

  • flows.enabled_at

Available Sorts

These are the sorts that can be used order the returned data. Please see the section on using sorting for more details.

  • name

  • enabled_at

  • created_at

  • id

Authorizations
AuthorizationstringRequired

API key passed in the Authorization header. Format: <api-key>

Path parameters
flowstringRequired

The flow identifier.

Query parameters
filter[name]stringOptional

Filter results by name.

filter[marketplace_app_id]stringOptional

Filter results by marketplace_app_id.

filter[blueprint_id]stringOptional

Filter results by blueprint_id.

filter[blueprint_version_number]stringOptional

Filter results by blueprint_version_number.

filter[labelled]stringOptional

Filter results by label id.

filter[enabled]stringOptional

Filter results by enabled.

filter[deployed]stringOptional

Filter results by deployed.

filter[versions.id]stringOptional

Filter results by versions.id.

filter[,]stringOptional

Filter results by ,.

filter[versions]stringOptional

Filter results by versions.

filter[id]stringOptional

Filter results by id.

includestringOptional

Comma-separated list of relationships to include. Available: latestVersion, latestVersion.variables, deployedVersion, deployedVersion.variables, latestDeployedVersion, latestDeployedVersion.variables, latestDeployedVersion.steps.connector.authenticationImplementation.system, latestDeployedVersion.steps.connector.authenticationImplementation.system.endpoints, latestDeployedVersion.steps.connector.authenticationImplementation.system.endpoints.preScriptVersion, latestDeployedVersion.steps.connector.authenticationImplementation.system.endpoints.postScriptVersion, latestDeployedVersion.steps.connector.authenticationImplementation.system.endpoints.preScriptVersion.script, latestDeployedVersion.steps.connector.authenticationImplementation.system.endpoints.postScriptVersion.script, latestDeployedVersion.steps.scriptVersion.script, latestDeployedVersion.steps.cache, latestDeployedVersion.steps.dataPool, deployedVersion.steps.connector.authenticationImplementation.system, deployedVersion.steps.connector.authenticationImplementation.system.endpoints, deployedVersion.steps.connector.authenticationImplementation.system.endpoints.preScriptVersion, deployedVersion.steps.connector.authenticationImplementation.system.endpoints.postScriptVersion, deployedVersion.steps.connector.authenticationImplementation.system.endpoints.preScriptVersion.script

sortstringOptional

Sort field. Prefix with - for descending. Available: name, enabled_at, created_at, id

pageinteger · min: 1Optional

Page number for pagination.

Default: 1
per_pageinteger · min: 1 · max: 100Optional

Number of results per page.

Responses
chevron-right
200

Successful response

application/json
get
/api/v1/flows/{flow}

Update Flow

put

Updates an existing process flow.

Validation Rules

These are the basic validation rules for the request. More detailed validation may apply depending on the data being sent. Please see the response for any extra requirements

Field
Type
Required

flow.name

string

flow.description

string

flow.enabled_at

labels

labels.*.id

notification_groups

flow.use_queued_time

flow.remove_failed_payloads

flow.priority

integer

flow.prod_flag

Authorizations
AuthorizationstringRequired

API key passed in the Authorization header. Format: <api-key>

Path parameters
flowstringRequired

The flow identifier.

Body
notification_groupsstringOptional
Responses
chevron-right
200

Successful response

application/json
put
/api/v1/flows/{flow}

Delete Flow

delete

Deletes a given process flow.

Authorizations
AuthorizationstringRequired

API key passed in the Authorization header. Format: <api-key>

Path parameters
flowstringRequired

The flow identifier.

Responses
chevron-right
200

Successful response

application/json
messagestringOptional
delete
/api/v1/flows/{flow}

Export Flow

post

Export process flow as a JSON file.

Validation Rules

These are the basic validation rules for the request. More detailed validation may apply depending on the data being sent. Please see the response for any extra requirements

Field
Type
Required

flow_id

integer

Authorizations
AuthorizationstringRequired

API key passed in the Authorization header. Format: <api-key>

Body
flow_idintegerRequired
Responses
chevron-right
200

Successful response

application/json
objectOptional
post
/api/v1/flows/export

Import Flow

post

Import a previously exported process flow (from a JSON file).

Validation Rules

These are the basic validation rules for the request. More detailed validation may apply depending on the data being sent. Please see the response for any extra requirements

Field
Type
Required

flow

metadata

as_marketplace

Authorizations
AuthorizationstringRequired

API key passed in the Authorization header. Format: <api-key>

Body
flowstringRequired
metadatastringRequired
as_marketplacestringOptional
Responses
chevron-right
200

Successful response

application/json
objectOptional
post
/api/v1/flows/import

Initialise Flow Manually

post

Initialise a process flow manually - the equivalent of using the initialise flow button on the canvas. The flow starts immediately (it is not added to a queue). You can make up to 10 requests to this endpoint per minute. If you are implementing an automated, programmtic integration with Patchworks with greater request volumes, consider using the Start Flowarrow-up-right endpoint instead.

Validation Rules

These are the basic validation rules for the request. More detailed validation may apply depending on the data being sent. Please see the response for any extra requirements

Field
Type
Required

flow_id

integer

version_id

integer

payload

string

flow_variables

virtual_environment_id

integer

Authorizations
AuthorizationstringRequired

API key passed in the Authorization header. Format: <api-key>

Path parameters
flow_idstringRequired

The unique identifier of the flow.

version_idstringRequired

The unique identifier of the version.

Body
flow_idintegerRequired
version_idintegerOptional
payloadstringRequired
flow_variablesstringOptional
virtual_environment_idintegerOptional
Responses
chevron-right
200

Successful response

application/json
objectOptional
post
/api/v1/flows/{flow_id}/manual/{version_id}

Start Flow

post

Intended for programmatic, system-to-system integrations, where flows are scheduled via the API. In this case, flow runs are added to a queue and picked up when concurrency is available.

Validation Rules

These are the basic validation rules for the request. More detailed validation may apply depending on the data being sent. Please see the response for any extra requirements

Field
Type
Required

flow_id

integer

version_id

integer

payload

string

flow_variables

virtual_environment_id

integer

Authorizations
AuthorizationstringRequired

API key passed in the Authorization header. Format: <api-key>

Path parameters
flow_idstringRequired

The unique identifier of the flow.

version_idstringRequired

The unique identifier of the version.

Body
flow_idintegerRequired
version_idintegerOptional
payloadstringRequired
flow_variablesstringOptional
virtual_environment_idintegerOptional
Responses
chevron-right
200

Successful response

application/json
objectOptional
post
/api/v1/flows/{flow_id}/start/{version_id}

Duplicate Flow

post

Duplicates - i.e. clones - an existing process flow. This is the API equivalent of what happens when you use the duplicate option in the dashboardarrow-up-right. The result is a new process flow in the same company, with the same name appended with an incremental number.

Validation Rules

These are the basic validation rules for the request. More detailed validation may apply depending on the data being sent. Please see the response for any extra requirements

Field
Type
Required

flow_version_id

Authorizations
AuthorizationstringRequired

API key passed in the Authorization header. Format: <api-key>

Path parameters
flowstringRequired

The flow identifier.

Body
flow_version_idstringRequired
Responses
chevron-right
200

Successful response

application/json
objectOptional
post
/api/v1/flows/{flow}/duplicate

Update Flow Layout Direction

patch

Toggles the canvas layout direction for a specific flow. If the flow is currently set to vertical then it switches to horizontal, and vice versa.

Authorizations
AuthorizationstringRequired

API key passed in the Authorization header. Format: <api-key>

Path parameters
flowstringRequired

The flow identifier.

Responses
chevron-right
200

Successful response

No content

patch
/api/v1/flows/{flow}/layout-direction

No content

Last updated

Was this helpful?