ProcessMaker Developers Documentation
processmaker.comKnowledge CenterProcessMaker University
API
API
  • ProcessMaker Platform API Documentation
    • ProcessMaker Platform RESTful API
  • Platform API Reference
    • Users
    • Groups
    • Requests
    • Tasks
    • Processes
    • Screens
    • Environment Variables
    • Files
    • Notifications
    • Scripts
    • Administrative APIs
  • Premium API Reference
    • Data Connectors
    • Collections
    • Decision Engine
    • Saved Search
    • Versions
  • Tools
    • Postman Collection
Powered by GitBook
On this page
Edit on GitHub
  1. Platform API Reference

Scripts

API Reference for ProcessMaker Script API

PreviousNotificationsNextAdministrative APIs

Last updated 5 months ago

Get single script category by ID

get

Display the specified script category.

Authorizations
Path parameters
script_category_idstringRequired

ID of script category to return

Responses
200
Successfully found the script
application/json
Responseall of
get
GET /api/1.0/script_categories/{script_category_id} HTTP/1.1
Host: 
Accept: */*
200

Successfully found the script

{
  "name": "text",
  "status": "ACTIVE",
  "id": "text",
  "created_at": "2025-05-21T22:53:05.411Z",
  "updated_at": "2025-05-21T22:53:05.411Z"
}

Delete a script category

delete

Remove the specified resource from storage.

Authorizations
Path parameters
script_category_idstringRequired

ID of script category to return

Responses
204
success
delete
DELETE /api/1.0/script_categories/{script_category_id} HTTP/1.1
Host: 
Accept: */*
204

success

No content

Returns all scripts that the user has access to

get

Get a list of scripts in a process.

Authorizations
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
GET /api/1.0/scripts HTTP/1.1
Host: 
Accept: */*
200

list of scripts

{
  "data": [
    {
      "title": "text",
      "description": "text",
      "language": "text",
      "code": "text",
      "timeout": 1,
      "run_as_user_id": 1,
      "key": "text",
      "script_category_id": 1,
      "id": 1,
      "created_at": "2025-05-21T22:53:05.411Z",
      "updated_at": "2025-05-21T22:53:05.411Z"
    }
  ],
  "meta": {}
}

Get the response of a script execution by execution key

get

Get the response of a script execution

Authorizations
Path parameters
keystringRequired
Responses
200
response of a script execution
application/json
Responseany
get
GET /api/1.0/scripts/execution/{key} HTTP/1.1
Host: 
Accept: */*
200

response of a script execution

No content

Get single script by ID

get

Get a single script in a process.

Authorizations
Path parameters
script_idstringRequired

ID of script to return

Responses
200
Successfully found the script
application/json
Responseall of
get
GET /api/1.0/scripts/{script_id} HTTP/1.1
Host: 
Accept: */*
200

Successfully found the script

{
  "title": "text",
  "description": "text",
  "language": "text",
  "code": "text",
  "timeout": 1,
  "run_as_user_id": 1,
  "key": "text",
  "script_category_id": 1,
  "id": 1,
  "created_at": "2025-05-21T22:53:05.411Z",
  "updated_at": "2025-05-21T22:53:05.411Z"
}

Delete a script

delete

Delete a script in a process.

Authorizations
Path parameters
script_idstringRequired

ID of script to return

Responses
204
success
delete
DELETE /api/1.0/scripts/{script_id} HTTP/1.1
Host: 
Accept: */*
204

success

No content

Returns all script executors that the user has access to

get

Get a list of script executors.

Authorizations
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
GET /api/1.0/script-executors HTTP/1.1
Host: 
Accept: */*
200

list of script executors

{
  "data": [
    {
      "title": "text",
      "description": "text",
      "language": "text",
      "config": "text",
      "id": 1,
      "created_at": "2025-05-21T22:53:05.411Z",
      "updated_at": "2025-05-21T22:53:05.411Z"
    }
  ],
  "meta": {}
}

Delete a script executor

delete

Delete a script executor

Authorizations
Path parameters
script_executorstringRequired

ID of script executor to return

Responses
200
success
application/json
delete
DELETE /api/1.0/script-executors/{script_executor} HTTP/1.1
Host: 
Accept: */*
200

success

{
  "status": "text"
}

Returns all available languages

get

Get a list of available languages.

Authorizations
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
GET /api/1.0/script-executors/available-languages HTTP/1.1
Host: 
Accept: */*
200

list of available languages

{
  "data": [
    {
      "text": "text",
      "value": "text",
      "initDockerFile": "text"
    }
  ],
  "meta": {}
}
  • GETReturns all scripts categories that the user has access to
  • POSTSave a new Script Category
  • GETGet single script category by ID
  • PUTUpdate a script Category
  • DELETEDelete a script category
  • GETReturns all scripts that the user has access to
  • POSTSave a new script
  • POSTTest script code without saving it
  • POSTExecute script
  • GETGet the response of a script execution by execution key
  • GETGet single script by ID
  • PUTUpdate a script
  • DELETEDelete a script
  • PUTduplicate a script
  • GETReturns all script executors that the user has access to
  • POSTCreate a script executor
  • PUTUpdate script executor
  • DELETEDelete a script executor
  • POSTCancel a script executor
  • GETReturns all available languages

Returns all scripts categories that the user has access to

get

Display a listing of the Script Categories.

Authorizations
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
GET /api/1.0/script_categories HTTP/1.1
Host: 
Accept: */*
200

list of scripts categories

{
  "data": [
    {
      "name": "text",
      "status": "ACTIVE",
      "id": "text",
      "created_at": "2025-05-21T22:53:05.411Z",
      "updated_at": "2025-05-21T22:53:05.411Z"
    }
  ],
  "meta": {}
}

Save a new Script Category

post

Store a newly created Script Category in storage

Authorizations
Body
namestringOptional

Represents a business script category definition.

statusstring · enumOptionalPossible values:
Responses
201
success
application/json
Responseall of
post
POST /api/1.0/script_categories HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 33

{
  "name": "text",
  "status": "ACTIVE"
}
201

success

{
  "name": "text",
  "status": "ACTIVE",
  "id": "text",
  "created_at": "2025-05-21T22:53:05.411Z",
  "updated_at": "2025-05-21T22:53:05.411Z"
}

Update a script Category

put

Updates the current element

Authorizations
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
Responseall of
put
PUT /api/1.0/script_categories/{script_category_id} HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 33

{
  "name": "text",
  "status": "ACTIVE"
}
200

success

{
  "name": "text",
  "status": "ACTIVE",
  "id": "text",
  "created_at": "2025-05-21T22:53:05.411Z",
  "updated_at": "2025-05-21T22:53:05.411Z"
}

Save a new script

post

Create a new script in a process.

Authorizations
Body
titlestringOptional

Represents an Eloquent model of a Script

descriptionstringOptional
languagestringOptional
codestringOptional
timeoutintegerOptional
run_as_user_idintegerOptional
keystringOptional
script_category_idintegerOptional
Responses
201
success
application/json
Responseall of
post
POST /api/1.0/scripts HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 136

{
  "title": "text",
  "description": "text",
  "language": "text",
  "code": "text",
  "timeout": 1,
  "run_as_user_id": 1,
  "key": "text",
  "script_category_id": 1
}
201

success

{
  "title": "text",
  "description": "text",
  "language": "text",
  "code": "text",
  "timeout": 1,
  "run_as_user_id": 1,
  "key": "text",
  "script_category_id": 1,
  "id": 1,
  "created_at": "2025-05-21T22:53:05.411Z",
  "updated_at": "2025-05-21T22:53:05.411Z"
}

Test script code without saving it

post

Previews executing a script, with sample data/config data

Authorizations
Path parameters
script_idintegerRequired
Body
dataobject[]Optional
configobject[]Optional
codestringOptional
noncestringOptional
Responses
200
success if the script was queued
post
POST /api/1.0/scripts/{script_id}/preview HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 56

{
  "data": [
    {}
  ],
  "config": [
    {}
  ],
  "code": "text",
  "nonce": "text"
}
200

success if the script was queued

No content

Execute script

post

Executes a script, with sample data/config data

Authorizations
Path parameters
script_idintegerRequired
Body
dataobject[]Optional
configobject[]Optional
Responses
200
success if the script was queued
application/json
post
POST /api/1.0/scripts/execute/{script_id} HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 27

{
  "data": [
    {}
  ],
  "config": [
    {}
  ]
}
200

success if the script was queued

{
  "status": "text",
  "key": "text"
}

Update a script

put

Update a script in a process.

Authorizations
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
204
success
put
PUT /api/1.0/scripts/{script_id} HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 136

{
  "title": "text",
  "description": "text",
  "language": "text",
  "code": "text",
  "timeout": 1,
  "run_as_user_id": 1,
  "key": "text",
  "script_category_id": 1
}
204

success

No content

duplicate a script

put

duplicate a Script.

Authorizations
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
201
success
application/json
Responseall of
put
PUT /api/1.0/scripts/{scripts_id}/duplicate HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 136

{
  "title": "text",
  "description": "text",
  "language": "text",
  "code": "text",
  "timeout": 1,
  "run_as_user_id": 1,
  "key": "text",
  "script_category_id": 1
}
201

success

{
  "title": "text",
  "description": "text",
  "language": "text",
  "code": "text",
  "timeout": 1,
  "run_as_user_id": 1,
  "key": "text",
  "script_category_id": 1,
  "id": 1,
  "created_at": "2025-05-21T22:53:05.411Z",
  "updated_at": "2025-05-21T22:53:05.411Z"
}

Create a script executor

post

Create a script executor

Authorizations
Body
titlestringOptional

Represents an Eloquent model of a Script Executor

descriptionstringOptional
languagestringOptional
configstringOptional
Responses
200
success
application/json
post
POST /api/1.0/script-executors HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 71

{
  "title": "text",
  "description": "text",
  "language": "text",
  "config": "text"
}
200

success

{
  "status": "text",
  "id": "text"
}

Update script executor

put

Update and rebuild the script executor

Authorizations
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
PUT /api/1.0/script-executors/{script_executor} HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 71

{
  "title": "text",
  "description": "text",
  "language": "text",
  "config": "text"
}
200

success

{
  "status": "text"
}

Cancel a script executor

post

Cancel a script executor

Authorizations
Body
pidFilestringOptional
Responses
200
success
application/json
post
POST /api/1.0/script-executors/cancel HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 18

{
  "pidFile": "text"
}
200

success

{
  "status": "text",
  "id": "text"
}