Scripts

API Reference for ProcessMaker Script API

Returns all scripts categories that the user has access to

get

Display a listing of the Script Categories.

Authorizations
OAuth2authorizationCodeRequired

Laravel passport oauth2 security.

Authorization URL: Token URL: Refresh URL:
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
filterstringOptional

Filter results by string. Searches Name, Description, and Status. All fields must match exactly.

order_bystringOptional

Field to order results by

order_directionstring · enumOptionalDefault: ascPossible values:
per_pageintegerOptionalDefault: 10
Responses
200

list of scripts categories

application/json
get
/script_categories
200

list of scripts categories

Save a new Script Category

post

Store a newly created Script Category in storage

Authorizations
OAuth2authorizationCodeRequired

Laravel passport oauth2 security.

Authorization URL: Token URL: Refresh URL:
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
namestringOptional

Represents a business script category definition.

statusstring · enumOptionalPossible values:
Responses
post
/script_categories
201

success

Get single script category by ID

get

Display the specified script category.

Authorizations
OAuth2authorizationCodeRequired

Laravel passport oauth2 security.

Authorization URL: Token URL: Refresh URL:
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
script_category_idstringRequired

ID of script category to return

Responses
200

Successfully found the script

application/json
get
/script_categories/{script_category_id}
200

Successfully found the script

Update a script Category

put

Updates the current element

Authorizations
OAuth2authorizationCodeRequired

Laravel passport oauth2 security.

Authorization URL: Token URL: Refresh URL:
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
script_category_idstringRequired

ID of script category to return

Body
namestringOptional

Represents a business script category definition.

statusstring · enumOptionalPossible values:
Responses
200

success

application/json
put
/script_categories/{script_category_id}
200

success

Delete a script category

delete

Remove the specified resource from storage.

Authorizations
OAuth2authorizationCodeRequired

Laravel passport oauth2 security.

Authorization URL: Token URL: Refresh URL:
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
script_category_idstringRequired

ID of script category to return

Responses
delete
/script_categories/{script_category_id}
204

success

No content

Returns all scripts that the user has access to

get

Get a list of scripts in a process.

Authorizations
OAuth2authorizationCodeRequired

Laravel passport oauth2 security.

Authorization URL: Token URL: Refresh URL:
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
filterstringOptional

Filter results by string. Searches Name, Description, and Status. Status must match exactly. Others can be a substring.

order_bystringOptional

Field to order results by

order_directionstring · enumOptionalDefault: ascPossible values:
per_pageintegerOptionalDefault: 10
includestringOptional

Include data from related models in payload. Comma separated list.

Default: ""
Responses
200

list of scripts

application/json
get
/scripts
200

list of scripts

Save a new script

post

Create a new script in a process.

Authorizations
OAuth2authorizationCodeRequired

Laravel passport oauth2 security.

Authorization URL: Token URL: Refresh URL:
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
titlestringOptional

Represents an Eloquent model of a Script

descriptionstringOptional
languagestringOptional
codestringOptional
timeoutintegerOptional
run_as_user_idintegerOptional
keystringOptional
script_category_idintegerOptional
Responses
post
/scripts
201

success

Test script code without saving it

post

Previews executing a script, with sample data/config data

Authorizations
OAuth2authorizationCodeRequired

Laravel passport oauth2 security.

Authorization URL: Token URL: Refresh URL:
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
script_idintegerRequired
Body
dataobject[]Optional
configobject[]Optional
codestringOptional
noncestringOptional
Responses
200

success if the script was queued

No content

post
/scripts/{script_id}/preview
200

success if the script was queued

No content

Execute script

post

Executes a script, with sample data/config data

Authorizations
OAuth2authorizationCodeRequired

Laravel passport oauth2 security.

Authorization URL: Token URL: Refresh URL:
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
script_idintegerRequired
Body
dataobject[]Optional
configobject[]Optional
Responses
200

success if the script was queued

application/json
post
/scripts/execute/{script_id}
200

success if the script was queued

Get the response of a script execution by execution key

get

Get the response of a script execution

Authorizations
OAuth2authorizationCodeRequired

Laravel passport oauth2 security.

Authorization URL: Token URL: Refresh URL:
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
keystringRequired
Responses
200

response of a script execution

application/json
Responseany
get
/scripts/execution/{key}
200

response of a script execution

No content

Get single script by ID

get

Get a single script in a process.

Authorizations
OAuth2authorizationCodeRequired

Laravel passport oauth2 security.

Authorization URL: Token URL: Refresh URL:
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
script_idstringRequired

ID of script to return

Responses
200

Successfully found the script

application/json
get
/scripts/{script_id}
200

Successfully found the script

Update a script

put

Update a script in a process.

Authorizations
OAuth2authorizationCodeRequired

Laravel passport oauth2 security.

Authorization URL: Token URL: Refresh URL:
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
script_idstringRequired

ID of script to return

Body
titlestringOptional

Represents an Eloquent model of a Script

descriptionstringOptional
languagestringOptional
codestringOptional
timeoutintegerOptional
run_as_user_idintegerOptional
keystringOptional
script_category_idintegerOptional
Responses
put
/scripts/{script_id}
204

success

No content

Delete a script

delete

Delete a script in a process.

Authorizations
OAuth2authorizationCodeRequired

Laravel passport oauth2 security.

Authorization URL: Token URL: Refresh URL:
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
script_idstringRequired

ID of script to return

Responses
delete
/scripts/{script_id}
204

success

No content

duplicate a script

put

duplicate a Script.

Authorizations
OAuth2authorizationCodeRequired

Laravel passport oauth2 security.

Authorization URL: Token URL: Refresh URL:
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
scripts_idstringRequired

ID of script to return

Body
titlestringOptional

Represents an Eloquent model of a Script

descriptionstringOptional
languagestringOptional
codestringOptional
timeoutintegerOptional
run_as_user_idintegerOptional
keystringOptional
script_category_idintegerOptional
Responses
put
/scripts/{scripts_id}/duplicate
201

success

Returns all script executors that the user has access to

get

Get a list of script executors.

Authorizations
OAuth2authorizationCodeRequired

Laravel passport oauth2 security.

Authorization URL: Token URL: Refresh URL:
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
filterstringOptional

Filter results by string. Searches Name, Description, and Status. Status must match exactly. Others can be a substring.

order_bystringOptional

Field to order results by

order_directionstring · enumOptionalDefault: ascPossible values:
per_pageintegerOptionalDefault: 10
Responses
200

list of script executors

application/json
get
/script-executors
200

list of script executors

Create a script executor

post

Create a script executor

Authorizations
OAuth2authorizationCodeRequired

Laravel passport oauth2 security.

Authorization URL: Token URL: Refresh URL:
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
titlestringOptional

Represents an Eloquent model of a Script Executor

descriptionstringOptional
languagestringOptional
configstringOptional
Responses
200

success

application/json
post
/script-executors
200

success

Update script executor

put

Update and rebuild the script executor

Authorizations
OAuth2authorizationCodeRequired

Laravel passport oauth2 security.

Authorization URL: Token URL: Refresh URL:
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
script_executorstringRequired

ID of script executor to return

Body
titlestringOptional

Represents an Eloquent model of a Script Executor

descriptionstringOptional
languagestringOptional
configstringOptional
Responses
200

success

application/json
put
/script-executors/{script_executor}
200

success

Delete a script executor

delete

Delete a script executor

Authorizations
OAuth2authorizationCodeRequired

Laravel passport oauth2 security.

Authorization URL: Token URL: Refresh URL:
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
script_executorstringRequired

ID of script executor to return

Responses
200

success

application/json
delete
/script-executors/{script_executor}
200

success

Cancel a script executor

post

Cancel a script executor

Authorizations
OAuth2authorizationCodeRequired

Laravel passport oauth2 security.

Authorization URL: Token URL: Refresh URL:
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
pidFilestringOptional
Responses
200

success

application/json
post
/script-executors/cancel
200

success

Returns all available languages

get

Get a list of available languages.

Authorizations
OAuth2authorizationCodeRequired

Laravel passport oauth2 security.

Authorization URL: Token URL: Refresh URL:
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
filterstringOptional

Filter results by string. Searches Name, Description, and Status. Status must match exactly. Others can be a substring.

order_bystringOptional

Field to order results by

order_directionstring · enumOptionalDefault: ascPossible values:
per_pageintegerOptionalDefault: 10
Responses
200

list of available languages

application/json
get
/script-executors/available-languages
200

list of available languages

Last updated