Please rate how useful you found this document: 
Average: 3.4 (5 votes)

Overview

The following Designer endpoints are available in the ProcessMaker REST API 1.0:

Contents: [hide]
  1. Overview
  2. Activities endpoints
    1. Get activity: GET project/{prj_uid}/activity/{act_uid}
    2. Update activity: PUT project/{prj_uid}/activity/{act_uid}
    3. Delete activity: DELETE project/{prj_uid}/activity/{act_uid}
    4. Get Starting Tasks: GET project/{prj_uid}/starting-tasks
  3. Assignee endpoints
    1. Get Assignees to Task: GET /project/{prj_uid}/activity/{act_uid}/assignee
    2. Get Page of Assignees to Task: GET /project/{prj_uid}/activity/{act_uid}/assignee/paged
    3. Get Available Assignees for Task: GET /project/{prj_uid}/activity/{act_uid}/available-assignee
    4. Get Page of Available Assignees for Task: GET /project/{prj_uid}/activity/{act_uid}/available-assignee/paged
    5. Get Assignee to Task: GET /project/{prj_uid}/activity/{act_uid}/assignee/{aas_uid}
    6. Get All Users Assigned to Task: GET /project/{prj_uid}/activity/{act_uid}/assignee/all
    7. Assign to Task: POST /project/{prj_uid}/activity/{act_uid}/assignee
    8. Remove Assignee from Task: DELETE /project/{prj_uid}/activity/{act_uid}/assignee/{aas_uid}
  4. Ad hoc assignee endpoints
    1. Get ad hoc Assignees for Task: GET /project/{prj_uid}/activity/{act_uid}/adhoc-assignee
    2. Get Page of Ad Hoc Assignees to Task: GET /project/{prj_uid}/activity/{act_uid}/adhoc-available-assignee/paged
    3. Get Available Ad hoc Assignees for Task: GET /project/{prj_uid}/activity/{act_uid}/adhoc-available-assignee
    4. Get Page of Available Ad Hoc Assignees for Task: GET /project/{prj_uid}/activity/{act_uid}/adhoc-available-assignee/paged
    5. Get ad hoc Assignee to Task: GET /project/{prj_uid}/activity/{act_uid}/adhoc-assignee/{ada_uid}
    6. Get all ad hoc Users for Task: GET /project/{prj_uid}/activity/{act_uid}/adhoc-assignee/all
    7. Ad hoc Assign to Task: POST /project/{prj_uid}/activity/{act_uid}/adhoc-assignee
    8. Remove ad hoc Assignee from Task: DELETE /project/{prj_uid}/activity/{act_uid}/adhoc-assignee/{ada_uid}
  5. Step endpoints
    1. Get Steps for Task: GET /project/{prj_uid}/activity/{act_uid}/steps
    2. Get Available Steps for Task: GET /project/{prj_uid}/activity/{act_uid}/available-steps
    3. Get Step for Activity: GET /project/{prj_uid}/activity/{act_uid}/step/{step_uid}
    4. Assign Step to Task: POST /project/{prj_uid}/activity/{act_uid}/step
    5. Update Step for Activity: PUT /project/{prj_uid}/activity/{act_uid}/step/{step_uid}
    6. Unassign Step from Task: DELETE /project/{prj_uid}/activity/{act_uid}/step/{step_uid}
    7. Get Triggers for Step: GET /project/{prj_uid}/activity/{act_uid}/step/{step_uid}/triggers
    8. Get Available Triggers for Step: GET /project/{prj_uid}/activity/{act_uid}/step/{step_uid}/available-triggers/{type}
    9. Get Trigger for Step: GET /project/{prj_uid}/activity/{act_uid}/step/{step_uid}/trigger/{tri_uid}/{type}
    10. Assign Trigger to Step: POST /project/{prj_uid}/activity/{act_uid}/step/{step_uid}/trigger
    11. Update Trigger Assignment: PUT /project/{prj_uid}/activity/{act_uid}/step/{step_uid}/trigger/{tri_uid}
    12. Unassign Trigger from Step: DELETE /project/{prj_uid}/activity/{act_uid}/step/{step_uid}/trigger/{tri_uid}/{type}
    13. Get Triggers for Task: GET /project/{prj_uid}/activity/{act_uid}/step/triggers
    14. Available Triggers for Activity: GET /project/{prj_uid}/activity/{act_uid}/step/available-triggers/{type}
    15. Get Trigger for Activity: GET /project/{prj_uid}/activity/{act_uid}/step/trigger/{tri_uid}/{type}
    16. Assign Trigger to Task: POST /project/{prj_uid}/activity/{act_uid}/step/trigger
    17. Update Trigger: PUT /project/{prj_uid}/activity/{act_uid}/step/trigger/{tri_uid}
    18. Unassign Trigger: DELETE /project/{prj_uid}/activity/{act_uid}/step/trigger/{tri_uid}/{type}
  6. Output Document endpoints
    1. Get Output Documents List: GET project/{prj_uid}/output-documents
    2. Get Output Document: GET project/{prj_uid}/output-document/{out_doc_uid}
    3. Create Output Document: POST project/{prj_uid}/output-document
    4. Update Output Document: PUT project/{prj_uid}/output-document/{out_doc_uid}
    5. Delete Output Document: DELETE project/{prj_uid}/output-document/{out_doc_uid}
  7. Input Document endpoints
    1. Get Input Documents List: GET project/{prj_uid}/input-documents
    2. Get Input Document: GET project/{prj_uid}/input-document/{inp_doc_uid}
    3. Create Input Document: POST project/{prj_uid}/input-document
    4. Update Input Document: PUT project/{prj_uid}/input-document/{inp_doc_uid}
    5. Delete Input Document: DELETE project/{prj_uid}/input-document/{inp_doc_uid}
  8. Trigger endpoints
    1. Get Triggers List: GET project/{prj_uid}/triggers
    2. Get Trigger GET project/{prj_uid}/trigger/{tri_uid}
    3. Create Trigger: POST project/{prj_uid}/trigger
    4. Update Trigger: PUT project/{prj_uid}/trigger/{tri_uid}
    5. Delete Trigger: DELETE project/{prj_uid}/trigger/{tri_uid}
  9. DynaForm endpoints
    1. Get DynaForm List: GET project/{prj_uid}/dynaforms
    2. Get DynaForm: GET project/{prj_uid}/dynaform/{dyn_uid}
    3. Get Field List in Grid: GET project/{prj_uid}/dynaform/{dyn_uid}/grid/{grd_name}/field-definitions
    4. Get Field in Grid: GET project/{prj_uid}/dynaform/{dyn_uid}/grid/{grd_name}/field-definition/{fld_id}
    5. Create DynaForm: POST project/{prj_uid}/dynaform
    6. Create DynaForm from Copy/Import: POST project/{prj_uid}/dynaform
    7. Create DynaForm from PM Table: project/{prj_uid}/dynaform
    8. Update DynaForm: PUT project/{prj_uid}/dynaform/{dyn_uid}
    9. Delete DynaForm: DELETE project/{prj_uid}/dynaform/{dyn_uid}
  10. Process Supervisor endpoints
    1. Get Process Supervisors List: GET project/{prj_uid}/process-supervisors
    2. Get Process Supervisor: GET project/{prj_uid}/process-supervisor/{pu_uid}
    3. Available users/groups to assign as process supervisors: GET project/{prj_uid}/available-process-supervisors
    4. Available groups to assign as process supervisors: GET project/{prj_uid}/available-process-supervisors?obj_type=group
    5. Available users to assign as Process Supervisors: GET project/{prj_uid}/available-process-supervisors?obj_type=user
    6. Get DynaForms assigned to process supervisors: GET project/{prj_uid}/process-supervisor/dynaforms
    7. Get DynaForm assigned to process supervisors: GET project/{prj_uid}/process-supervisor/dynaform/{pud_uid}
    8. Available DynaForms to assign to Process Supervisors: GET project/{prj_uid}/process-supervisor/available-dynaforms
    9. Get Input Documents assigned to Process Supervisors: GET project/{prj_uid}/process-supervisor/input-documents
    10. Available Input Documents to assign to Process Supervisors: GET project/{prj_uid}/process-supervisor/available-input-documents
    11. Get Input Document assigned to Process Supervisors: GET project/{prj_uid}/process-supervisor/input-documents/{pui_uid}
    12. Assign a user/group as process supervisor: POST project/{prj_uid}/process-supervisor
    13. Assign DynaForm to Process Supervisors: POST project/{prj_uid}/process-supervisor/dynaform
    14. Assign Input Document to Process Supervisor: POST project/{prj_uid}/process-supervisor/input-document
    15. Remove user/group from Process Supervisors: DELETE project/{prj_uid}/process-supervisor/{pu_uid}
    16. Remove DynaForm from Process Supervisors: DELETE project/{prj_uid}/process-supervisor/dynaform/{pud_uid}
    17. Remove Input Document from Process Supervisors: DELETE project/{prj_uid}/process-supervisor/input-document/{pui_uid}
    18. Update DynaForm assigned to the Process Supervisors: PUT project/{prj_uid}/process-supervisor/dynaform/{pu_uid}
    19. Update Input Document assigned to Process Supervisors: PUT project/{prj_uid}/process-supervisor/input-document/{pu_uid}
  11. Database Connections
    1. Get Database Connections List: GET project/{prj_uid}/database-connections
    2. Get Database Connection: GET project/{prj_uid}/database-connection/{dbs_uid}
    3. Create Database Connection: POST project/{prj_uid}/database-connection
    4. Test Database Connection: POST project/{prj_uid}/database-connection/test
    5. Update Database Connection: PUT project/{prj_uid}/database-connection/{dbs_uid}
    6. Delete Database Connection: DELETE project/{prj_uid}/database-connection/{dbs_uid}
  12. Case Scheduler endpoints
    1. Get Case Schedulers List: GET project/{prj_uid}/case-schedulers
    2. Get Case Scheduler: GET project/{prj_uid}/case-scheduler/{sch_uid}
    3. Create Case Scheduler: POST project/{prj_uid}/case-scheduler
    4. Update Case Scheduler: PUT project/{prj_uid}/case-scheduler/{sch_uid}
    5. Delete Case Scheduler: DELETE project/{prj_uid}/case-scheduler/{sch_uid}
  13. Process Permission endpoints
    1. Get Process Permissions List: GET project/{prj_uid}/process-permissions
    2. Get Process Permission: GET project/{prj_uid}/process-permission/{op_uid}
    3. Create Process Permission: POST project/{prj_uid}/process-permission
    4. Update Process Permission: PUT project/{prj_uid}/process-permission/{op_uid}
    5. Delete Process Permission: DELETE project/{prj_uid}/process-permission/{op_uid}
  14. Web Entry
    1. Get Web Entries List: GET project/{prj_uid}/web-entries
    2. Get Web Entry: GET project/{prj_uid}/web-entry/{we_uid}
    3. Create Web Entry: POST project/{prj_uid}/web-entry
    4. Create Web Entry with HTML page: POST project/{prj_uid}/web-entry
    5. Update Web Entry: PUT project/{prj_uid}/web-entry/{we_uid}
    6. Delete Web Entry: DELETE project/{prj_uid}/web-entry/{we_uid}
  15. Case Tracker
    1. Get Case Tracker Properties: GET project/{prj_uid}/case-tracker/property
    2. Update Case Tracker: PUT project/{prj_uid}/case-tracker/property
    3. Case Tracker Objects List: GET project/{prj_uid}/case-tracker/objects
    4. Available Case Tracker objects: GET project/{prj_uid}/case-tracker/available-objects
    5. Get Case Tracker Object: GET project/{prj_uid}/case-tracker/object/{cto_uid}
    6. Assign Case Tracker Object: POST project/{prj_uid}/case-tracker/object
    7. Update Case Tracker Object: PUT project/{prj_uid}/case-tracker/object/{cto_uid}
    8. Delete Case Tracker Object: DELETE project/{prj_uid}/case-tracker/object/{cto_uid}
  16. Process File Manager endpoints
    1. Get Files List: GET project/{prj_uid}/file-manager?path={path}
    2. Create file: POST project/{prj_uid}/file-manager
  17. Report Table
    1. Get Report Tables List: GET project/{prj_uid}/report-tables
    2. Get Report Table: GET project/{prj_uid}/report-table/{rep_uid
    3. Populate Report Table: GET project/{prj_uid}/report-table/{rep_uid}/populate
    4. Get Report Table Data: GET project/{prj_uid}/report-table/{rep_uid}/data
    5. Create Report Table: POST project/{prj_uid}/report-table
    6. Update Report Table: PUT project/{prj_uid}/report-table/{rep_uid}
    7. Delete Report Table: DELETE project/{prj_uid}/report-table/{rep_uid}
  18. Project endpoints
    1. Get Projects List: GET project
    2. Get Project Definition: GET project/{uid}
    3. Create Project: POST project
    4. Update Project: PUT project project/{uid}
    5. Delete Project: DELETE project/{uid}
    6. Create BPMN Project: POST project/generate-bpmn
  19. Event endpoints
    1. Get Events List: GET project/{prj_uid}/events
    2. Get Event Messages: GET project/{prj_uid}/events?filter=message
    3. Get Event Condition: GET project/{prj_uid}/events?filter=conditional
    4. Get Multiple Events List: GET project/{prj_uid}/events?filter=multiple
    5. Get Event: GET project/{prj_uid}/event/{evn_uid}
    6. Create Event: POST project/{prj_uid}/event
    7. Update Event: PUT project/{prj_uid}/event/{evn_uid}
    8. Delete Event: DELETE project/{prj_uid}/event/{evn_uid}
  20. Export Project
    1. Export Project: GET project/{prj_uid}/export
  21. Import Project
    1. Import Project: POST /project/import?option={option}&option_group={option_group}
  22. Case Task
    1. Get Tasks in Case: GET cases/{app_uid}/tasks
  23. Process endpoints
    1. Get Process: GET project/{prj_uid}/process/
    2. Update Process: PUT project/{prj_uid}/process
  24. Process Variables endpoints
    1. Get Variables List: GET project/{prj_uid}/process-variables
    2. Get Process Variable: GET project/{prj_uid}/process-variable/{var_uid}
    3. Create Process Variable: POST project/{prj_uid}/process-variable
    4. Update Process Variable: PUT project/{prj_uid}/process-varable/{var_uid}
    5. Delete Process Variable: DELETE project/{prj_uid}/process-variable/{var_uid}
    6. Execute Query: POST project/{prj_uid}/process-variable/{var_name}/execute-query
    7. Query Options in Control: POST project/{prj_uid}/process-variable/{var_name}/execute-query-suggest
  25. Variables
    1. Get Variables List: GET project/{prj_uid}/variables
    2. Get Variables in Grid: project/{prj_uid}/grid/{grid_uid}/variables

Activities endpoints

The following REST endpoints are available to manage activities. Note that "activities" are either tasks or subprocesses.

  1. Get activity: GET project/{prj_uid}/activity/{act_uid}
  2. Update activity: PUT project/{prj_uid}/activity/{act_uid}
  3. Delete activity: DELETE project/{prj_uid}/activity/{act_uid}

Note: There is no endpoint to create a new activity.

Get activity: GET project/{prj_uid}/activity/{act_uid}

Get the properties of a specified activity (task or subprocess).

GET /api/1.0/{workspace}/project/{prj_uid}/activity/{act_uid}

URL Parameters:

NameDescriptionExample
workspaceWorkspace name http://www.example.com/api/1.0/workflow/project/84233230756cbb13a780d37064601378/activity/27487747556cbb168597107027360480
prj_uidUnique ID of the project/process. http://www.example.com/api/1.0/workflow/project/84233230756cbb13a780d37064601378/activity/27487747556cbb168597107027360480
act_uidUnique ID of the activity (task or subprocess) http://www.example.com/api/1.0/workflow/project/84233230756cbb13a780d37064601378/activity/27487747556cbb168597107027360480

Result:

If executed with success, the HTTP status code is set to 200 and the following object is returned with information about the activity:

ElementDescription
{
"definition": [], The definition of the task, which is always an empty array.
"properties": { An object holding the properties of the task.
"tas_type": "NORMAL", The type of activity which can be:
"NORMAL": A task which only has normal assigned users.
"ADHOC": A task which has ad hoc assigned users (and can also have normal assigned users).
"SUBPROCESS": A subprocess. Most of the other properties can be ignored except tas_title and tas_description.
"tas_duration": 4, The number of time units before the task becomes overdue. The default is 1.
"tas_type_day": "2", If set to "1", then the task duration is counted by "Work Days", which is Monday through Friday, which is the default. If set to "2", then the time is counted by "Calendar Days" and the calendar being used is set in tas_calendar.
"tas_timeunit": "DAYS", The time unit for the task duration, which can be: "DAYS", "HOURS" or "MINUTES".
"tas_priority_variable": "@@priority",A variable which determines the priority of the task. If the variable contains 1, then the case is the highest priority. If containing 3, then normal priority, which is the default. If 5, then lowest priority. If set to "" (empty string), then the case will have normal priority. Note that this property can only contain variables and not literal values so it will not work correctly if set to "4".
"tas_assign_type": "BALANCED" The type of assignment rule, which can be: "BALANCED" (Cyclical Assignment), "MANUAL", "EVALUATE" (Value Based Assignment), "REPORT_TO", "SELF_SERVICE", "SELF_SERVICE_EVALUATE" (Self Service Value Based Assignment), "MULTIPLE_INSTANCE" (Parallel), "MULTIPLE_INSTANCE_VALUE_BASED" (Parallel Value Based Assignment).
"tas_assign_variable": "@@SYS_NEXT_USER_TO_BE_ASSIGNED", The variable which holds the unique ID of the user to be assigned to a Value Based Assignment task. Remember that this user must also be in the list of assigned users to the task.
"tas_group_variable": "@@SYS_GROUP_TO_BE_ASSIGNED", The variable which contains the unique IDs of the groups and users which can claim a Self Service Value Based Assignment task. Remember that these users/groups must also be in the list of assigned users/groups to the task.
"tas_transfer_fly": "FALSE", If set to "TRUE", then users are allowed to change the task duration during runtime; whereas if set to "FALSE", the task duration is a fixed amount of predetermined time.
"tas_send_last_email": "TRUE", If set to "TRUE", then an email notification is sent to the next assigned assigned user(s), meaning the users assigned to this task will receive a custom email message when the case arrives at this task. If set to "FALSE", then there will be not email notification sent for this task.
"tas_derivation_screen_tpl": "routingScreen.html", The filename of the template file which is displayed after routing the task. If none, then set to "" (empty screen).
"tas_selfservice_timeout": 1, If set to 1, then there is a self service timeout, meaning that a trigger will be executed if no one claims a case with a self-service task within the configured amount of time. If there is no timeout, then set to 0.
"tas_selfservice_time": "5", The amount of time for the timeout in a self service task. If none, then set to "" (empty string).
"tas_selfservice_time_unit": "DAYS",The time units for calculating the timeout for a self service task, which can be "MINUTES", "HOURS" or "DAYS". If none selected, then set to "" (empty string).
"tas_selfservice_trigger_uid": "2840568655706c023962945046408021", The unique ID of the trigger which is executed after the timeout for a self service task. If no trigger, then set to "" (empty string).
"tas_selfservice_execution": "EVERY_TIME", If set to "ONCE", then the trigger for the self service timeout is executed once. If set to "EVERY_TIME", then the trigger is executed every time the cron.php script is run after the timeout.
"tas_title": "Define Client", The title of the task or subprocess.
"tas_description": "Company client",The description of the task or subprocess. The task/subprocess description is displayed when the user views the Case Summary.
"tas_def_title": "Client @#name", The title of the case which can contain variables and is set when the case arrives at the task. It is displayed at the top of the screen next to the case number when a case is opened. If set to "" (empty string), then the title of case displays the case number preceded by #.
"tas_def_description": "Info about client '@#name'", The description of the case which can contain variables and is set when the case arrives at the task. The description is displayed when the user views the Case Summary. If set to "" (empty string), then there is no case description.
"tas_def_message": "New case @#caseNo.\nRegards, @#mngr",The text of the email notification to send to the assigned user(s) if the tas_def_message_type is set to "text".
"tas_def_subject_message": "Your case @#caseNo", The subject line of the email notification to send to the assigned user(s).
"tas_average": NULL, The average amount of time to complete the task, if using the Strategic Dashboards plugin in the Enterprise Edition; otherwise, it is set to NULL.
"tas_sdv": NULL, The standard deviation of the time to complete the task, if using the Strategic Dashboards plugin in the Enterprise Edition; otherwise, it is set to NULL.
"tas_calendar": "1720244195706d204dbfde6080740114", The unique ID of the calendar used to calculate the duration of the task. If set to "00000000000000000000000000000001", then using the "Default Calendar". If set to "" (empty string), then no calendar is used, so time is calculated 24 hours of every day.
"tas_def_message_type": "text", If set to "text", then use plain text for the email notification sent to the next assigned user(s). This text is entered directly in the "Activity Properties" dialog box and is available in the tas_def_message property. If set to "html", then the body of the email notification is defined by a template file which is set in the tas_def_message_template property.
"tas_def_message_template": "alert_message.html" The filename of the template file which defines the body the email notification which is sent to the next assigned user(s) if the tas_def_message_type property is set to "html".
}
}

If an error occurred, the status code is set to 400 or higher and error object is returned, such as:

{
  "error": {
    "code":    400,
    "message": "Bad Request: The activity with act_uid: '67732074357069b874ae219031485148', does not exist."
  }
}

PHP Example:

$pmWorkspace = 'workflow';
$clientId = 'YOXQRMHAMMMKSOENEDENDFQDTJTGTUUS';
$clientSecret = '32667560556abe5142235e0090500305';
$username = 'admin';
$password = 'p4sSw0rd';
$oToken = pmRestLogin($clientId, $clientSecret, $username, $password);
if (!isset($oToken) or !isset($oToken->access_token)) {
   die("Error: Can't access ProcessMaker REST");
}

$projectId = '67183605756a7ddf5b86c47017319951';
$taskId = '51532843656a7de25d98900065683932';
$oRet = pmRestRequest("GET", "/api/1.0/$pmWorkspace/project/$projectId/activity/$taskId", null, $oToken->access_token);
if ($oRet->status == 200)
   echo $oRet->response->properties->tas_title ." Task is type ". $oRet->response->properties->tas_assign_type;
elseif ($oRet->status == 400) {
   echo $oRet->response->error->message;
else
   print_r($oRet);

Update activity: PUT project/{prj_uid}/activity/{act_uid}

Update the properties of a specified activity (task or subprocess).

PUT /api/1.0/{workspace}/project/{prj_uid}/activity/{act_uid}

URL Parameters:

NameDescriptionExample
workspaceWorkspace name http://www.example.com/api/1.0/workflow/project/84233230756cbb13a780d37064601378/activity/27487747556cbb168597107027360480
prj_uidUnique ID of the project UID http://www.example.com/api/1.0/workflow/project/84233230756cbb13a780d37064601378/activity/27487747556cbb168597107027360480
act_uidUnique ID of the activity (step or subprocess) http://www.example.com/api/1.0/workflow/project/84233230756cbb13a780d37064601378/activity/27487747556cbb168597107027360480

PUT Parameters:

ElementDescription
{Start object.
"properties": { Start properties object.
"tas_title": "Define Client",The title of the task or subprocess.
"tas_description": "Enter info about client",The description of the task or subprocess. The task/subprocess description is displayed when the user views the Case Summary.
"tas_priority_variable": "@@priority",A variable which determines the priority of the task. If the variable contains 1, then the case is the highest priority. If containing 3, then normal priority, which is the default. If 5, then lowest priority. If set to "" (empty string), then the case will have normal priority. Note that this property can only contain variables and not literal values, so it will not work correctly if set to "4".
"tas_derivation_screen_tpl": "routingScreen.html",The filename of the template file which is displayed after routing the task. If none, then set to "" (empty screen).
"tas_assign_type": "BALANCED",The type of assignment rule, which can be: "BALANCED" (Cyclical Assignment), "MANUAL", "EVALUATE" (Value Based Assignment), "REPORT_TO", "SELF_SERVICE", "SELF_SERVICE_EVALUATE" (Self Service Value Based Assignment), "MULTIPLE_INSTANCE" (Parallel Assignment in Enterprise E.), "MULTIPLE_INSTANCE_VALUE_BASED" (Parallel Value Based Assignment in Enterprise E.).
"tas_assign_variable": "@@nextAssigned"The variable which holds the unique ID of the user to be assigned to a Value Based Assignment task. The default is "@@SYS_NEXT_USER_TO_BE_ASSIGNED". Remember that this user must also be in the list of assigned users to the task.
"tas_group_variable": "@@canClaimGroup",The variable which contains the unique IDs of the groups and users which can claim a Self Service Value Based Assignment task. The default is "@@SYS_GROUP_TO_BE_ASSIGNED". Remember that these users/groups must also be in the list of assigned users/groups to the task.
"tas_selfservice_time": "5",The amount of time for the timeout in a self service task. If none, then set to "" (empty string).
"tas_selfservice_timeout": 1,Set to 1 for a self service timeout, meaning that a trigger will be executed if no one claims a case with a self-service task within the configured amount of time. If there is no timeout, then set to 0.
"tas_selfservice_time_unit": "DAYS",The time units for calculating the timeout for a self service task, which can be "" (none), "MINUTES", "HOURS" or "DAYS".
"tas_selfservice_trigger_uid": "2840568655706c023962945046408021",The unique ID of the trigger which is executed after the timeout for a self service task. If no trigger, then set to "" (empty string).
"tas_selfservice_execution": "ONCE",If set to "ONCE", then the trigger for the self service timeout is executed once. If set to "EVERY_TIME", then the trigger is executed every time the cron.php script is run after the timeout.
"tas_transfer_fly": "FALSE",If set to "TRUE", then users are allowed to change the task duration during runtime; whereas if set to "FALSE", the task duration is a fixed amount of predetermined time.
"tas_duration": 14,The number of time units before the task becomes overdue. The default is 1.
"tas_timeunit": "DAYS",The time unit for the task duration, which can be: "DAYS", "HOURS" or "MINUTES".
"tas_type_day": "2",If set to "1", then the task duration is counted by "Work Days", which is Monday through Friday, which is the default. If set to "2", then the time is counted by "Calendar Days" and the calendar being used is set in tas_calendar.
"tas_calendar": "1720244195706d204dbfde6080740114",The unique ID of the calendar used to calculate the duration of the task. If set to "00000000000000000000000000000001", then using the "Default Calendar". If set to "" (empty string), then no calendar is used, so task time is calculated 24 hours of every day.
"tas_def_title": "Client @#name",The title of the case which can contain variables and is set when the case arrives at the task. It is displayed at the top of the screen next to the case number when a case is opened. If set to "" (empty string), then the title of case displays the case number preceded by #.
"tas_def_description": "Info about client '@#name'",The description of the case which can contain variables and is set when the case arrives at the task. The description is displayed when the user views the Case Summary. If set to "" (empty string), then there is no case description.
"tas_send_last_email": "TRUE",If set to "TRUE", then an email notification is set to the next assigned assigned user(s), meaning the users assigned to this task will receive a custom email message when the case arrives at this task. If set to "FALSE", then no email notification is sent for this task.
"tas_def_subject_message": "Your case @#caseNo", The subject line of the email notification to send to the assigned user(s) of the task. It may contain variables.
"tas_def_message_type": "text",If set to "text", then use plain text for the email notification sent to the assigned user(s). This text is entered directly in the "Activity Properties" dialog box and is available in the tas_def_message property. If set to "html", then the body of the email notification is defined by a template file which is set in the tas_def_message_template property.
"tas_def_message": "New case @#caseNo.\nRegards, @#mngr",The text (body) of the email notification to send to the assigned user(s) if the tas_def_message_type is set to "text". The text can contain variables.
"tas_def_message_template": "alert_message.html"The filename of the template file which defines the body the email notification which is sent to the assigned user(s) of the task if tas_def_message_type is set to "html".
} End properties object.
}

All properties are optional, but certain properties have dependent properties, which must be set. For example, if tas_transfer_fly is set to "FALSE", then it is not necessary to set tas_duration, but if set to "TRUE", then tas_duration must be set. The easiest way to avoid problems is to first call GET project/{prj_uid}/activity/{act_uid} to get the list of properties for an activity and then set the properties which need to be changed.

Note: It is recommended to not include the tas_type property, because it will cause an error if set to "SUBPROCESS" and changing it from "NORMAL" to "ADHOC or vice versa will set inaccurate information.

Note: If the activity is a subprocess, only the tas_title and tas_description are used. Currently there are no endpoints for getting and updating the other properties of subprocesses.

Result:

If the activity was successfully updated, then the HTTP status code is set to 200 and there is no response. If an error occurred, the status code is set to 400 or higher and error object is returned, such as:

{
  "error": {
    "code":    400,
    "message": "Bad Request: The activity with act_uid: '67732074357069b874ae219031485148', does not exist."
  }
}

PHP Example:

$pmWorkspace = 'workflow';
$clientId = 'YOXQRMHAMMMKSOENEDENDFQDTJTGTUUS';
$clientSecret = '32667560556abe5142235e0090500305';
$username = 'admin';
$password = 'p4sSw0rd';
$oToken = pmRestLogin($clientId, $clientSecret, $username, $password);
if (!isset($oToken) or !isset($oToken->access_token)) {
   die("Error: Can't access ProcessMaker REST");
}

$projectId = '67183605756a7ddf5b86c47017319951';
$taskId = '51532843656a7de25d98900065683932';
$aData = array(
   "properties" => array(
      "tas_title"                  => "Define client",
      "tas_description"            => "Enter client Info",
      "tas_type_day"               => "2",
      "tas_timeunit"               => "HOURS",
      "tas_duration"               => 3,
      "tas_priority_variable"      => "@@priority",
      "tas_assign_type"            => "BALANCED",
      "tas_assign_variable"        => "",
      "tas_group_variable"         => "",
      "tas_transfer_fly"           => "FALSE",
      "tas_send_last_email"        => "TRUE",
      "tas_derivation_screen_tpl"  => "routingScreen.html",
      "tas_selfservice_timeout"    => 1,
      "tas_selfservice_time"       => "34",
      "tas_selfservice_time_unit"  => "HOURS",
      "tas_selfservice_trigger_uid"=> "2840568655706c023962945046408021",
      "tas_selfservice_execution"  => "ONCE",
      "tas_def_title"              => "Client @#clientType",
      "tas_def_description"        => "",
      "tas_def_message"            => "Your new case @#caseNo,\nRegards, @#manager",
      "tas_def_subject_message"    => "Assigned to case @#caseNo",
      "tas_average"                => 23,
      "tas_sdv"                    => 0.5,
      "tas_calendar"               => "00000000000000000000000000000001",
      "tas_def_message_type"       => "text",
      "tas_def_message_template"   => ""
   )
);

$oRet = pmRestRequest("GET", "/api/1.0/$pmWorkspace/project/$projectId/activity/$taskId", $aData, $oToken->access_token);
if ($oRet->status == 400) {
   echo $oRet->response->error->message;
else
   print_r($oRet);

Delete activity: DELETE project/{prj_uid}/activity/{act_uid}

Delete a specified activity (task or subprocess).

DELETE /api/1.0/{workspace}/project/{prj_uid}/activity/{act_uid}

URL Parameters:

NameDescriptionExample
workspaceWorkspace name http://www.example.com/api/1.0/workflow/project/84233230756cbb13a780d37064601378/activity/27487747556cbb168597107027360480
prj_uidUnique ID of the project UID http://www.example.com/api/1.0/workflow/project/84233230756cbb13a780d37064601378/activity/27487747556cbb168597107027360480
act_uidUnique ID of the activity (step or subprocess) http://www.example.com/api/1.0/workflow/project/84233230756cbb13a780d37064601378/activity/27487747556cbb168597107027360480

Result:

If the activity was successfully deleted, then the HTTP status code is set to 200 and there is no response. If an error occurred, the status code is set to 400 or higher and error object is returned, such as:

{
  "error": {
    "code":    400,
    "message": "Bad Request: The activity with act_uid: '67732074357069b874ae219031485148', does not exist."
  }
}

Warning: This endpoint deletes the activity from the TASK or SUB_PROCESS table in the database, but it does NOT remove it from the BPMN_ACTIVITY table if the activity is from a BPMN process. The activity will still appear in the BPMN process map after being deleted.

PHP Example:

$pmWorkspace = 'workflow';
$clientId = 'YOXQRMHAMMMKSOENEDENDFQDTJTGTUUS';
$clientSecret = '32667560556abe5142235e0090500305';
$username = 'admin';
$password = 'p4sSw0rd';
$oToken = pmRestLogin($clientId, $clientSecret, $username, $password);
if (!isset($oToken) or !isset($oToken->access_token)) {
   die("Error: Can't access ProcessMaker REST");
}

$projectId = '67183605756a7ddf5b86c47017319951';
$taskId = '51532843656a7de25d98900065683932';
$oRet = pmRestRequest("DELETE", "/api/1.0/$pmWorkspace/project/$projectId/activity/$taskId", null, $oToken->access_token);
if ($oRet->status == 400) {
   echo $oRet->response->error->message;
else
   print_r($oRet);

Get Starting Tasks: GET project/{prj_uid}/starting-tasks

Returns a list of the starting task(s) to which the logged-in user is assigned in a specified project (or process).

GET /api/1.0/{workspace}/project/{prj_uid}/starting-tasks

URL Parameters:

NameDescriptionExample
workspaceWorkspace name http://www.example.com/api/1.0/workflow/project/84233230756cbb13a780d37064601378/starting-tasks
prj_uidUnique ID of the project (or process) which can be found by looking at the @@PROCESS system variable in the Debugger. http://www.example.com/api/1.0/workflow/project/84233230756cbb13a780d37064601378/starting-tasks

Result:

If successful, then the HTTP status code is set to 200 and an array of task objects is returned. If an error occurred, the status code is set to 400 or higher and error object is returned, such as:

{
   "error": {
     "code": 400,
     "message": "Bad Request: The report table '$prj_uid' is related to a process not present in the workspace, import the related process first. To relate the report table to other process, open the process in the designer and import from there. The report table can't be imported."
    }
}

Note: This REST endpoint only returns tasks which are connected to a normal Start Event. It does not return sub-processes which are connected to Start Events or tasks connected to Start Timer Events.

Example:

Response:

200 (OK)
[
   {
      "act_name": "Engineering Request",
      "act_uid": "7845618785751f9cc81ed78079255303"
   },
   {
      "act_name": "Purchase  Request",
      "act_uid": "2622157305751e15d62bd28044177072"
   }
]

PHP Example:

Search for the unique ID of the "Purchase Request" task:

$pmWorkspace = 'workflow';
$clientId = 'YOXQRMHAMMMKSOENEDENDFQDTJTGTUUS';
$clientSecret = '32667560556abe5142235e0090500305';
$username = 'admin';
$password = 'p4sSw0rd';
$oToken = pmRestLogin($clientId, $clientSecret, $username, $password);
if (!isset($oToken) or !isset($oToken->access_token)) {
   die("Error: Can't access ProcessMaker REST");
}

$projectId = '67183605756a7ddf5b86c47017319951';
$oRet = pmRestRequest("DELETE", "/api/1.0/$pmWorkspace/project/$projectId/starting-task", null, $oToken->access_token);
if ($oRet->status == 200) {
   $taskId = '';
   foreach ($oRet->response as $oTask) {
      if ($oTask->act_name == "Purchase  Request") {
          $taskId = $oTask->act_uid;
      }
   }
}

Assignee endpoints

The following REST endpoints are available to manage assignees (users and groups) to tasks:

  1. Get Assignees to Task: GET /project/{prj_uid}/activity/{act_uid}/assignee
  2. Get Page of Assignees to Task: GET /project/{prj_uid}/activity/{act_uid}/assignee/paged
  3. Get Available Assignees for Task: GET /project/{prj_uid}/activity/{act_uid}/available-assignee
  4. Get Page of Available Assignees for Task: GET /project/{prj_uid}/activity/{act_uid}/available-assignee/paged
  5. Get an Assignee to Task: GET /project/{prj_uid}/activity/{act_uid}/assignee/{aas_uid}
  6. Get All Users assigned to Task: GET /project/{prj_uid}/activity/{act_uid}/assignee/all
  7. Assign to Task: POST /project/{prj_uid}/activity/{act_uid}/assignee
  8. Remove Assignee from Task: DELETE /project/{prj_uid}/activity/{act_uid}/assignee/{aas_uid}

Get Assignees to Task: GET /project/{prj_uid}/activity/{act_uid}/assignee

List the users and groups assigned to a task.

GET /api/1.0/{workspace}/project/{prj_uid}/activity/{act_uid}/assignee?filter={string}&start={number}&limit={number}

URL Parameters:

NameDescriptionExample
workspaceWorkspace name which is workflow by default. https://example.com/api/1.0/workflow/project/276544696573f9457cd0983094962709/ activity/679814870573f92e6509f59003354333/assignee
prj_uidUnique ID of project (process) which can be found by looking at the @@PROCESS variable in the Debugger while running a case.https://example.com/api/1.0/workflow/project/276544696573f9457cd0983094962709/ activity/679814870573f92e6509f59003354333/assignee
act_uidUnique ID of the task which can be found by looking at the @@TASK variable in the Debugger while running a case.http://example.com/api/1.0/workflow/project/276544696573f9457cd0983094962709/ activity/679814870573f92e6509f59003354333/assignee
start={number}Optional. The initial position of the assignees in the list, where 0 is the first assignee, 1 is the second, etc.http://example.com/api/1.0/workflow/project/276544696573f9457cd0983094962709/ activity/679814870573f92e6509f59003354333/assignee?start=1&limit=10
limit={number}Optional. The maximum number of assignees returned.http://example.com/api/1.0/workflow/project/276544696573f9457cd0983094962709/ activity/679814870573f92e6509f59003354333/assignee?start=11&limit=10
filter={string}Optional. A search term to filter the list of assignees. It is a case-insensitive search inside the first name, last name and username of users and the names of groups. Make sure to URL encode the searched text in UTF-8, with a function like urlencode() in PHP or encodeURIComponent() in JavaScript, so that characters like " " (space) becomes %20 and "?" becomes %F3.http://example.com/api/1.0/workflow/project/276544696573f9457cd0983094962709/ activity/679814870573f92e6509f59003354333/ assignee?filter=product%20manager

Result:

If successful, returns an HTTP status code of 200 (OK) and returns a JSON string containing an array of assignee objects, such as:
ElementDescription
[ Start array.
{ Start first assignee object.
"aas_uid": "8f30daa78a440ab308727ca33381a545",Unique ID of user or group assigned to the task.
"aas_name": "James",First name of a user or the name of the group with its number of members in parentheses.
"aas_lastname": "Johnson",Last name of a user. If a group, then "" (empty string).
"aas_username": "james",Username of a user or the name of a group with its number of members in parentheses.
"aas_type": "user"Type of assignee, which can be "user" or "group".
} End first assignee object.
... Any additional assignee objects.
] End array.

Note: This endpoint can also be called for subprocesses, but it will always return an empty array, because users and groups can not be assigned to subprocesses.

Example:

Response

200 (OK)
Content-Type: application/json
[
    {
        "aas_uid": "4e2745a3fdbd977d1339862ae390ad13",
        "aas_name": "Mark",
        "aas_lastname": "Smith",
        "aas_username": "mark",
        "aas_type": "user"
    },
    {
        "aas_uid": "60108982451ae53bc5786b3013937849",
        "aas_name": "John",
        "aas_lastname": "Doe",
        "aas_username": "jdoe",
        "aas_type": "user"
    },
    {
        "aas_uid": "157493645523b4c00067b67020029802",
        "aas_name": "Managers (3 Users)",
        "aas_lastname": "",
        "aas_username": "Managers (3 Users)",
        "aas_type": "group"
    }
]

PHP Example:
Print out a list of the users and groups assigned to a task:

$processId = '3818779375772ec1f183320075303646';
$taskId = '6537449955772ec4b9705a4019286874';

$url = "/api/1.0/workflow/project/$processId/activity/$taskId/assignee";
$oRet = pmRestRequest("GET", $url);
if (if (isset($oRet->status) and $oRet->status == 200) {
    print "<p>Users assigned:</p>\n<ol>";
    foreach ($oRet->response as $oUser) {
        if ($oUser->aas_type == "group")
            print "<li>" .$oUser->aas_name. "</li>\n"; else //if a user: print "<li>" .$oUser->aas_name.' '.$oUser->aas_lastname."</li>\n";
    } print "</ol>\n"; }

Get Page of Assignees to Task: GET /project/{prj_uid}/activity/{act_uid}/assignee/paged

Get a page of the users and groups assigned to a task.

GET /api/1.0/{workspace}/project/{prj_uid}/activity/{act_uid}/assignee/paged?filter={string}&start={number}&limit={number}

URL Parameters:

Name Description Example
workspace Workspace name which is workflow by default. https://example.com/api/1.0/workflow/project/276544696573f9457cd0983094962709/ activity/679814870573f92e6509f59003354333/assignee/paged
prj_uid Unique ID of project (process) which can be found by looking at the @@PROCESS variable in the Debugger while running a case. https://example.com/api/1.0/workflow/project/276544696573f9457cd0983094962709/ activity/679814870573f92e6509f59003354333/assignee/paged
act_uid Unique ID of the task which can be found by looking at the @@TASK variable in the Debugger while running a case. http://example.com/api/1.0/workflow/project/276544696573f9457cd0983094962709/ activity/ 679814870573f92e6509f59003354333/assignee/paged
start={number} Optional. The initial position of the assignees in the list, where 0 is the first assignee, 1 is the second, etc. http://example.com/api/1.0/workflow/project/276544696573f9457cd0983094962709/ activity/679814870573f92e6509f59003354333/assignee/paged? start=1&limit=10
limit={number} Optional. The maximum number of assignees returned. http://example.com/api/1.0/workflow/project/276544696573f9457cd0983094962709/ activity/679814870573f92e6509f59003354333/assignee/paged?start=11& limit=10
filter={string} Optional. A search term to filter the list of assignees. It is a case-insensitive search inside the first name, last name and username of users and the names of groups. Make sure to URL encode the searched text in UTF-8, with a function like urlencode() in PHP or encodeURIComponent() in JavaScript, so that characters like " " (space) becomes %20 and "?" becomes %F3. http://example.com/api/1.0/workflow/project/276544696573f9457cd0983094962709/ activity/679814870573f92e6509f59003354333/assignee/paged? filter=product%20manager

Result:

If successful, returns an HTTP status code of 200 (OK) and returns a JSON string containing a page of assignee objects.

Note: This endpoint can also be called for subprocesses, but it will always return an empty array, because users and groups can not be assigned to subprocesses.

Example:

Response

200 (OK)
Content-Type: application/json
{
  "total":  3,
  "start":  0,
  "limit":  0,
  "filter": "",
  "data":   [
    {
      "aas_uid": "4e2745a3fdbd977d1339862ae390ad13",
      "aas_name": "Mark",
      "aas_lastname": "Smith",
      "aas_username": "mark",
      "aas_type": "user"
    },
    {
      "aas_uid": "60108982451ae53bc5786b3013937849",
      "aas_name": "John",
      "aas_lastname": "Doe",
      "aas_username": "jdoe",
      "aas_type": "user"
    },
    {
      "aas_uid": "157493645523b4c00067b67020029802",
      "aas_name": "Managers (4 Users)",
      "aas_lastname": "",
      "aas_username": "Managers (4 Users)",
      "aas_type": "group"
    }
  ]
}

PHP Example:
Get the number of assignees to a task:

$processId = '3818779375772ec1f183320075303646';
$taskId = '6537449955772ec4b9705a4019286874';

$url = "/api/1.0/workflow/project/$processId/activity/$taskId/assignee?limit=0";
$oRet = pmRestRequest("GET", $url);
if (if (isset($oRet->status) and $oRet->status == 200) {
   $totalAssignees = $oRet->response->total;
   print "<p>$totalAssignees users assigned to task.</p>\n";
}

Get Available Assignees for Task: GET /project/{prj_uid}/activity/{act_uid}/available-assignee

Get a list of available users and groups which may be assigned to a task.

GET /api/1.0/{workspace}/project/{prj_uid}/activity/{act_uid}/available-assignee?filter={string}&start={number}&limit={number}

URL Parameters:

Name Description Example
workspace Workspace name which is workflow by default. https://example.com/api/1.0/workflow/project/276544696573f9457cd0983094962709/ activity/679814870573f92e6509f59003354333/available-assignee
prj_uid Unique ID of project (process) which can be found by looking at the @@PROCESS variable in the Debugger while running a case. https://example.com/api/1.0/workflow/project/276544696573f9457cd0983094962709/ activity/679814870573f92e6509f59003354333/available-assignee
act_uid Unique ID of the task which can be found by looking at the @@TASK variable in the Debugger while running a case. http://example.com/api/1.0/workflow/project/276544696573f9457cd0983094962709/ activity/ 679814870573f92e6509f59003354333/available-assignee
start={number} Optional. The initial position of the assignees in the list, where 0 is the first assignee, 1 is the second, etc. http://example.com/api/1.0/workflow/project/276544696573f9457cd0983094962709/ activity/679814870573f92e6509f59003354333/available-assignee? start=1&limit=10
limit={number} Optional. The maximum number of assignees returned. http://example.com/api/1.0/workflow/project/276544696573f9457cd0983094962709/ activity/679814870573f92e6509f59003354333/available-assignee?start=11& limit=10
filter={string} Optional. A search term to filter the list of assignees. It is a case-insensitive search inside the first name, last name and username of users and the names of groups. Make sure to URL encode the searched text in UTF-8, with a function like urlencode() in PHP or encodeURIComponent() in JavaScript, so that characters like " " (space) becomes %20 and "?" becomes %F3. http://example.com/api/1.0/workflow/project/276544696573f9457cd0983094962709/ activity/679814870573f92e6509f59003354333/available-assignee? filter=product%20manager

Result:

If successful, returns an HTTP status code of 200 and returns a JSON string containing an array of assignee objects, such as:

Element Description
[ Start array.
{ Start first assignee object.
"aas_uid": "8f30daa78a440ab308727ca33381a545", Unique ID of the user or group assigned to the task.
"aas_name": "James", First name of a user or the name of a group with the number of its members in parentheses.
"aas_lastname": "Johnson", Assignee's last name. If a group, then "" (empty string).
"aas_username": "james", Username of a user or the name of a group with the number of its members in parentheses.
"aas_type": "user" Type of assignee, which can be "user" or "group".
} End first assignee object.
... Any additional assignee objects.
] End array.

Note: If this endpoint is called for a subprocess, it will return all the users and groups in the workspace.

Example:

Response

200 (OK)
Content-Type: application/json
[
  {
    "aas_uid":      "8f30daa78a440ab308727ca33381a545",
    "aas_name":     "James",
    "aas_lastname": "Johnson",
    "aas_username": "james",
    "aas_type":     "user"
  },
  {
    "aas_uid":      "184131195492c7a04cba5f9056989964",
    "aas_name":     "Mary",
    "aas_lastname": "Rose",
    "aas_username": "mary",
    "aas_type":     "user"
  },
  {
    "aas_uid":      "1846526764c8905435c74e2028286704",
    "aas_name":     "Employees (4 Users)",
    "aas_lastname": "",
    "aas_username": "Employees (4 Users)",
    "aas_type":     "group"
  }
]

PHP Example:
Get the list of users for a task and then chose one of them at random to assign to the task:

$processId = '3818779375772ec1f183320075303646';
$taskId = '6537449955772ec4b9705a4019286874';
$userId = '679814870573f92e6509f59003354333';

$url = "/api/1.0/workflow/project/$processId/activity/$taskId/available-assignee";
$oRet = pmRestRequest("GET", $url);
if (isset($oRet->status) and $oRet->status == 200) {
   $aUsers = array();
   //only copy users into the array:
   for ($i = 0; $i < count($oRet->response); $i++) {
      if ($oRet->response[$i]->aas_type == 'user')
         $aUsers[] = $oRet->response[$i]->aas_uid;
   }
   if (count($aUsers) == 0)
      die("No users to assign to task");

   $randNo = rand(0, count($aUsers)-1);
   $url = "/api/1.0/workflow/project/$processId/activity/$taskId/assignee";
   $aParams = array(
      'aas_uid' => $aUsers[$randNo],
      'aas_type'=> 'user'
   );
   $oRet = pmRestRequest("POST", $url, $aParams);
}

Get Page of Available Assignees for Task: GET /project/{prj_uid}/activity/{act_uid}/available-assignee/paged

Get a page of the available users and groups which may be assigned to a task.

GET /api/1.0/{workspace}/project/{prj_uid}/activity/{act_uid}/available-assignee/paged?filter={string}&start={number}&limit={number}

URL Parameters:

Name Description Example
workspace Workspace name which is workflow by default. https://example.com/api/1.0/workflow/project/276544696573f9457cd0983094962709/ activity/679814870573f92e6509f59003354333/ available-assignee/paged
prj_uid Unique ID of project (process) which can be found by looking at the @@PROCESS variable in the Debugger while running a case. https://example.com/api/1.0/workflow/project/276544696573f9457cd0983094962709/ activity/679814870573f92e6509f59003354333/ available-assignee/paged
act_uid Unique ID of the task which can be found by looking at the @@TASK variable in the Debugger while running a case. http://example.com/api/1.0/workflow/project/276544696573f9457cd0983094962709/ activity/ 679814870573f92e6509f59003354333/ available-assignee/paged
start={number} Optional. The initial position of the assignees in the list, where 0 is the first assignee, 1 is the second, etc. http://example.com/api/1.0/workflow/project/276544696573f9457cd0983094962709/ activity/679814870573f92e6509f59003354333/ available-assignee/paged? start=1&limit=10
limit={number} Optional. The maximum number of assignees returned. http://example.com/api/1.0/workflow/project/276544696573f9457cd0983094962709/ activity/679814870573f92e6509f59003354333/ available-assignee/paged?start=11& limit=10
filter={string} Optional. A search term to filter the list of assignees. It is a case-insensitive search inside the first name, last name and username of users and the names of groups. Make sure to URL encode the searched text in UTF-8, with a function like urlencode() in PHP or encodeURIComponent() in JavaScript, so that characters like " " (space) becomes %20 and "?" becomes %F3. http://example.com/api/1.0/workflow/project/276544696573f9457cd0983094962709/ activity/679814870573f92e6509f59003354333/ available-assignee/paged? filter=product%20manager

Result:

If successful, returns an HTTP status code of 200 and returns a JSON string containing an array of assignee objects, such as:

Element Description
{ Start page object.
"total": 3, Total number of available assignees to the task.
"start": 0, Index number of the first assignee returned.
"limit": 0, The maximum number of assignees which will be returned.
"filter": "", A search string which filters assignees who are returned.
"data": [ An array of the available assignees.
{ Start first assignee object.
"aas_uid": "8f30daa78a440ab308727ca33381a545", Unique ID of the user or group assigned to the task.
"aas_name": "James", First name of a user or the name of a group with the number of its members in parentheses.
"aas_lastname": "Johnson", Last name of a user. If a group, then "" (empty string).
"aas_username": "james", Username of a user or the name of a group with the number of its members in parentheses.
"aas_type": "user" Type of assignee, which can be "user" or "group".
} End first assignee object.
... Any additional assignee objects.
] End array.
} End page object.

Note: If this endpoint is called for a subprocess, it will return all the users and groups in the workspace.

Example:

Response

200 (OK)
Content-Type: application/json
{
  "total":  3,
  "start":  0,
  "limit":  0,
  "filter": "",
  "data":   [
    {
      "aas_uid":      "8f30daa78a440ab308727ca33381a545",
      "aas_name":     "James",
      "aas_lastname": "Johnson",
      "aas_username": "james",
      "aas_type":     "user"
    },
    {
      "aas_uid":      "184131195492c7a04cba5f9056989964",
      "aas_name":     "Mary",
      "aas_lastname": "Rose",
      "aas_username": "mary",
      "aas_type":     "user"
    },
    {
      "aas_uid":      "1846526764c8905435c74e2028286704",
      "aas_name":     "Employees (3 Users)",
      "aas_lastname": "",
      "aas_username": "Employees (3 Users)",
      "aas_type":     "group"
    }
  ]
}

PHP Example:
Get the list of users for a task and then chose one of them at random to assign to the task:

$processId = '3818779375772ec1f183320075303646';
$taskId = '6537449955772ec4b9705a4019286874';

$url = "/api/1.0/workflow/project/$processId/activity/$taskId/available-assignee/paged";
$oRet = pmRestRequest("GET", $url);
if (isset($oRet->status) and $oRet->status == 200) {
   $aUsers = array();
   //only copy users into the array:
   for ($i = 0; $i < count($oRet->response); $i++) {
      if ($oRet->response->data[$i]->aas_type == 'user')
         $aUsers[] = $oRet->response->data[$i]->aas_uid;
   }
   if (count($aUsers) == 0)
      die("No users to assign to task");

   $randNo = rand(0, count($aUsers)-1);
   $url = "/api/1.0/workflow/project/$processId/activity/$taskId/assignee";
   $aParams = array(
      'aas_uid' => $aUsers[$randNo],
      'aas_type'=> 'user'
   );
   $oRet = pmRestRequest("POST", $url, $aParams);
}

Get Assignee to Task: GET /project/{prj_uid}/activity/{act_uid}/assignee/{aas_uid}

Get a single user or group assigned to a task.

GET /api/1.0/{workspace}/project/{prj_uid}/activity/{act_uid}/assignee/{aas_uid}

URL Parameters:

Name Description Example
workspace Workspace name, which is workflow by default. https://example.com/api/1.0/workflow/project/276544696573f9457cd0983094962709/activity/679814870573f92e6509f59003354333/assignee/11609821854ca4355344560009542371
prj_uid Unique ID of project (process) which can be found by looking at the @@PROCESS variable in the Debugger while running a case. https://example.com/api/1.0/workflow/project/276544696573f9457cd0983094962709/activity/679814870573f92e6509f59003354333/assignee/11609821854ca4355344560009542371
act_uid Unique ID of the task, which can be found by looking at the @@TASK variable in the Debugger while running a case. http://example.com/api/1.0/workflow/project/276544696573f9457cd0983094962709/activity/679814870573f92e6509f59003354333/assignee/11609821854ca4355344560009542371
aas_uid Unique ID of the assignee (user or group). http://example.com/api/1.0/workflow/project/276544696573f9457cd0983094962709/activity/679814870573f92e6509f59003354333/assignee/11609821854ca4355344560009542371

Result:

If successful, returns an HTTP status code of 200 and returns a JSON string containing an assignee object, such as:

Element Description
{ Start assignee object.
"aas_uid": "8f30daa78a440ab308727ca33381a545", The unique ID of a user or group assigned to the task.
"aas_name": "James", First name of a user or the name of a group with the number of its members in parentheses.
"aas_lastname": "Johnson", Last name of a user. If a group, then "" (empty string).
"aas_username": "james", Username of a user or the name of a group with the number of its members in parentheses.
"aas_type": "user" Type of assignee, which can be "user" or "group".
} End assignee object.

If unsuccessful, returns an error object such as:

{
  "error": {
    "code":    400,
    "message": "Bad Request: Record not found for id: 4716284485775a22f911111008384981"
  }
}

Example:

Response

200 (OK)
Content-Type: application/json
{
  "aas_uid":      "4e2745a3fdbd977d1339862ae390ad13",
  "aas_name":     "Mark",
  "aas_lastname": "Smith",
  "aas_username": "mark",
  "aas_type":     "user"
}

PHP Example:
Check if a user with the ID "4716284485775a22f911111008384981" is assigned to a task:

$processId = '3818779375772ec1f183320075303646';
$taskId = '6537449955772ec4b9705a4019286874';
$userId = '4716284485775a22f911111008384981';

$url = "/api/1.0/workflow/project/$processId/activity/$taskId/assignee/$userId";
$oRet = pmRestRequest("GET", $url);
if (if (isset($oRet->status) and $oRet->status == 200) {
   $name = $oRet->response->aas_username;
   print "User $name already assigned to task.\n";
}

Get All Users Assigned to Task: GET /project/{prj_uid}/activity/{act_uid}/assignee/all

Get a list all the users who are assigned to a task (including users that are within groups).

GET /api/1.0/{workspace}/project/{prj_uid}/activity/{act_uid}/assignee/all?filter={string}&start={number}&limit={number}

URL Parameters:

Name Description Example
workspace Workspace name which is workflow by default. https://example.com/api/1.0/workflow/project/276544696573f9457cd0983094962709/activity/679814870573f92e6509f59003354333/assignee/all
prj_uid Unique ID of project (process) which can be found by looking at the @@PROCESS variable in the Debugger while running a case. https://example.com/api/1.0/workflow/project/276544696573f9457cd0983094962709/activity/679814870573f92e6509f59003354333/assignee/all
act_uid Unique ID of the task which can be found by looking at the @@TASK variable in the Debugger while running a case. http://example.com/api/1.0/workflow/project/276544696573f9457cd0983094962709/activity/679814870573f92e6509f59003354333/assignee/all
start={number} Optional. The initial position of the assignees in the list, where 0 is the first assignee, 1 is the second, etc. http://example.com/api/1.0/workflow/project/276544696573f9457cd0983094962709/activity/679814870573f92e6509f59003354333/assignee/all?start=1&limit=10
limit={number} Optional. The maximum number of assignees returned. http://example.com/api/1.0/workflow/project/276544696573f9457cd0983094962709/activity/679814870573f92e6509f59003354333/assignee/all?start=11&limit=10
filter={string} Optional. A search term to filter the list of assignees. It is a case-insensitive search inside the first name, last name and username of users and the names of groups. Make sure to URL encode the searched text in UTF-8, with a function like urlencode() in PHP or encodeURIComponent() in JavaScript, so that characters like " " (space) becomes %20 and "?" becomes %F3. http://example.com/api/1.0/workflow/project/276544696573f9457cd0983094962709/activity/679814870573f92e6509f59003354333/assignee/all?filter=product%20manager

Result:

If successful, returns an HTTP status code of 200 and returns a JSON string containing an array of assignee objects, such as:

Element Description
[ Start array.
{ Start first assignee object.
"aas_uid": "8f30daa78a440ab308727ca33381a545", Start array.
"aas_name": "James", First name of a user or the name of a group with the number of members in parentheses.
"aas_lastname": "Johnson", Last name of a user. If a group, then "" (empty string).
"aas_username": "james", Username of a user or the name of a group with the number of members in parentheses.
"aas_type": "user" Type of assignee, which can be "user" or "group".
} End first assignee object.
... Any additional assignee objects.
] End array.

Warning: This endpoint has an outstanding bug and always returns a response of NULL.

Example:

Response

200 (OK)
Content-Type: application/json
[
  {
    "aas_uid":      "4e2745a3fdbd977d1339862ae390ad13",
    "aas_name":     "Mark",
    "aas_lastname": "Smith",
    "aas_username": "mark",
    "aas_type":     "user"
  },
  {
    "aas_uid":      "60108982451ae53bc5786b3013937849",
    "aas_name":     "Jane",
    "aas_lastname": "Doe",
    "aas_username": "jdoe",
    "aas_type":     "user"
  },
  {
    "aas_uid":      "157493645523b4c00067b67020029802",
    "aas_name":     "Managers (2 Users)",
    "aas_lastname": "",
    "aas_username": "Managers (2 Users)",
    "aas_type":     "group"
  }
]

Assign to Task: POST /project/{prj_uid}/activity/{act_uid}/assignee

Assign a user or group to a task.

POST /api/1.0/{workspace}/project/{prj_uid}/activity/{act_uid}/assignee

URL Parameters:

Name Description Example
workspace Workspace name, which is workflow by default. https://example.com/api/1.0/workflow/project/276544696573f9457cd0983094962709/activity/679814870573f92e6509f59003354333/assignee
prj_uid Unique ID of project (process) which can be found by looking at the @@PROCESS variable in the Debugger while running a case. https://example.com/api/1.0/workflow/project/276544696573f9457cd0983094962709/activity/679814870573f92e6509f59003354333/assignee
act_uid Unique ID of the task, which can be found by looking at the @@TASK variable in the Debugger while running a case. http://example.com/api/1.0/workflow/project/276544696573f9457cd0983094962709/activity/679814870573f92e6509f59003354333/assignee

POST Parameters:

Element Description
{
"aas_uid": "8f30daa78a440ab308727ca33381a545", The unique ID of the user or group to assign.
"aas_type": "user", Type of assignee, which can be "user" or "group".
"aas_name": "James", Optional. First name of a user or the name of the group.
"aas_lastname": "Johnson", Optional. Assignee's last name. If a group, then "" (empty string).
"aas_username": "james" Optional. Assignee's username. If a group, then "" (empty string).
}

Result:

If successful, returns an HTTP status code of 201 (Created) and there is no response; otherwise, the HTTP status code is set to 400 and an error object is returned, such as:

{
  "error": {
    "code":    400,
    "message": "Bad Request: This ID: 4716284485775a22f911111008384981 is already assigned to task: 6537449955772ec4b9705a4019286874"
  }
}

Example:

Request

Content-Type: application/json
{
  "aas_uid":  "977d1339862ae390ad134e2745a3fdbd",
  "aas_type": "user"
}

Response

201 (Created)

PHP Example:

$processId = '3818779375772ec1f183320075303646';
$taskId = '6537449955772ec4b9705a4019286874';
$userId = '4716284485775a22f911111008384981';

$aParams = array(
      "aas_uid" => $userId,
     "aas_type"=> "user"
);
$url = "/api/1.0/workflow/project/$processId/activity/$taskId/assignee";
$oRet = pmRestRequest("POST", $url, $aParams);
if (!isset($oRet->status) or $oRet->status != 201) {
   die("Error: Unable to assign user to task.");
}

Remove Assignee from Task: DELETE /project/{prj_uid}/activity/{act_uid}/assignee/{aas_uid}

Remove an assignee (user or group) from a task.

DELETE /api/1.0/{workspace}/project/{prj_uid}/activity/{act_uid}/assignee/{aas_uid}

URL Parameters:

Name Description Example
workspace Workspace name, which is workflow by default. https://example.com/api/1.0/workflow/project/276544696573f9457cd0983094962709/activity/679814870573f92e6509f59003354333/assignee/11609821854ca4355344560009542371
prj_uid Unique ID of project (process) which can be found by looking at the @@PROCESS variable in the Debugger while running a case. https://example.com/api/1.0/workflow/project/276544696573f9457cd0983094962709/activity/679814870573f92e6509f59003354333/assignee/11609821854ca4355344560009542371
act_uid Unique ID of the task, which can be found by looking at the @@TASK variable in the Debugger while running a case. http://example.com/api/1.0/workflow/project/276544696573f9457cd0983094962709/activity/679814870573f92e6509f59003354333/assignee/11609821854ca4355344560009542371
ass_uid Unique ID of the assignee (user or group). http://example.com/api/1.0/workflow/project/276544696573f9457cd0983094962709/activity/679814870573f92e6509f59003354333/assignee/11609821854ca4355344560009542371

Result:

If successful, returns an HTTP status code of 200 (OK) and there is no response. If the user/group is not assigned to the task, then the HTTP status code is set to 400 and the following response is returned:

{
  "error": {
    "code":    400,
    "message": "Bad Request: This row does not exist!"
  }
}

Example:

Response

200 (OK)

PHP Example:

$processId = '3818779375772ec1f183320075303646';
$taskId = '6537449955772ec4b9705a4019286874';
$userId = '4716284485775a22f911111008384981';

$url = "/api/1.0/workflow/project/$processId/activity/$taskId/assignee/$userId";
$oRet = pmRestRequest("DELETE", $url);
if (!isset($oRet->status) or $oRet->status != 200) {
   print "Error: Unable to remove user from task.\n";
   print_r($oRet);
   die;
}

Ad hoc assignee endpoints

The following endpoints can be used to manage ad hoc assignees to tasks:

  1. Get ad hoc Assignees for Task: GET /project/{prj_uid}/activity/{act_uid}/adhoc-assignee
  2. Get Page of Ad Hoc Assignees to Task: GET /project/{prj_uid}/activity/{act_uid}/adhoc-available-assignee/paged
  3. Get Available ad hoc Assignees for Task: GET /project/{prj_uid}/activity/{act_uid}/available-adhoc-assignee
  4. Get Page of Available Ad Hoc Assignees for Task: GET /project/{prj_uid}/activity/{act_uid}/adhoc-available-assignee/paged
  5. Get single ad hoc Assignee to Task: GET /project/{prj_uid}/activity/{act_uid}/adhoc-assignee/{ada_uid}
  6. Get all ad hoc Users for Task: GET /project/{prj_uid}/activity/{act_uid}/adhoc-assignee/all
  7. Ad hoc Assign to Task: POST /project/{prj_uid}/activity/{act_uid}/adhoc-assignee
  8. Remove ad hoc Assignee from Task: DELETE /project/{prj_uid}/activity/{act_uid}/adhoc-assignee/{ada_uid}

Note: If these GET endpoints are called for a subprocess, they will return an empty array, because users and groups can't be assigned to subprocesses.

Get ad hoc Assignees for Task: GET /project/{prj_uid}/activity/{act_uid}/adhoc-assignee

Get a list of ad hoc assignees to a task.

GET /api/1.0/{workspace}/project/{prj_uid}/activity/{act_uid}/adhoc-assignee?filter={string}&start={number}&limit={number}

URL Parameters:

NameDescriptionExample
workspaceWorkspace name which is workflow by default. https://example.com/api/1.0/workflow/project/276544696573f9457cd0983094962709/activity/679814870573f92e6509f59003354333/adhoc-assignee
prj_uidUnique ID of project (process) which can be found by looking at the @@PROCESS variable in the Debugger while running a case.https://example.com/api/1.0/workflow/project/276544696573f9457cd0983094962709/activity/679814870573f92e6509f59003354333/adhoc-assignee
act_uidUnique ID of the task which can be found by looking at the @@TASK variable in the Debugger while running a case.http://example.com/api/1.0/workflow/project/276544696573f9457cd0983094962709/activity/679814870573f92e6509f59003354333/assignee
start={number}Optional. The initial position of the assignees in the list, where 0 is the first assignee, 1 is the second, etc.http://example.com/api/1.0/workflow/project/276544696573f9457cd0983094962709/activity/679814870573f92e6509f59003354333/adhoc-assignee?start=1&limit=10
limit={number}Optional. The maximum number of assignees returned.http://example.com/api/1.0/workflow/project/276544696573f9457cd0983094962709/activity/679814870573f92e6509f59003354333/adhoc-assignee?start=11&limit=10
filter={string}Optional. A search term to filter the list of assignees. It is a case-insensitive search inside the first name, last name and username of users and the names of groups. Make sure to URL encode the searched text in UTF-8, with a function like urlencode() in PHP or encodeURIComponent() in JavaScript, so that characters like " " (space) becomes %20 and "?" becomes %F3.http://example.com/api/1.0/workflow/project/276544696573f9457cd0983094962709/activity/679814870573f92e6509f59003354333/adhoc-assignee?filter=product%20manager

Result:

If successful, returns an HTTP status code of 200 (OK) and returns a JSON string containing an array of assignee objects, such as:
ElementDescription
[ Start array.
{ Start first assignee object.
"ada_uid": "8f30daa78a440ab308727ca33381a545",Unique ID of user or group assigned to task on an ad hoc basis.
"ada_name": "James",First name of a user or the name of the group.
"ada_lastname": "Johnson",Assignee's last name. If a group, then "" (empty string).
"ada_username": "james",Assignee's username. If a group, then "" (empty string).
"ada_type": "user"Type of assignee, which can be "user" or "group".
} End first assignee object.
... Any additional assignee objects.
] End array.

Example:

Response

200 (OK)
[
  {
    "ada_uid":      "4e2745a3fdbd977d1339862ae390ad13",
    "ada_name":     "Mark",
    "ada_lastname": "Smith",
    "ada_username": "mark",
    "ada_type":     "user"
  },
  {
    "ada_uid":      "60108982451ae53bc5786b3013937849",
    "ada_name":     "Jane",
    "ada_lastname": "Rowe",
    "ada_username": "jrowe",
    "ada_type":     "user"
  },
  {
    "ada_uid":      "157493645523b4c00067b67020029802",
    "ada_name":     "Managers (3 Users)",
    "ada_lastname": "",
    "ada_username": "Managers (3 Users)",
    "ada_type":     "group"
  }
]

Get Page of Ad Hoc Assignees to Task: GET /project/{prj_uid}/activity/{act_uid}/adhoc-available-assignee/paged

Get a page of the users and groups which are assigned to a task on an ad hoc basis.

GET /api/1.0/{workspace}/project/{prj_uid}/activity/{act_uid}/adhoc-assignee/paged?filter={string}&start={number}&limit={number}

URL Parameters:

NameDescriptionExample
workspaceWorkspace name which is workflow by default. https://example.com/api/1.0/workflow/project/276544696573f9457cd0983094962709/activity/679814870573f92e6509f59003354333/adhoc-assignee/paged
prj_uidUnique ID of project (process) which can be found by looking at the @@PROCESS variable in the Debugger while running a case.https://example.com/api/1.0/workflow/project/276544696573f9457cd0983094962709/activity/679814870573f92e6509f59003354333/adhoc-assignee/paged
act_uidUnique ID of the task which can be found by looking at the @@TASK variable in the Debugger while running a case.http://example.com/api/1.0/workflow/project/276544696573f9457cd0983094962709/activity/679814870573f92e6509f59003354333/adhoc-assignee/paged
start={number}Optional. The initial position of the assignees in the list, where 0 is the first assignee, 1 is the second, etc.http://example.com/api/1.0/workflow/project/276544696573f9457cd0983094962709/activity/679814870573f92e6509f59003354333/adhoc-available-assignee/paged?start=1&limit=10
limit={number}Optional. The maximum number of assignees returned.http://example.com/api/1.0/workflow/project/276544696573f9457cd0983094962709/activity/679814870573f92e6509f59003354333/adhoc-assignee/paged?start=11&limit=10
filter={string}Optional. A search term to filter the list of assignees. It is a case-insensitive search inside the first name, last name and username of users and the names of groups. Make sure to URL encode the searched text in UTF-8, with a function like urlencode() in PHP or encodeURIComponent() in JavaScript, so that characters like " " (space) becomes %20 and "?" becomes %F3.http://example.com/api/1.0/workflow/project/276544696573f9457cd0983094962709/activity/679814870573f92e6509f59003354333/adhoc-assignee/paged?filter=product%20manager

Result:

If successful, returns an HTTP status code of 200 and returns a JSON string containing an array of assignee objects, such as:

ElementDescription
{ Start page object.
"total": 3, Total number of ad hoc assignees for the task.
"start": 0, Index number of the first ad hoc assignee returned.
"limit": 0, The maximum number of ad hoc assignees which will be returned.
"filter": "",A search string which filters ad hoc assignees who are returned.
"data": [ An array of the available ad hoc assignees.
{ Start first assignee object.
"ada_uid": "8f30daa78a440ab308727ca33381a545",Unique ID of the ad hoc assignee (user or group)
"ada_name": "James",First name of a user or the name of a group with the number of members in parentheses.
"ada_lastname": "Johnson",User's last name. If a group, then "" (empty string).
"ada_username": "james",Username of a user or the name of a group with the number of members in parentheses.
"ada_type": "user"Type of assignee, which can be "user" or "group".
} End first assignee object.
... Any additional assignee objects.
] End array.
} End page object.

Note: If this endpoint is called for a subprocess, it will return zero assignees.

Example:

Response

200 (OK)
Content-Type: application/json
{
  "total":  3,
  "start":  0,
  "limit":  0,
  "filter": "",
  "data":   [
    {
      "ada_uid":      "8f30daa78a440ab308727ca33381a545",
      "ada_name":     "James",
      "ada_lastname": "Johnson",
      "ada_username": "james",
      "ada_type":     "user"
    },
    {
      "ada_uid":      "184131195492c7a04cba5f9056989964",
      "ada_name":     "Mary",
      "ada_lastname": "Rose",
      "ada_username": "mary",
      "ada_type":     "user"
    },
    {
      "ada_uid":      "1846526764c8905435c74e2028286704",
      "ada_name":     "Employees (3 Users)",
      "ada_lastname": "",
      "ada_username": "Employees (3 Users)",
      "ada_type":     "group"
    }
  ]
}

PHP Example:
Get the list of users for a task and then randomly chose one of them to reassign a case to:

$processId = '3818779375772ec1f183320075303646';
$taskId = '6537449955772ec4b9705a4019286874';
$caseId = '276544696573f9457cd0983094962709';
$currentUserId = "41089101154de3b97536fc0077548396"; //user currently assigned to case

$url = "/api/1.0/workflow/project/$processId/activity/$taskId/adhoc-available-assignee/paged";
$oRet = pmRestRequest("GET", $url);
if (isset($oRet->status) and $oRet->status == 200) {
   $aUsers = array();
   //only copy users into the array:
   for ($i = 0; $i < count($oRet->response); $i++) {
      if ($oRet->response->data[$i]->ada_type == 'user')
         $aUsers[] = $oRet->response->data[$i]->ada_uid;
   }
   if (count($aUsers) == 0)
      throw new Exception("No users to assign to task");

   $randNo = rand(0, count($aUsers)-1);
   $url = "/api/1.0/workflow/cases/$caseId/reassign-case";
   $aParams = array(
      'usr_uid_source' => $currentUserId,
      'usr_uid_target' => $aUsers[$randNo]
   );
   $oRet = pmRestRequest("POST", $url, $aParams);
}

Get Available Ad hoc Assignees for Task: GET /project/{prj_uid}/activity/{act_uid}/adhoc-available-assignee

Get a list of the available users and groups who may be assigned on an ad hoc basis to a task.

GET /api/1.0/{workspace}/project/{prj_uid}/activity/{act_uid}/adhoc-available-assignee?filter={string}&start={number}&limit={number}

URL Parameters:

NameDescriptionExample
workspaceWorkspace name which is workflow by default. https://example.com/api/1.0/workflow/project/276544696573f9457cd0983094962709/activity/679814870573f92e6509f59003354333/available-assignee
prj_uidUnique ID of project (process) which can be found by looking at the @@PROCESS variable in the Debugger while running a case.https://example.com/api/1.0/workflow/project/276544696573f9457cd0983094962709/activity/679814870573f92e6509f59003354333/adhoc-available-assignee
act_uidUnique ID of the task which can be found by looking at the @@TASK variable in the Debugger while running a case.http://example.com/api/1.0/workflow/project/276544696573f9457cd0983094962709/activity/679814870573f92e6509f59003354333/adhoc-available-assignee
start={number}Optional. The initial position of the assignees in the list, where 0 is the first assignee, 1 is the second, etc.http://example.com/api/1.0/workflow/project/276544696573f9457cd0983094962709/activity/679814870573f92e6509f59003354333/adhoc-available-assignee?start=1&limit=10
limit={number}Optional. The maximum number of assignees returned.http://example.com/api/1.0/workflow/project/276544696573f9457cd0983094962709/activity/679814870573f92e6509f59003354333/adhoc-available-assignee?start=11&limit=10
filter={string}Optional. A search term to filter the list of assignees. It is a case-insensitive search inside the first name, last name and username of users and the names of groups. Make sure to URL encode the searched text in UTF-8, with a function like urlencode() in PHP or encodeURIComponent() in JavaScript, so that characters like " " (space) becomes %20 and "?" becomes %F3.http://example.com/api/1.0/workflow/project/276544696573f9457cd0983094962709/activity/679814870573f92e6509f59003354333/adhoc-available-assignee?filter=product%20manager

Result:

If successful, returns an HTTP status code of 200 and returns a JSON string containing an array of assignee objects, such as:

ElementDescription
[ Start array.
{ Start first assignee object.
"ada_uid": "8f30daa78a440ab308727ca33381a545",The unique ID of a user or group which is available to be assigned on an ad hoc basis.
"ada_name": "James",First name of a user or the name of a group with the number of users in parentheses.
"ada_lastname": "Johnson",Last name of a user. If a group, then "" (empty string).
"ada_username": "james",Username of a user or or the name of a group with the number of users in parentheses.
"aad_type": "user"Type of assignee, which can be "user" or "group".
} End first assignee object.
... Any additional assignee objects.
] End array.

Example:

Response

200 (OK)
Content-Type: application/json
[
  {
    "ada_uid":      "ae1e2034be750da53e48582cddc2ebc7",
    "ada_name":     "Robert",
    "ada_lastname": "Williams",
    "ada_username": "robert",
    "ada_type":     "user"
  },
  {
    "ada_uid":      "184131195492c7a04cba5f9056989964",
    "ada_name":     "Mary",
    "ada_lastname": "Rose",
    "ada_username": "mary",
    "ada_type":     "user"
  },
  {
    "ada_uid":      "1846526764c8905435c74e2028286704",
    "ada_name":     "Employees (2 Users)",
    "ada_lastname": "",
    "ada_username": "Employees (2 Users)",
    "ada_type":     "group"
  }
]

Get Page of Available Ad Hoc Assignees for Task: GET /project/{prj_uid}/activity/{act_uid}/adhoc-available-assignee/paged

Get a page of the available users and groups which may be assigned to a task on an ad hoc basis.

GET /api/1.0/{workspace}/project/{prj_uid}/activity/{act_uid}/adhoc-available-assignee/paged?filter={string}&start={number}&limit={number}

URL Parameters:

NameDescriptionExample
workspaceWorkspace name which is workflow by default. https://example.com/api/1.0/workflow/project/276544696573f9457cd0983094962709/activity/679814870573f92e6509f59003354333/adhoc-available-assignee/paged
prj_uidUnique ID of project (process) which can be found by looking at the @@PROCESS variable in the Debugger while running a case.https://example.com/api/1.0/workflow/project/276544696573f9457cd0983094962709/activity/679814870573f92e6509f59003354333/adhoc-available-assignee/paged
act_uidUnique ID of the task which can be found by looking at the @@TASK variable in the Debugger while running a case.http://example.com/api/1.0/workflow/project/276544696573f9457cd0983094962709/activity/679814870573f92e6509f59003354333/adhoc-available-assignee/paged
start={number}Optional. The initial position of the assignees in the list, where 0 is the first assignee, 1 is the second, etc.http://example.com/api/1.0/workflow/project/276544696573f9457cd0983094962709/activity/679814870573f92e6509f59003354333/adhoc-available-assignee/paged?start=1&limit=10
limit={number}Optional. The maximum number of assignees returned.http://example.com/api/1.0/workflow/project/276544696573f9457cd0983094962709/activity/679814870573f92e6509f59003354333/adhoc-available-assignee/paged?start=11&limit=10
filter={string}Optional. A search term to filter the list of assignees. It is a case-insensitive search inside the first name, last name and username of users and the names of groups. Make sure to URL encode the searched text in UTF-8, with a function like urlencode() in PHP or encodeURIComponent() in JavaScript, so that characters like " " (space) becomes %20 and "?" becomes %F3.http://example.com/api/1.0/workflow/project/276544696573f9457cd0983094962709/activity/679814870573f92e6509f59003354333/adhoc-available-assignee/paged?filter=product%20manager

Result:

If successful, returns an HTTP status code of 200 and returns a JSON string containing an array of assignee objects, such as:

ElementDescription
{ Start page object.
"total": 3, Total number of available ad hoc assignees to the task.
"start": 0, Index number of the first ad hoc assignee returned.
"limit": 0, The maximum number of ad hoc assignees which will be returned.
"filter": "",A search string which filters ad hoc assignees who are returned.
"data": [ An array of the available ad hoc assignees.
{ Start first assignee object.
"ada_uid": "8f30daa78a440ab308727ca33381a545",Unique ID of the ad hoc assignee (user or group)
"ada_name": "James",First name of a user or the name of a group with the number of members in parentheses.
"ada_lastname": "Johnson",User's last name. If a group, then "" (empty string).
"ada_username": "james",Username of a user or the name of a group with the number of members in parentheses.
"ada_type": "user"Type of assignee, which can be "user" or "group".
} End first assignee object.
... Any additional assignee objects.
] End array.
} End page object.

Note: If this endpoint is called for a subprocess, it will return all the users and groups in the workspace.

Example:

Response

200 (OK)
Content-Type: application/json
{
  "total":  3,
  "start":  0,
  "limit":  0,
  "filter": "",
  "data":   [
    {
      "ada_uid":      "8f30daa78a440ab308727ca33381a545",
      "ada_name":     "James",
      "ada_lastname": "Johnson",
      "ada_username": "james",
      "ada_type":     "user"
    },
    {
      "ada_uid":      "184131195492c7a04cba5f9056989964",
      "ada_name":     "Mary",
      "ada_lastname": "Rose",
      "ada_username": "mary",
      "ada_type":     "user"
    },
    {
      "ada_uid":      "1846526764c8905435c74e2028286704",
      "ada_name":     "Employees (3 Users)",
      "ada_lastname": "",
      "ada_username": "Employees (3 Users)",
      "ada_type":     "group"
    }
  ]
}

PHP Example:
Get the list of users for a task and then chose one of them at random to assign to the task on an ad hoc basis:

$processId = '3818779375772ec1f183320075303646';
$taskId = '6537449955772ec4b9705a4019286874';

$url = "/api/1.0/workflow/project/$processId/activity/$taskId/adhoc-available-assignee/paged";
$oRet = pmRestRequest("GET", $url);
if (isset($oRet->status) and $oRet->status == 200) {
   $aUsers = array();
   //only copy users into the array:
   for ($i = 0; $i < count($oRet->response); $i++) {
      if ($oRet->response->data[$i]->ada_type == 'user')
         $aUsers[] = $oRet->response->data[$i]->ada_uid;
   }
   if (count($aUsers) == 0)
      die("No users to assign to task");

   $randNo = rand(0, count($aUsers)-1);
   $url = "/api/1.0/workflow/project/$processId/activity/$taskId/adhoc-assignee";
   $aParams = array(
      'ada_uid' => $aUsers[$randNo],
      'ada_type'=> 'user'
   );
   $oRet = pmRestRequest("POST", $url, $aParams);
}

Get ad hoc Assignee to Task: GET /project/{prj_uid}/activity/{act_uid}/adhoc-assignee/{ada_uid}

Get a single ad hoc user or group assigned to a task.

GET /api/1.0/{workspace}/project/{prj_uid}/activity/{act_uid}/adhoc-assignee/{ada_uid}

URL Parameters:

NameDescriptionExample
workspaceWorkspace name, which is workflow by default. https://example.com/api/1.0/workflow/project/276544696573f9457cd0983094962709/activity/679814870573f92e6509f59003354333/adhoc-assignee/11609821854ca4355344560009542371
prj_uidUnique ID of project (process) which can be found by looking at the @@PROCESS variable in the Debugger while running a case.https://example.com/api/1.0/workflow/project/276544696573f9457cd0983094962709/activity/679814870573f92e6509f59003354333/adhoc-assignee/11609821854ca4355344560009542371
act_uidUnique ID of the task, which can be found by looking at the @@TASK variable in the Debugger while running a case.http://example.com/api/1.0/workflow/project/276544696573f9457cd0983094962709/activity/679814870573f92e6509f59003354333/adhoc-assignee/11609821854ca4355344560009542371
ass_uidUnique ID of the assignee (user or group).http://example.com/api/1.0/workflow/project/276544696573f9457cd0983094962709/activity/679814870573f92e6509f59003354333/adhoc-assignee/11609821854ca4355344560009542371

Result:

If successful, returns an HTTP status code of 200 and returns a JSON string containing an assignee object, such as:

ElementDescription
{ Start assignee object.
"ada_uid": "8f30daa78a440ab308727ca33381a545",Start array.
"ada_name": "James",First name of a user or the name of the group.
"ada_lastname": "Johnson",Assignee's last name. If a group, then "" (empty string).
"ada_username": "james",Assignee's username. If a group, then "" (empty string).
"ada_type": "user"Type of assignee, which can be "user" or "group".
} End assignee object.

Example:

Response

 200 (OK)
 Content-Type: application/json
 {
    "ada_uid": "4e2745a3fdbd977d1339862ae390ad13",
    "ada_name": "Mark",
    "ada_lastname": "Smith",
    "ada_username": "mark",
    "ada_type": "user"
 }

Get all ad hoc Users for Task: GET /project/{prj_uid}/activity/{act_uid}/adhoc-assignee/all

Get list of all the users assigned on an ad hoc basis to a task (including users that are within groups). Note that the endpoint will remove any duplicates, so users who are assigned multiple times will only be listed once.

GET /api/1.0/{workspace}/project/{prj_uid}/activity/{act_uid}/adhoc-assignee/all?filter=john&start=0&limit=50

URL Parameters:

NameDescriptionExample
workspaceWorkspace name which is workflow by default. https://example.com/api/1.0/workflow/project/276544696573f9457cd0983094962709/activity/679814870573f92e6509f59003354333/adhoc-assignee/all
prj_uidUnique ID of project (process) which can be found by looking at the @@PROCESS variable in the Debugger while running a case.https://example.com/api/1.0/workflow/project/276544696573f9457cd0983094962709/activity/679814870573f92e6509f59003354333/adhoc-assignee/all
act_uidUnique ID of the task which can be found by looking at the @@TASK variable in the Debugger while running a case.http://example.com/api/1.0/workflow/project/276544696573f9457cd0983094962709/activity/679814870573f92e6509f59003354333/adhoc-assignee/all
start={number}Optional. The initial position of the assignees in the list, where 0 is the first assignee, 1 is the second, etc.http://example.com/api/1.0/workflow/project/276544696573f9457cd0983094962709/activity/679814870573f92e6509f59003354333/adhoc-assignee/all?start=1&limit=10
limit={number}Optional. The maximum number of assignees returned.http://example.com/api/1.0/workflow/project/276544696573f9457cd0983094962709/activity/679814870573f92e6509f59003354333/adhoc-assignee/all?start=11&limit=10
filter={string}Optional. A search term to filter the list of assignees. It is a case-insensitive search inside the first name, last name and username of users and the names of groups. Make sure to URL encode the searched text in UTF-8, with a function like urlencode() in PHP or encodeURIComponent() in JavaScript, so that characters like " " (space) becomes %20 and "?" becomes %F3.http://example.com/api/1.0/workflow/project/276544696573f9457cd0983094962709/activity/679814870573f92e6509f59003354333/adhoc-assignee/all?filter=product%20manager

Result:

If successful, returns an HTTP status code of 200 and returns a JSON string containing an array of assignee objects, such as:

ElementDescription
[ Start array.
{ Start first assignee object.
"ada_uid": "8f30daa78a440ab308727ca33381a545",Unique ID of a user or group assigned to task on an ad hoc basis.
"ada_name": "James",First name of a user or the name of the group.
"ada_lastname": "Johnson",Assignee's last name. If a group, then "" (empty string).
"ada_username": "james",Assignee's username. If a group, then "" (empty string).
"ada_type": "user"Type of assignee, which can be "user" or "group".
} End first assignee object.
... Any additional assignee objects.
] End array.

Example:

Response

200 (OK)
Content-Type: application/json
[
  {
    "ada_uid": "4e2745a3fdbd977d1339862ae390ad13",
    "ada_name": "Mark",
    "ada_lastname": "Smith",
    "ada_username": "mark",
    "ada_type": "user"
  },
  {
    "ada_uid": "60108982451ae53bc5786b3013937849",
    "ada_name": "John",
    "ada_lastname": "Doe",
    "ada_username": "jdoe",
    "ada_type": "user"
  },
  {
    "ada_uid": "157493645523b4c00067b67020029802",
    "ada_name": "Managers (4 Users)",
    "ada_lastname": "",
    "ada_username": "Managers (4 Users)",
    "ada_type": "group"
  }
]

Ad hoc Assign to Task: POST /project/{prj_uid}/activity/{act_uid}/adhoc-assignee

Assign a user or group to a task on an ad hoc basis.

POST /api/1.0/{workspace}/project/{prj_uid}/activity/{act_uid}/adhoc-assignee

URL Parameters:

NameDescriptionExample
workspaceWorkspace name, which is workflow by default. https://example.com/api/1.0/workflow/project/276544696573f9457cd0983094962709/activity/679814870573f92e6509f59003354333/adhoc-assignee
prj_uidUnique ID of project (process) which can be found by looking at the @@PROCESS variable in the Debugger while running a case.https://example.com/api/1.0/workflow/project/276544696573f9457cd0983094962709/activity/679814870573f92e6509f59003354333/adhoc-assignee
act_uidUnique ID of the task, which can be found by looking at the @@TASK variable in the Debugger while running a case.http://example.com/api/1.0/workflow/project/276544696573f9457cd0983094962709/activity/679814870573f92e6509f59003354333/adhoc-assignee

POST Parameters:

ElementDescription
{
"ada_uid": "8f30daa78a440ab308727ca33381a545",The unique ID of the user or group to assign.
"ada_type": "user",Type of assignee, which can be "user" or "group".
"ada_name": "James",Optional. First name of a user or the name of the group.
"ada_lastname": "Johnson",Optional. Assignee's last name. If a group, then "" (empty string).
"ada_username": "james"Optional. Username of a user or the name of the group.
}

Result:

If successful, returns an HTTP status code of 201 (Created) and there is no response; otherwise, the status code is 400 and error object like the following is returned:

{
  "error": {
    "code":    400,
    "message": "Bad Request: This ID: 679814870573f92e6509f59003354333 is already assigned to task: 5296539325780572339ce51048356524"
  }
}

Example:

Request

Content-Type: application/json
{
  "ada_uid": "977d1339862ae390ad134e2745a3fdbd",
  "ada_type": "user"
}

Response

201 (Created)

PHP Example:

$processId = '3818779375772ec1f183320075303646';
$taskId = '6537449955772ec4b9705a4019286874';
$userId = '11609821854ca4355344560009542371';
$aParams = array(
   "ada_uid" => $userId,
   "ada_type"=> "user"
);
$url = "/api/1.0/workflow/project/$processId/activity/$taskId/adhoc-assignee";
$oRet = pmRestRequest("POST", $url, $aParams);
if (isset($oRet->status) and $oRet->status == 201) {
   print "User $userId assigned to task $taskId\n";
}

Remove ad hoc Assignee from Task: DELETE /project/{prj_uid}/activity/{act_uid}/adhoc-assignee/{ada_uid}

Remove an ad hoc assignee (user or group) from a task.

DELETE /api/1.0/{workspace}/project/{prj_uid}/activity/{act_uid}/adhoc-assignee/{ada_uid}

URL Parameters:

NameDescriptionExample
workspaceWorkspace name, which is workflow by default. https://example.com/api/1.0/workflow/project/276544696573f9457cd0983094962709/activity/679814870573f92e6509f59003354333/adhoc-assignee/11609821854ca4355344560009542371
prj_uidUnique ID of project (process) which can be found by looking at the @@PROCESS variable in the Debugger while running a case.https://example.com/api/1.0/workflow/project/276544696573f9457cd0983094962709/activity/679814870573f92e6509f59003354333/adhoc-assignee/11609821854ca4355344560009542371
act_uidUnique ID of the task, which can be found by looking at the @@TASK variable in the Debugger while running a case.http://example.com/api/1.0/workflow/project/276544696573f9457cd0983094962709/activity/679814870573f92e6509f59003354333/adhoc-assignee/11609821854ca4355344560009542371
ass_uidUnique ID of the ad hoc assignee (user or group).http://example.com/api/1.0/workflow/project/276544696573f9457cd0983094962709/activity/679814870573f92e6509f59003354333/adhoc-assignee/11609821854ca4355344560009542371

Result:

If successful, returns an HTTP status code of 200 (OK) and there is no response. If the user isn't assigned to the task, it returns:

{
  "error": {
    "code":    400,
    "message": "Bad Request: This row does not exist!"
  }
}

Example:

Response

200 (OK)

PHP Example:

$processId = '3818779375772ec1f183320075303646';
$taskId = '6537449955772ec4b9705a4019286874';
$userId = '11609821854ca4355344560009542371';

$url = "/api/1.0/workflow/project/$processId/activity/$taskId/adhoc-assignee/$userId";
$oRet = pmRestRequest("DELETE", $url);
if (isset($oRet->status) and $oRet->status == 200) {
   print "Ad hoc user $userId unassigned from task $taskId\n";
}

Step endpoints

A step is an action within a task, which can be a DynaForm, Input Document, Output Document or an External Step (which is created with a plugin). The following endpoints are available to manage steps in ProcessMaker:

  1. List steps assigned to a task
  2. List available steps to assign to a task
  3. Get a single step assigned to a task
  4. Assign a step to a activity
  5. Update a step assignment of an activity
  6. Unassigned a step from an activity
  7. List triggers assigned to a step
  8. List available triggers to assign to a step
  9. Get a single trigger assigned to a step
  10. Assign a trigger to a step
  11. Update a trigger assignment of a step
  12. Remove a trigger assignment of a step

    Step endpoints - Assign Task (A special case of a step that has no UID)

  13. List assigned triggers
  14. List available triggers to be assigned
  15. Get single triggers assigned
  16. Get single triggers
  17. Update a trigger assigned
  18. Remove an assigned trigger

Step resources:

Name Description Type Value
step_uidStep UIDString"9541049475298f190420f51086854718" (String of 32 characters)
step_type_objStep typeString"DYNAFORM" or "INPUT_DOCUMENT" or "OUTPUT_DOCUMENT" (unique values)
step_uid_objObject UIDString"9541049475298f190420f51086854718" (String of 32 characters)
step_conditionStep condition, it will only display if it accomplishes TRUEString"@@YEAR == 2013" (Alphanumeric string)
step_positionPosition that specifies the deployment step, it starts on 1Integer1,2,.....
step_modeDisplay mode of the stepString"EDIT", "VIEW" (unique values)
obj_titleObject titleString"Title…" (Alphanumeric string)
obj_descriptionDescription of the objectString“Description…” (Alphanumeric string)
obj_uidObject UIDString"9541049475298f190420f51086854718" (String of 32 characters)
obj_titleObject titleString"Title…" (alphanumeric string)
obj_descriptionObject descriptionString"Description…" (alphanumeric string)
obj_typeStep typeString"DYNAFORM" or "INPUT_DOCUMENT" or "OUTPUT_DOCUMENT" (unique values)
tri_uidTrigger UIDString"287964159526013c6c64bb1071946215" (String of 32 characters)
tri_titleTrigger titleString"Title…" (Alphanumeric string)
tri_descriptionTrigger descriptionString"Description…" (Alphanumeric string)
st_typeType of trigger executionString"BEFORE_ASSIGNMENT", "BEFORE_ROUTING", "AFTER_ROUTING" (unique values)
st_conditionTrigger condition, the trigger will only be executed if the condition accomplishes trueString"@@YEAR == 2013" (Alphanumeric string)
st_positionPosition that specifies the order of execution of the trigger, it starts on 1IntegerString
tri_typeTrigger typeString"SCRIPT" (unique value)
tri_webbotTrigger codeString"$a = 1;" (Trigger code)
tri_param String

Get Steps for Task: GET /project/{prj_uid}/activity/{act_uid}/steps

Get a list of the steps assigned to a task.

GET /api/1.0/{workspace}/project/{prj_uid}/activity/{act_uid}/steps

URL Parameters:

NameDescriptionExample
workspaceWorkspace namehttps://example.com/api/1.0/workflow/project/113406514573f91fdd453d7080353209/activity/748962028577d84795d55b3012565154/steps
prj_uidUnique ID of project (process) which can be obtained by examining the @@PROCESS system variable in the Debugger.https://example.com/api/1.0/workflow/project/113406514573f91fdd453d7080353209/activity/748962028577d84795d55b3012565154/steps
act_uidUnique ID of task, which can be obtained by examining the @@TASK system variable in the Debugger.https://example.com/api/1.0/workflow/project/113406514573f91fdd453d7080353209/activity/748962028577d84795d55b3012565154/steps

Result:

ElementDescription
[ An array of step objects.
{ First step object.
"step_uid": "800335382526013ee5406d6046561388",Unique ID of the step.
"step_type_obj": "DYNAFORM", Type of step, which can be "DYNAFORM", "INPUT_DOCUMENT", "OUTPUT_DOCUMENT" or "EXTERNAL" (a step created by a plugin).
"step_uid_obj": "480515388526013e03f5323091406324",Unique ID of the step's object, which can be a DynaForm, Input Document, Output Document or External Step.
"step_condition": "@@investigateClient == 'true'", A string containing the step's condition. If it evaluates to true, then the step will be executed.
"step_position": 1, The step position, where the first step in the task is 1, the second is 2, etc.
"step_mode": "EDIT", The mode which can be "EDIT" or "VIEW". The BPMN Process Designer does not have a graphical option to use "VIEW" mode.
"obj_title": "Background Check", The title of the step's object.
"obj_description":"Info about client's history", The description of the step's object.
"triggers": [ An array of triggers which are executed before or after the step.
{ First trigger object.
"tri_uid": "389005986576b14b28bac58020591119",The unique ID of the trigger.
"tri_title": "Lookup criminal history", The title of the trigger.
"tri_description":"Database searches on client", The description of the trigger.
"st_type": "BEFORE", The type of execution, which is "BEFORE" if executed before the step or "AFTER" if executed after the step.
"st_condition":"@@criminalHistory == 'yes'", A string containing the trigger's condition. If it evaluates to true, then the trigger will be executed.
"st_position": 1 The trigger's position, which is 1 for the first trigger, 2 for the second trigger, etc. There is separate counting for "BEFORE" and "AFTER" triggers.
}, End first trigger object.
... Any additional trigger objects.
] End array of trigger objects.
}, End first step object.
... Any additional step objects.
] End array of step objects.

Example:

Response

200 (OK)
Content-Type: application/json
[
  {
    "step_uid":        "800335382526013ee5406d6046561388",
    "step_type_obj":   "DYNAFORM",
    "step_uid_obj":    "480515388526013e03f5323091406324",
    "step_condition":  "@@investigateClient_label == 'true'",
    "step_position":   1,
    "step_mode":       "EDIT",
    "obj_title":       "Background Check",
    "obj_description": "Enter info to check client's history",
    "triggers":        [
      {
        "tri_uid":         "389005986576b14b28bac58020591119",
        "tri_title":       "Lookup criminal history",
        "tri_description": "Database searches for client's history",
        "st_type":         "BEFORE",
        "st_condition":    "@@criminalHistory == 'yes'",
        "st_position":     1
      },
      {
        "tri_uid":         "604830947578697355a2fc5053242432",
        "tri_title":       "Get User Info",
        "tri_description": "Get user's first and last names",
        "st_type":         "BEFORE",
        "st_condition":    "",
        "st_position":     2
      }
    ]
  },
  {
    "step_uid":        "9541049475298f190420f51086854718",
    "step_type_obj":   "INPUT_DOCUMENT",
    "step_uid_obj":    "71338434552669fb805d633062769307",
    "step_condition":  "",
    "step_position":   2,
    "step_mode":       "EDIT",
    "obj_title":       "History Files",
    "obj_description": "Upload any files about client's history",
    "triggers":        []
  },
  {
    "step_uid":        "79726484157869604c00b67078098592",
    "step_type_obj":   "OUTPUT_DOCUMENT",
    "step_uid_obj":    "71338434552669fb805d633062769307",
    "step_condition":  "",
    "step_position":   3,
    "step_mode":       "EDIT",
    "obj_title":       "Printout of Client's History",
    "obj_description": "",
    "triggers":        []
  }
]

PHP Example:

Find the unique ID of the step which holds the "Criminal history" DynaForm.

$formTitle = 'Criminal history';
$processId = '113406514573f91fdd453d7080353209';
$taskId =    '6537449955772ec4b9705a4019286874';
$url = "/api/1.0/workflow/project/$processId/activity/$taskId/steps";
$oRet = pmRestRequest("GET", $url);

if (isset($oRet->status) and $oRet->status == 200) {
   $stepId = '';
   //search for the ID of the step:
   foreach ($oRet->response as $oStep) {
      if ($oStep->obj_title == $formTitle) {
         $stepId = $oStep->step_uid;
         break;
      }
   }

   if (empty($stepId)) {
      throw new Exception("DynaForm '$formTitle' is not assigned as a step.");
   }
}

Get Available Steps for Task: GET /project/{prj_uid}/activity/{act_uid}/available-steps

Get list of available steps which may be assigned to a task.

GET /api/1.0/{workspace}/project/{prj_uid}/activity/{act_uid}/available-steps

URL Parameters:

NameDescriptionExample
workspaceWorkspace namehttps://example.com/api/1.0/workflow/project/113406514573f91fdd453d7080353209/activity/748962028577d84795d55b3012565154/steps
prj_uidUnique ID of project (process) which can be obtained by examining the @@PROCESS system variable in the Debugger.https://example.com/api/1.0/workflow/project/113406514573f91fdd453d7080353209/activity/748962028577d84795d55b3012565154/steps
act_uidUnique ID of task, which can be obtained by examining the @@TASK system variable in the Debugger.https://example.com/api/1.0/workflow/project/113406514573f91fdd453d7080353209/activity/748962028577d84795d55b3012565154/steps

Result:

ElementDescription
[ An array of available objects.
{ First object.
"obj_uid": "800335382526013ee5406d6046561388",Unique ID of the object.
"obj_title": "Background Check", The title of the object.
"obj_description":"Info about client's history", The description of the object.
"obj_type": "DYNAFORM" The type of object, which can be "DYNAFORM", "INPUT_DOCUMENT", "OUTPUT_DOCUMENT" or "EXTERNAL" (a custom step created by a plugin).
}, End first object.
... Any additional objects.
] End array of available objects.

Example:

Response

200 (OK)
Content-Type: application/json
[
  {
    "obj_uid":         "2074240775261579834c597006169172",
    "obj_title":       "Background Check",
    "obj_description": "Info about client's history",
    "obj_type":        "DYNAFORM"
  },
  {
    "obj_uid":         "86369594352602caa32c5c3004407686",
    "obj_title":       "Printout of Client's History",
    "obj_description": "outputdoc1 description",
    "obj_type":        "OUTPUT_DOCUMENT"
  }
]

PHP Example:

Search for an available Input Document which has the title "History Files", and assign it as a step in the task:

$inpDocTitle = "History Files";
$processId = '113406514573f91fdd453d7080353209';
$taskId =    '6537449955772ec4b9705a4019286874';
$url = "/api/1.0/workflow/project/$processId/activity/$taskId/available-steps";
$oRet = pmRestRequest("GET", $url);

if (isset($oRet->status) and $oRet->status == 200) {
   //search for the ID of the step:
   foreach ($oRet->response as $oStep) {
      if ($oStep->obj_title == $inpDocTitle) {
         $aParams = array(
            "step_type_obj" => $oStep->obj_type,
            "step_uid_obj"  => $oStep->obj_uid,
            "step_condition"=> '',
            "step_position" => 1,
            "step_mode"     => 'EDIT'
         );
         $url = "/api/1.0/workflow/project/$processId/activity/$taskId/step";
         $oRet = pmRestRequest("POST", $url, $aParams);
      }
   }
}

Get Step for Activity: GET /project/{prj_uid}/activity/{act_uid}/step/{step_uid}

Get a single step assigned to an activity.

GET /api/1.0/{workspace}/project/{prj_uid}/activity/{act_uid}/step/{step_uid}

URL Parameters:

NameDescriptionExample
workspaceWorkspace namehttps://example.com/api/1.0/workflow/project/113406514573f91fdd453d7080353209/activity/748962028577d84795d55b3012565154/step/28191616657869600330ad8022614695
prj_uidUnique ID of project (process) which can be obtained by examining the @@PROCESS system variable in the Debugger.https://example.com/api/1.0/workflow/project/113406514573f91fdd453d7080353209/activity/748962028577d84795d55b3012565154/step/28191616657869600330ad8022614695
act_uidUnique ID of task, which can be obtained by examining the @@TASK system variable in the Debugger.https://example.com/api/1.0/workflow/project/113406514573f91fdd453d7080353209/activity/748962028577d84795d55b3012565154/step/28191616657869600330ad8022614695
step_uidUnique ID of step.https://example.com/api/1.0/workflow/project/113406514573f91fdd453d7080353209/activity/748962028577d84795d55b3012565154/step/28191616657869600330ad8022614695

Result:

ElementDescription
{ Step object.
"step_uid": "800335382526013ee5406d6046561388",Unique ID of the step.
"step_type_obj": "DYNAFORM", Type of step, which can be "DYNAFORM", "INPUT_DOCUMENT", "OUTPUT_DOCUMENT" or "EXTERNAL" (a step created by a plugin).
"step_uid_obj": "480515388526013e03f5323091406324",Unique ID of the step's object, which can be a DynaForm, Input Document, Output Document or External Step.
"step_condition": "@@investigateClient == 'true'", A string containing the step's condition. If it evaluates to true, then the step will be executed.
"step_position": 1, The step position, where the first step in the task is 1, the second is 2, etc.
"step_mode": "EDIT", The mode which can be "EDIT" or "VIEW". The BPMN Process Designer does not have a graphical option to use "VIEW" mode.
"obj_title": "Background Check", The title of the step's object.
"obj_description":"Info about client's history" The description of the step's object.
} End step object.

Example:

Response

200 (OK)
Content-Type: application/json
{
   "step_uid":       "800335382526013ee5406d6046561388",
   "step_type_obj":  "DYNAFORM",
   "step_uid_obj":   "480515388526013e03f5323091406324",
   "step_condition": "@%decision == 1",
   "step_position":  1,
   "step_mode":      "EDIT",
   "obj_title":      "Invoice Details",
   "obj_description":"Enter invoice information"
}

Assign Step to Task: POST /project/{prj_uid}/activity/{act_uid}/step

Assign a step to a task.

POST /api/1.0/{workspace}/project/{prj_uid}/activity/{act_uid}/step

URL Parameters:

NameDescriptionExample
workspaceWorkspace namehttps://example.com/api/1.0/workflow/project/113406514573f91fdd453d7080353209/activity/748962028577d84795d55b3012565154/step
prj_uidUnique ID of project (process) which can be obtained by examining the @@PROCESS system variable in the Debugger.https://example.com/api/1.0/workflow/project/113406514573f91fdd453d7080353209/activity/748962028577d84795d55b3012565154/step
act_uidUnique ID of task, which can be obtained by examining the @@TASK system variable in the Debugger.https://example.com/api/1.0/workflow/project/113406514573f91fdd453d7080353209/activity/748962028577d84795d55b3012565154/step

POST Parameters:

Example parameterDescription
{
"step_type_obj": "DYNAFORM", Type of step, which can be "DYNAFORM", "INPUT_DOCUMENT", "OUTPUT_DOCUMENT" or "EXTERNAL" (a step created by a plugin).
"step_uid_obj": "480515388526013e03f5323091406324",Unique ID of the step's object, which can be a DynaForm, Input Document, Output Document or External Step.
"step_mode": "EDIT", For classic processes imported or upgraded from ProcessMaker 2, the mode can be "EDIT" or "VIEW" for DynaForms, "ATTACH" or "VIEW" for Input Documents, and "EDIT" for Output Documents. For BPMN processes, the mode is not used and should always be set to "EDIT".
"step_condition": "@@investigateClient == 'true'", Optional. A string containing a PHP condition, which can contain case and system variables. If it evaluates to true, then the step will be executed. If it evaluates to false, then it won't be executed. If the expression consists of a single value, remember that in PHP a non-zero number and a non-empty string are considered true.
"step_position": 1, Optional. The step position, where the first step in the task is 1, the second is 2, etc. If an object is already in that position, then it will be displaced downward in the step order. If not included, then the object will be placed as the last step in the task.
}

Result:

If successful, the HTTP status code is set to 201 (Created) and an object is returned with information about the new step.

Example:

Request

Content-Type: application/json
{
  "step_type_obj":  "DYNAFORM",
  "step_uid_obj":   "761754168526157a5878337086391024",
  "step_mode":      "EDIT"
}

Response

201 (Created)
Content-Type: application/json
{
  "step_uid":       "31837094552a22139832435036743289",
  "step_type_obj":  "DYNAFORM",
  "step_uid_obj":   "761754168526157a5878337086391024",
  "step_mode":      "EDIT",
  "step_position":  2
}

PHP Example:

Assign a DynaForm as the last step in the task:

$processId = '113406514573f91fdd453d7080353209';
$taskId =    '6537449955772ec4b9705a4019286874';
$formId =    '761754168526157a5878337086391024';
$aParams = array(
   "step_type_obj" => 'DYNAFORM',
   "step_uid_obj"  => $formId,
   "step_mode"     => 'EDIT'
);
$url = "/api/1.0/workflow/project/$processId/activity/$taskId/step";
$oRet = pmRestRequest("POST", $url, $aParams);

if (isset($oRet->status) and $oRet->status == 201) {
   $stepId = $oRet->response->step_uid;
   $stepPosition = $oRet->response->step_position;
}

Update Step for Activity: PUT /project/{prj_uid}/activity/{act_uid}/step/{step_uid}

Update the assignment of a step to an activity.

PUT /api/1.0/{workspace}/project/{prj_uid}/activity/{act_uid}/step/{step_uid}

URL Parameters:

NameDescriptionExample
workspaceWorkspace namehttps://example.com/api/1.0/workflow/project/113406514573f91fdd453d7080353209/activity/748962028577d84795d55b3012565154/step/28191616657869600330ad8022614695
prj_uidUnique ID of project (process) which can be obtained by examining the @@PROCESS system variable in the Debugger.https://example.com/api/1.0/workflow/project/113406514573f91fdd453d7080353209/activity/748962028577d84795d55b3012565154/step/28191616657869600330ad8022614695
act_uidUnique ID of task, which can be obtained by examining the @@TASK system variable in the Debugger.https://example.com/api/1.0/workflow/project/113406514573f91fdd453d7080353209/activity/748962028577d84795d55b3012565154/step/28191616657869600330ad8022614695
step_uidUnique ID of step.https://example.com/api/1.0/workflow/project/113406514573f91fdd453d7080353209/activity/748962028577d84795d55b3012565154/step/28191616657869600330ad8022614695

PUT Parameters:

ParameterDescription
{
"step_type_obj": "DYNAFORM", Optional. Type of step, which can be "DYNAFORM", "INPUT_DOCUMENT", "OUTPUT_DOCUMENT" or "EXTERNAL" (a step created by a plugin). Note that the step_type_obj must be included if changing the step_uid_obj.
"step_uid_obj": "480515388526013e03f5323091406324",Optional. Unique ID of the step's object, which can be a DynaForm, Input Document, Output Document or External Step.
"step_mode": "EDIT", Optional. For classic processes imported or upgraded from ProcessMaker 2, the mode can be "EDIT" or "VIEW" for DynaForms, "ATTACH" or "VIEW" for Input Documents, and "EDIT" for Output Documents. For BPMN processes, the mode is not used and should always be set to "EDIT".
"step_condition": "@@investigateClient == 'true'", Optional. A string containing a PHP condition, which can contain case and system variables. If it evaluates to true, then the step will be executed. If it evaluates to false, then it won't be executed. If the expression consists of a single value, remember that in PHP a non-zero number and a non-empty string are considered true.
"step_position": 1, Optional. The step position, where the first step in the task is 1, the second is 2, etc. If an object is already in that position, then it will be displaced downward in the step order. If not included, then the object will be placed as the last step in the task.
}

Result:

If successful, the HTTP status code is set to 200 (OK) and there is no return object. If an error occurs, the HTTP status code is 400 and an object like the following is returned:
{
  "error": {
    "code": 400,
    "message": "Bad Request: The Input Document with step_uid_obj: 969593549576b120e0c11b2046307156 does not exist."
  }
}

Example:

Request

Content-Type: application/json
{
  "step_type_obj":  "DYNAFORM",
  "step_uid_obj":   "761754168526157a5878337086391024",
  "step_condition": "",
  "step_position":  1,
  "step_mode":      "EDIT"
}

Response

200 (OK)

PHP Example:

Move a step to the beginning of a task and add a condition to the task:

$processId = '113406514573f91fdd453d7080353209';
$taskId =    '6537449955772ec4b9705a4019286874';
$stepId =    '761754168526157a5878337086391024';
$aParams = array (
   "step_position"  => 1,
   "step_condition" => "@@decision == 'redo' or @@decision == 'proceed'"
);
$url = "/api/1.0/workflow/project/$processId/activity/$taskId/step";
$oRet = pmRestRequest("POST", $url, $aParams);

if (isset($oRet->status) and $oRet->status == 200) {
   print "Step order changed.\n";
}

Unassign Step from Task: DELETE /project/{prj_uid}/activity/{act_uid}/step/{step_uid}

Unassign a step from a task.

DELETE /api/1.0/{workspace}/project/{prj_uid}/activity/{act_uid}/step/{step_uid}

URL Parameters:

NameDescriptionExample
workspaceWorkspace namehttps://example.com/api/1.0/workflow/project/113406514573f91fdd453d7080353209/activity/748962028577d84795d55b3012565154/step/28191616657869600330ad8022614695
prj_uidUnique ID of project (process) which can be obtained by examining the @@PROCESS system variable in the Debugger.https://example.com/api/1.0/workflow/project/113406514573f91fdd453d7080353209/activity/748962028577d84795d55b3012565154/step/28191616657869600330ad8022614695
act_uidUnique ID of task, which can be obtained by examining the @@TASK system variable in the Debugger.https://example.com/api/1.0/workflow/project/113406514573f91fdd453d7080353209/activity/748962028577d84795d55b3012565154/step/28191616657869600330ad8022614695
step_uidUnique ID of step.https://example.com/api/1.0/workflow/project/113406514573f91fdd453d7080353209/activity/748962028577d84795d55b3012565154/step/28191616657869600330ad8022614695

Result:

If successful, then the HTTP status code is set to 200 (OK) and there is no return object. If an error occurs, the HTTP status code is set to 400 and an error object like the following is returned:
{
  "error": {
    "code":    400,
    "message": "Bad Request: The step with step_uid: 569912885578808e99e0091037758050 does not exist."
  }
}

Example:

Response

200 (OK)

PHP Example:

Assign a DynaForm as the last step in the task:

$processId = '113406514573f91fdd453d7080353209';
$taskId =    '6537449955772ec4b9705a4019286874';
$stepId =    '761754168526157a5878337086391024';

$url = "/api/1.0/workflow/project/$processId/activity/$taskId/step";
$oRet = pmRestRequest("DELETE", $url);

if (isset($oRet->status) and $oRet->status == 200) {
   print "Step unassigned from task.\n";
}

Get Triggers for Step: GET /project/{prj_uid}/activity/{act_uid}/step/{step_uid}/triggers

Get list of triggers assigned to execute before and after a Step.

GET /api/1.0/{workspace}/project/{prj_uid}/activity/{act_uid}/step/{step_uid}/triggers

URL Parameters:

NameDescriptionExample
workspaceWorkspace namehttps://example.com/api/1.0/workflow/project/113406514573f91fdd453d7080353209/activity/748962028577d84795d55b3012565154/step/28191616657869600330ad8022614695/triggers
prj_uidUnique ID of project (process) which can be obtained by examining the @@PROCESS system variable in the Debugger.https://example.com/api/1.0/workflow/project/113406514573f91fdd453d7080353209/activity/748962028577d84795d55b3012565154/step/28191616657869600330ad8022614695/triggers
act_uidUnique ID of task, which can be obtained by examining the @@TASK system variable in the Debugger.https://example.com/api/1.0/workflow/project/113406514573f91fdd453d7080353209/activity/748962028577d84795d55b3012565154/step/28191616657869600330ad8022614695/triggers
step_uidUnique ID of step.https://example.com/api/1.0/workflow/project/113406514573f91fdd453d7080353209/activity/748962028577d84795d55b3012565154/step/28191616657869600330ad8022614695/triggers

Result:

If successful, then the HTTP status code is set to 200 (OK) and an array of trigger objects is returned with the following structure:

ElementDescription
[ An array of triggers objects.
{ First trigger object.
"tri_uid": "389005986576b14b28bac58020591119",The unique ID of the trigger.
"tri_title": "Lookup criminal history", The title of the trigger.
"tri_description":"Database searches on client", The description of the trigger.
"st_type": "BEFORE", The type of execution, which is "BEFORE" if executed before the step or "AFTER" if executed after the step.
"st_condition": "@@criminalHistory == 'yes'", A string containing the trigger's condition. If it evaluates to true, then the trigger will be executed.
"st_position": 1 The trigger's position, which is 1 for the first trigger, 2 for the second trigger, etc. There is separate counting for "BEFORE" and "AFTER" triggers.
}, End first trigger object.
... Any additional trigger objects.
] End array of trigger objects.

Example:

Response

200 (OK)
Content-Type: application/json
[
  {
    "tri_uid":         "19856489857895a61303773072293247",
    "tri_title":       "Abort case if existing investigation",
    "tri_description": "",
    "st_type":         "BEFORE",
    "st_condition":    "@@pendingInvestigation == 'yes'",
    "st_position":     1
  },
  {
    "tri_uid":         "57585726657895a339dee40040903466",
    "tri_title":       "Get process information",
    "tri_description": "",
    "st_type":         "BEFORE",
    "st_condition":    ""
    "st_position":     2
  },
  {
    "tri_uid":         "604830947578697355a2fc5053242432",
    "tri_title":       "Get User Info",
    "tri_description": "Get user's first and last names",
    "st_type":         "AFTER",
    "st_condition":    "",
    "st_position":     1
  },
  {
    "tri_uid":         "389005986576b14b28bac58020591119",
    "tri_title":       "show history"
    "tri_description": "",
    "st_type":         "AFTER",
    "st_condition":    "",
    "st_position":     2
  }
]

PHP Example:

Check whether a trigger titled "Get process information" is assigned to the task:

$triggerTitle = "Get process information";
$processId = '113406514573f91fdd453d7080353209';
$taskId = '294620094573f92543c7d99010162468';
$stepId = '416553979576b12e1d6a4f7063384631';

$url = "/api/1.0/workflow/project/$processId/activity/$taskId/step/$stepId/triggers";
$oRet = pmRestRequest("GET", $url);

if (isset($oRet->status) and $oRet->status == 200) {
   $TriggerFount = false;
   //search for the ID of the trigger:
   foreach ($oRet->response as $oTrigger) {
      if ($oTrigger->tri_title == $triggerTitle) {
         $triggerFound = true;
      }
   }
}

Get Available Triggers for Step: GET /project/{prj_uid}/activity/{act_uid}/step/{step_uid}/available-triggers/{type}

Get list of available triggers to assign to a Step.

GET /api/1.0/{workspace}/project/{prj_uid}/activity/{act_uid}/step/{step_uid}/available-triggers/{type}

URL Parameters:

NameDescriptionExample
workspaceWorkspace namehttps://example.com/api/1.0/workflow/project/113406514573f91fdd453d7080353209/activity/748962028577d84795d55b3012565154/step/28191616657869600330ad8022614695/available-triggers/before
prj_uidUnique ID of project (process) which can be obtained by examining the @@PROCESS system variable in the Debugger.https://example.com/api/1.0/workflow/project/113406514573f91fdd453d7080353209/activity/748962028577d84795d55b3012565154/step/28191616657869600330ad8022614695/available-triggers/before
act_uidUnique ID of task, which can be obtained by examining the @@TASK system variable in the Debugger.https://example.com/api/1.0/workflow/project/113406514573f91fdd453d7080353209/activity/748962028577d84795d55b3012565154/step/28191616657869600330ad8022614695/available-triggers/before
step_uidUnique ID of step.https://example.com/api/1.0/workflow/project/113406514573f91fdd453d7080353209/activity/748962028577d84795d55b3012565154/step/28191616657869600330ad8022614695/available-triggers/before
step_uidUnique ID of step.https://example.com/api/1.0/workflow/project/113406514573f91fdd453d7080353209/activity/748962028577d84795d55b3012565154/step/28191616657869600330ad8022614695/available-triggers/before
typeWhen the trigger is executed, which can be either "before" or "after" the step.https://example.com/api/1.0/workflow/project/113406514573f91fdd453d7080353209/activity/748962028577d84795d55b3012565154/step/28191616657869600330ad8022614695/available-triggers/before

Result:

ElementDescription
[Start array of trigger objects.
{First trigger object.
"tri_uid": "550289117529f8ba2705074055790637",Unique ID of the trigger.
"tri_title": "Get user's email",Title of the trigger.
"tri_description": "",Description of the trigger.
"tri_type": "SCRIPT",The type is always "SCRIPT".
"tri_webbot": "@@email = userInfo(@@USER_LOGGED)['mail'];",PHP code of the trigger.
"tri_param": ""A serialized array of parameters for the trigger's function if it was created with the trigger wizard. If a custom trigger, then set to "" (an empty string).
},End first trigger object.
...Any additional trigger objects.
]End array.

Example:

Response

200 (OK)
Content-Type: application/json
[
  {
    "tri_uid":         "550289117529f8ba2705074055790637",
    "tri_title":       "Get user's email",
    "tri_description": "",
    "tri_type":        "SCRIPT",
    "tri_webbot":      "@@email = userInfo(@@USER_LOGGED)['mail'];",
    "tri_param":       ""
  },
  {
    "tri_uid":         "451169569578965bd2a5513008268885",
    "tri_title":       "Email Manager",
    "tri_description": "Send email to the user's supervisor about the delayed case",
    "tri_type":        "SCRIPT",
    "tri_webbot":      "/*******************************************************\n *\n * Generated by ProcessMaker Trigger Wizard\n * Library: ProcessMaker Functions\n * Method: PMF Send Message\n* Date: 2016-07-15 18:37:49\n *\n * ProcessMaker 2016\n ********************************************************/\n\n@@msgReturn = PMFSendMessage(@@APPLICATION, @@userEmail, @@supervisorEmail, "", "", "Delayed case #" . @@APP_NUMBER, "\"lateCaseInfo.html\"", array(''), array(''), true, 0, "");",
    "
tri_param": "a:2:{s:4:"hash";s:32:"59ee25a760bc8544589dd33834faa352";s:6:"params";a:29:{s:7:"TRI_UID";s:32:"451169569578965bd2a5513008268885";s:9:"TRI_TITLE";s:13:"Email Manager";s:15:"TRI_DESCRIPTION";s:58:"Send email to the user's supervisor about the delayed case";s:8:"TRI_TYPE";s:6:"SCRIPT";s:7:"PRO_UID";s:32:"113406514573f91fdd453d7080353209";s:6:"caseId";s:13:"@@APPLICATION";s:5:"sFrom";s:11:"@@userEmail";s:3:"sTo";s:17:"@@supervisorEmail";s:3:"sCc";s:0:"";s:4:"sBcc";s:0:"";s:8:"sSubject";s:31:""Delayed case #" . @@APP_NUMBER";s:9:"sTemplate";s:19:""lateCaseInfo.html"";s:7:"aFields";s:9:"array('')";s:11:"aAttachment";s:9:"array('')";s:11:"showMessage";s:0:"";s:8:"delIndex";s:0:"";s:6:"config";s:0:"";s:10:"TRI_ANSWER";s:11:"@@msgReturn";s:10:"TRI_WEBBOT";s:459:"/*******************************************************\n *\n * Generated by ProcessMaker Trigger Wizard\n * Library: ProcessMaker Functions\n * Method: PMF Send Message\n * Date: 2016-07-15 18:37:49\n *\n * ProcessMaker 2016\n *\n *******************************************************/\n\n@@msgReturn = PMFSendMessage(@@APPLICATION, @@userEmail, @@supervisorEmail, "", "", "Delayed case #" . @@APP_NUMBER, "\"lateCaseInfo.html\"", array(''), array(''), true, 0, "");";s:25:"__notValidateThisFields__";s:0:"";s:22:"DynaformRequiredFields";s:2:"[]";s:14:"PAGED_TABLE_ID";s:0:"";s:12:"LIBRARY_NAME";s:22:"ProcessMaker Functions";s:13:"LIBRARY_CLASS";s:21:"class.pmFunctions.php";s:14:"PMFUNTION_NAME";s:14:"PMFSendMessage";s:15:"PMFUNTION_LABEL";s:16:"PMF Send Message";s:11:"ALLFUNCTION";s:104:"$caseId,$sFrom,$sTo,$sCc,$sBcc,$sSubject,$sTemplate,$aFields,$aAttachment,$showMessage,$delIndex,$config";s:16:"ALLFUNCTION_TYPE";s:79:"string,string,string,string,string,string,string,array,array,boolean,int,string";s:15:"FIELDS_REQUIRED";s:46:"caseId,sFrom,sTo,sSubject,sTemplate,TRI_ANSWER";}}"
  }
]

PHP example:

This example retrieves the list of available triggers for a step, and then searches for the one whose title is "Email Manager" and assigns it to execute before the step.

$processId = '113406514573f91fdd453d7080353209';
$taskId    = '294620094573f92543c7d99010162468';
$stepId    = '416553979576b12e1d6a4f7063384631';
$url = "/api/1.0/workflow/project/$processId/activity/$taskId/step/$stepId/available-triggers/before";

$oRet = pmRestRequest("GET", $url, $aParams, $oToken->access_token);

if (isset($oRet->status) and $oRet->status == 200) {
   //search for the trigger named "Email Manager" and assign it to the task.
   $triggerId = '';
   foreach ($oRet->response as $aTrigger) {
      if ($aTrigger->tri_title == "Email Manager") {
         $triggerId = $aTrigger->tri_uid;
         break;
      }
   }

   if ($triggerId) {
      $url = "/api/1.0/workflow/project/$processId/activity/$taskId/step/$stepId/trigger";
      $aParams = array(
        "tri_uid"      => $triggerId,
         "st_type"      => "BEFORE",
         "st_condition" => "",
         "st_position"  => 1
     );
      $oRet = pmRestRequest("POST", $url, $aParams, $oToken->access_token);
   }
}

Get Trigger for Step: GET /project/{prj_uid}/activity/{act_uid}/step/{step_uid}/trigger/{tri_uid}/{type}

Get information about a single trigger assigned to a step.

GET /api/1.0/{workspace}/project/{prj_uid}/activity/{act_uid}/step/{step_uid}/trigger/{tri_uid}/{type}

URL Parameters:

NameDescriptionExample
workspaceWorkspace namehttps://example.com/api/1.0/workflow/project/113406514573f91fdd453d7080353209/activity/748962028577d84795d55b3012565154/step/28191616657869600330ad8022614695/trigger/451169569578965bd2a5513008268885/before
prj_uidUnique ID of the project (process) which can be obtained by examining the @@PROCESS system variable in the Debugger.https://example.com/api/1.0/workflow/project/113406514573f91fdd453d7080353209/activity/748962028577d84795d55b3012565154/step/28191616657869600330ad8022614695/trigger/451169569578965bd2a5513008268885/before
act_uidUnique ID of the task, which can be obtained by examining the @@TASK system variable in the Debugger.https://example.com/api/1.0/workflow/project/113406514573f91fdd453d7080353209/activity/748962028577d84795d55b3012565154/step/28191616657869600330ad8022614695/trigger/451169569578965bd2a5513008268885/before
step_uidUnique ID of step.https://example.com/api/1.0/workflow/project/113406514573f91fdd453d7080353209/activity/748962028577d84795d55b3012565154/step/28191616657869600330ad8022614695/trigger/451169569578965bd2a5513008268885/before
tri_uidUnique ID of the trigger.https://example.com/api/1.0/workflow/project/113406514573f91fdd453d7080353209/activity/748962028577d84795d55b3012565154/step/28191616657869600330ad8022614695/trigger/451169569578965bd2a5513008268885/before
typeWhen the trigger is executed, which can be either before or after the step.https://example.com/api/1.0/workflow/project/113406514573f91fdd453d7080353209/activity/748962028577d84795d55b3012565154/step/28191616657869600330ad8022614695/trigger/451169569578965bd2a5513008268885/before

Result:

ElementDescription
{Start trigger object
"tri_uid": "550289117529f8ba2705074055790637",Unique ID of the trigger.
"tri_title": "Get user's email",Title of the trigger.
"tri_description": "",Description of the trigger.
"st_type": "BEFORE",Indicates whether the trigger is executed "BEFORE" or "AFTER" the step.
"st_condition": "@#amount > 500",A condition in PHP code which can contain case variables. If it evaluates to true, then the trigger will be executed; otherwise, it won't be executed if it evaluates to false.
"st_position": 2The execution order of the trigger, where the first trigger to execute is 1, the second is 2, etc. There is separate counting for "BEFORE" and "AFTER" triggers.
}End trigger object.

Example:

Response

200 (OK)
Content-Type: application/json
{
  "tri_uid":         "287964159526013c6c64bb1071946215",
  "tri_title":       "Notify Clients",
  "tri_description": "Send email to all clients with contracts",
  "st_type":         "BEFORE",
  "st_condition":    "",
  "st_position":     1
}

PHP example:

$processId = '113406514573f91fdd453d7080353209';
$taskId    = '294620094573f92543c7d99010162468';
$stepId    = '416553979576b12e1d6a4f7063384631';
$triggerId = '451169569578965bd2a5513008268885';
$type      = 'before';
$url = "/api/1.0/workflow/project/$processId/activity/$taskId/step/$stepId/trigger/$triggerId/$type";

$oRet = pmRestRequest("GET", $url);

if (isset($oRet->status) and $oRet->status == 200) {
   $position = $oRet->response->st_position;
}

Assign Trigger to Step: POST /project/{prj_uid}/activity/{act_uid}/step/{step_uid}/trigger

Assign a trigger to a Step.

POST /api/1.0/{workspace}/project/{prj_uid}/activity/{act_uid}/step/{step_uid}/trigger

URL parameters:

NameDescriptionExample
workspaceWorkspace name/api/1.0/workflow/project/113406514573f91fdd453d7080353209/activity/748962028577d84795d55b3012565154/step/28191616657869600330ad8022614695/trigger
prj_uidUnique ID of the project (process) which can be obtained by examining the @@PROCESS system variable in the Debugger./api/1.0/workflow/project/113406514573f91fdd453d7080353209/activity/748962028577d84795d55b3012565154/step/28191616657869600330ad8022614695/trigger
act_uidUnique ID of the task, which can be obtained by examining the @@TASK system variable in the Debugger./api/1.0/workflow/project/113406514573f91fdd453d7080353209/activity/748962028577d84795d55b3012565154/step/28191616657869600330ad8022614695/trigger
step_uidUnique ID of step./api/1.0/workflow/project/113406514573f91fdd453d7080353209/activity/748962028577d84795d55b3012565154/step/28191616657869600330ad8022614695/trigger

POST fields:

ElementDescription
{Start trigger object
"tri_uid": "550289117529f8ba2705074055790637",Unique ID of the trigger.
"st_type": "BEFORE",Indicates whether the trigger is executed "BEFORE" or "AFTER" the step.
"st_condition": "@#amount > 500",(Optional) A condition in PHP code which can contain case variables. If it evaluates to true, then the trigger will be executed; otherwise, it won't be executed if it evaluates to false.
"st_position": 2The execution order of the trigger, where the first trigger to execute is 1, the second is 2, etc. There is separate counting for "BEFORE" and "AFTER" triggers. If a trigger is already occupying that position, it will be displaced downward in the list.
}End trigger object.

Result:

If successful, then the HTTP status is set t 201 (created) and there is no return object.

Example:

Request

Content-Type: application/json
{
    "tri_uid":      "502389187526013d4304108061369115",
    "st_type":      "BEFORE",
    "st_condition": "@@APPROVED == 'Y'",
    "st_position":  2
}

Response

201 (Created)

PHP example:

$processId = '113406514573f91fdd453d7080353209';
$taskId    = '294620094573f92543c7d99010162468';
$stepId    = '416553979576b12e1d6a4f7063384631';
$url = "/api/1.0/workflow/project/$processId/activity/$taskId/step/$stepId/trigger";
$aParams = array(
    "tri_uid"      => '451169569578965bd2a5513008268885',
    "st_type"      => 'AFTER',
    "st_position"  => 1
);
$oRet = pmRestRequest("POST", $url, $aParams, $oToken->access_token);

if ($oRet->status != 201) {
   print "Problem setting trigger in step";
}

Update Trigger Assignment: PUT /project/{prj_uid}/activity/{act_uid}/step/{step_uid}/trigger/{tri_uid}

Update the assignment of a trigger to a step.

PUT /api/1.0/{workspace}/project/{prj_uid}/activity/{act_uid}/step/{step_uid}/trigger/{tri_uid}

URL parameters:

NameDescriptionExample
workspaceWorkspace name/api/1.0/workflow/project/113406514573f91fdd453d7080353209/activity/748962028577d84795d55b3012565154/step/28191616657869600330ad8022614695/trigger/550289117529f8ba2705074055790637
prj_uidUnique ID of the project (process) which can be obtained by examining the @@PROCESS system variable in the Debugger./api/1.0/workflow/project/113406514573f91fdd453d7080353209/activity/748962028577d84795d55b3012565154/step/28191616657869600330ad8022614695/trigger/550289117529f8ba2705074055790637
act_uidUnique ID of the task, which can be obtained by examining the @@TASK system variable in the Debugger./api/1.0/workflow/project/113406514573f91fdd453d7080353209/activity/748962028577d84795d55b3012565154/step/28191616657869600330ad8022614695/trigger/550289117529f8ba2705074055790637
step_uidUnique ID of step./api/1.0/workflow/project/113406514573f91fdd453d7080353209/activity/748962028577d84795d55b3012565154/step/28191616657869600330ad8022614695/trigger/550289117529f8ba2705074055790637
tri_uidUnique ID of the trigger./api/1.0/workflow/project/113406514573f91fdd453d7080353209/activity/748962028577d84795d55b3012565154/step/28191616657869600330ad8022614695/trigger/550289117529f8ba2705074055790637

PUT fields:

ElementDescription
{Start trigger object
"st_type": "BEFORE",Required. Indicates whether the trigger is executed "BEFORE" or "AFTER" the step. Note that it is NOT possible to change the st_type with this endpoint. If needing to change the st_type, first unassign the trigger from the step and then reassign it.
"st_condition": "@#amount > 500",Optional. A condition in PHP code which can contain case variables. If it evaluates to true, then the trigger will be executed; otherwise, it won't be executed if it evaluates to false.
"st_position": 2Optional. The execution order of the trigger, where the first trigger to execute is 1, the second is 2, etc. There is separate counting for "BEFORE" and "AFTER" triggers. If a trigger is already occupying that position, it will be displaced downward in the list.
}End trigger object.

Result:

If successful, then the HTTP status is set t 200 (OK) and there is no return object. If an error occurs, then an error object like the following:

{
   "error": {
      "code":    400,
      "message": "Bad Request: The row '416553979576b12e1d6a4f7063384631, 294620094573f92543c7d99010162468, 451169569578965bd2a5513008268885, AFTER' in table StepTrigger doesn't exist!"
   }
}

Example:

Request

Content-Type: application/json
{
   "st_type":      "BEFORE",
   "st_condition": "@@APPROVED == 'XY'",
   "st_position":  2
}

Response

200 (OK)

PHP example:

$processId = '113406514573f91fdd453d7080353209';
$taskId    = '294620094573f92543c7d99010162468';
$stepId    = '416553979576b12e1d6a4f7063384631';
$url = "/api/1.0/workflow/project/$processId/activity/$taskId/step/$stepId/trigger/451169569578965bd2a5513008268885";
$aParams = array(
    "st_type"      => 'AFTER',
    "st_condition" => "@@APPROVED == 'XY'",
    "st_position"  => 1
);
$oRet = pmRestRequest("PUT", $url, $aParams, $oToken->access_token);

if ($oRet->status != 201) {
   print "Problem resetting trigger in step";
}

Unassign Trigger from Step: DELETE /project/{prj_uid}/activity/{act_uid}/step/{step_uid}/trigger/{tri_uid}/{type}

Unassign a trigger from a step.

DELETE /api/1.0/{workspace}/project/{prj_uid}/activity/{act_uid}/step/{step_uid}/trigger/{tri_uid}/{type}

URL parameters:

NameDescriptionExample
workspaceWorkspace name/api/1.0/workflow/project/113406514573f91fdd453d7080353209/activity/748962028577d84795d55b3012565154/step/28191616657869600330ad8022614695/trigger/550289117529f8ba2705074055790637/before
prj_uidUnique ID of the project (process) which can be obtained by examining the @@PROCESS system variable in the Debugger./api/1.0/workflow/project/113406514573f91fdd453d7080353209/activity/748962028577d84795d55b3012565154/step/28191616657869600330ad8022614695/trigger/550289117529f8ba2705074055790637/before
act_uidUnique ID of the task, which can be obtained by examining the @@TASK system variable in the Debugger./api/1.0/workflow/project/113406514573f91fdd453d7080353209/activity/748962028577d84795d55b3012565154/step/28191616657869600330ad8022614695/trigger/550289117529f8ba2705074055790637/before
step_uidUnique ID of step./api/1.0/workflow/project/113406514573f91fdd453d7080353209/activity/748962028577d84795d55b3012565154/step/28191616657869600330ad8022614695/trigger/550289117529f8ba2705074055790637/before
tri_uidUnique ID of the trigger./api/1.0/workflow/project/113406514573f91fdd453d7080353209/activity/748962028577d84795d55b3012565154/step/28191616657869600330ad8022614695/trigger/550289117529f8ba2705074055790637/before
typeSet to before or after to indicate whether the trigger is executed before or after the step./api/1.0/workflow/project/113406514573f91fdd453d7080353209/activity/748962028577d84795d55b3012565154/step/28191616657869600330ad8022614695/trigger/550289117529f8ba2705074055790637/before

Result:

Set to 200 (OK) if the trigger is unassigned from the step, so it will not be executed.

Example:

Response

200 (OK)

PHP example:

$processId = '113406514573f91fdd453d7080353209';
$taskId    = '294620094573f92543c7d99010162468';
$stepId    = '416553979576b12e1d6a4f7063384631';
$triggerId = '451169569578965bd2a5513008268885';
$type      = 'before';
$url = "/api/1.0/workflow/project/$processId/activity/$taskId/step/$stepId/trigger/$triggerId/$type";

$oRet = pmRestRequest("DELETE", $url);

if ($oRet->status == 400) {
   print "Error removing trigger from step: " . $oRet->error->message;
}


Step endpoints - Assign Task (a special step that has no UID)

Get Triggers for Task: GET /project/{prj_uid}/activity/{act_uid}/step/triggers

Get list of assigned triggers in a task.

GET /api/1.0/{workspace}/project/{prj_uid}/activity/{act_uid}/step/triggers

URL Parameters:

NameDescriptionExample
workspaceWorkspace namehttps://example.com/api/1.0/workflow/project/113406514573f91fdd453d7080353209/activity/748962028577d84795d55b3012565154/step/triggers
prj_uidUnique ID of the project (process) which can be obtained by examining the @@PROCESS system variable in the Debugger.https://example.com/api/1.0/workflow/project/113406514573f91fdd453d7080353209/activity/748962028577d84795d55b3012565154/step/triggers
act_uidUnique ID of the task, which can be obtained by examining the @@TASK system variable in the Debugger.https://example.com/api/1.0/workflow/project/113406514573f91fdd453d7080353209/activity/748962028577d84795d55b3012565154/step/triggers

Result:

TypeDescription
arrayReturns an object array with data of each trigger

Example:

Response

200 (OK)
Content-Type: application/json
[
  {
    "tri_uid":         "287964159526013c6c64bb1071946215",
    "tri_title":       "tgr1",
    "tri_description": "tgr1 DESCRIPTION",
    "st_type":         "BEFORE_ASSIGNMENT",
    "st_condition":    "",
    "st_position":     1
  },
  {
    "tri_uid":         "287964159526013c6c64bb1071946215",
    "tri_title":       "tgr1",
    "tri_description": "tgr1 DESCRIPTION",
    "st_type":         "BEFORE_ROUTING",
    "st_condition":    "",
    "st_position":     1
  },
  {
    "tri_uid":         "287964159526013c6c64bb1071946215",
    "tri_title":       "tgr1",
    "tri_description": "tgr1 DESCRIPTION",
    "st_type":         "AFTER_ROUTING",
    "st_condition":    "",
    "st_position":     1
  }
]

Available Triggers for Activity: GET /project/{prj_uid}/activity/{act_uid}/step/available-triggers/{type}

Get list of available triggers to assign.

GET /api/1.0/{workspace}/project/{prj_uid}/activity/{act_uid}/step/available-triggers/{type}

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID
act_uidStringActivity UID
typeStringTrigger Type

Result:

TypeDescription
arrayReturns an object array with data of each trigger available for the step (according the execution type)

Example:

Response

 200 (OK)
 Content-Type: application/json
 [
    {
        "tri_uid": "550289117529f8ba2705074055790637",
        "tri_title": "tgr5",
        "tri_description": "tgr5 DESCRIPTION",
        "tri_type": "SCRIPT",
        "tri_webbot": "",
        "tri_param": ""
    },
    {
        "tri_uid": "741936587529f8bb997e9d2054874954",
        "tri_title": "tgr6",
        "tri_description": "tgr6 DESCRIPTION",
        "tri_type": "SCRIPT",
        "tri_webbot": "",
        "tri_param": ""
    }
 ]

Get Trigger for Activity: GET /project/{prj_uid}/activity/{act_uid}/step/trigger/{tri_uid}/{type}

Get a single trigger assigned to step in an activity

GET /api/1.0/{workspace}/project/{prj_uid}/activity/{act_uid}/step/trigger/{tri_uid}/{type}

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID
act_uidStringTask UID
tri_uidStringTrigger UID
typeStringType of trigger execution (before-assignment, before-routing, after-routing)

Result:

TypeDescription
objectReturn an object with data of the trigger

Example:

Response

 200 (OK)
 Content-Type: application/json
 {
    "tri_uid": "287964159526013c6c64bb1071946215",
    "tri_title": "tgr1",
    "tri_description": "tgr1 DESCRIPTION",
    "st_type": "BEFORE_ASSIGNMENT",
    "st_condition": "",
    "st_position": 1
 }

Assign Trigger to Task: POST /project/{prj_uid}/activity/{act_uid}/step/trigger

Assign a trigger to the "Assignment" or "Routing" step section of an activity.

POST /api/1.0/{workspace}/project/{prj_uid}/activity/{act_uid}/step/trigger

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID
act_uidStringActivity UID

POST fields:

Element Description
{Start trigger object
"tri_uid": "550289117529f8ba2705074055790637",Unique ID of the trigger.
"st_type": "BEFORE_ROUTING",Indicates whether the trigger is executed "BEFORE_ASSIGNMENT", "BEFORE_ROUTING" or "AFTER_ROUTING" the case.
"st_condition": "@#amount > 500",(Optional) A condition in PHP code which can contain case variables. If it evaluates to true, then the trigger will be executed; otherwise, it won't be executed if it evaluates to false.
"st_position": 2The execution order of the trigger, where the first trigger to execute is 1, the second is 2, etc. There is separate counting for "BEFORE" and "AFTER" triggers. If a trigger is already occupying that position, it will be displaced downward in the list.
}End trigger object.

Result:

Type Description
emptyNo return

Example:

Request

 Content-Type: application/json
{
    "tri_uid": "6120910645852c920eba7d9069690137",
    "st_type": "BEFORE_ASSIGNMENT",
    "st_condition": "@@APPROVED == 'Y'",
    "st_position": 1
}

Response

 201 (Created)

Update Trigger: PUT /project/{prj_uid}/activity/{act_uid}/step/trigger/{tri_uid}

Update a trigger that was assigned to the "Assignment" or "Routing" step section of an activity.

PUT /api/1.0/{workspace}/project/{prj_uid}/activity/{act_uid}/step/trigger/{tri_uid}

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID
act_uidStringActivity UID
tri_uidStringTrigger UID

PUT fields:

ElementDescription
{Start trigger object
"st_type": "BEFORE_ASSIGNMENT",Required. Indicates whether the trigger is executed "BEFORE_ASSIGNMENT", "BEFORE_ROUTING", "AFTER_ROUTING" the task. Note that it is NOT possible to change the st_type with this endpoint. If needing to change the st_type, first unassign the trigger from the task and then reassign it.
"st_condition": "@#amount > 500",Optional. A condition in PHP code which can contain case variables. If it evaluates to true, then the trigger will be executed; otherwise, it won't be executed if it evaluates to false.
"st_position": 2Optional. The execution order of the trigger, where the first trigger to execute is 1, the second is 2, etc. There is separate counting for "BEFORE" and "AFTER" triggers. If a trigger is already occupying that position, it will be displaced downward in the list.
}End trigger object.

Result:

TypeDescription
emptyNo return

Example:

Request

 Content-Type: application/json
{
    "st_type": "BEFORE_ASSIGNMENT",
    "st_condition": "@@APPROVED == 'N'",
    "st_position": 2
}

Response

 200 (OK)

Unassign Trigger: DELETE /project/{prj_uid}/activity/{act_uid}/step/trigger/{tri_uid}/{type}

Unassign a trigger from the "Assignment" or "Routing" step section of an activity.

DELETE: /api/1.0/{workspace}/project/{prj_uid}/activity/{act_uid}/step/trigger/{tri_uid}/{type}

URL parameters:

NameDescriptionExample
workspaceWorkspace name/api/1.0/workflow/project/113406514573f91fdd453d7080353209/activity/748962028577d84795d55b3012565154/step/trigger/6120910645852c920eba7d9069690137/before-routing
prj_uidUnique ID of the project (process) which can be obtained by examining the @@PROCESS system variable in the Debugger./api/1.0/workflow/project/113406514573f91fdd453d7080353209/activity/748962028577d84795d55b3012565154/step/trigger/6120910645852c920eba7d9069690137/before-routing
act_uidUnique ID of the task, which can be obtained by examining the @@TASK system variable in the Debugger./api/1.0/workflow/project/113406514573f91fdd453d7080353209/activity/748962028577d84795d55b3012565154/step/trigger/6120910645852c920eba7d9069690137/before-routing
tri_uidUnique ID of the trigger./api/1.0/workflow/project/113406514573f91fdd453d7080353209/activity/748962028577d84795d55b3012565154/step/trigger/6120910645852c920eba7d9069690137/before-routing
typeSet to before-assignment, before-routing or after-routing to indicate whether the trigger is executed in the task./api/1.0/workflow/project/113406514573f91fdd453d7080353209/activity/748962028577d84795d55b3012565154/step/trigger/6120910645852c920eba7d9069690137/before-routing

Result:

TypeDescription
emptyNo return

Example:

Response

 200 (OK)

Output Document endpoints

The following are the methods currently implemented for the output document resources of the designer in the ProcessMaker API.

1. Get a list of output documents of a project

2. Get a single output document of a project

3. Create a new output document for a project

4. Update an output document of a project

5. Delete an output document of a project

Output Document resources:

NameDescriptionTypeValue
out_doc_uidOutput document UIDStringString with the output document UID
out_doc_titleDocument titleStringString with the document title
out_doc_descriptionDocument descriptionStringString with the document description
out_doc_filenameGenerated document file nameStringString with the generated file name
out_doc_templateDocument shape or templateStringString with the document template
out_doc_report_generatorDocument generatorStringLibrary converter used to render the document, valid values are: TCPDF, HTML2PDF
out_doc_landscapeDocument orientationIntegerValid values: 0 = portrait, 1 = landscape
out_doc_mediaDocument sizeStringMax length 10 characters
out_doc_left_marginLeft marginIntegerInteger number
out_doc_right_marginRight marginIntegerInteger number
out_doc_top_marginUpper marginIntegerInteger number
out_doc_bottom_marginBottom marginIntegerInteger number
out_doc_generateType of generated documentStringValid values are: PDF, WORD or BOTH
out_doc_typeDocument type (HTML)StringString of 32 characters
out_doc_current_revisionCurrent document versionIntegerInteger number
out_doc_field_mappingField mappingStringString
out_doc_versioningDocument versionIntegerInteger number
out_doc_destination_pathDocument pathStringString
out_doc_tagsDocument tagStringString
out_doc_pdf_security_enabledPassword security enabling for PDF documentsIntegerValid values are:0 disabled and 1 password security enabled
out_doc_pdf_security_open_passwordPassword used to open the documentStringString
out_doc_pdf_security_owner_passwordPassword of the document ownerStringString
out_doc_pdf_security_permissionPermissions of the documentStringValid values are: "print", "modify", "copy", "forms". values can be combined using the pipe character ("|")

Below there is the necessary information of each method:

Get Output Documents List: GET project/{prj_uid}/output-documents

Get a list of Output Documents for a project.

GET /api/1.0/{workspace}/project/{prj_uid}/output-documents

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID

Result:

TypeDescription
arrayReturns an array of output document objects

Example:

Response

 200 (OK)
 Content-Type: application/json
 [
    {
        "out_doc_uid": "8488283114bffe914417cb5020528882",
        "out_doc_title": "Output doc #1",
        "out_doc_description": "Output doc #1 - Desc",
        "out_doc_filename": "od_generated_1",
        "out_doc_template": "",
        "out_doc_report_generator": "HTML2PDF",
        "out_doc_landscape": 0,
        "out_doc_media": "Letter",
        "out_doc_left_margin": 0,
        "out_doc_right_margin": 0,
        "out_doc_top_margin": 0,
        "out_doc_bottom_margin": 0,
        "out_doc_generate": "BOTH",
        "out_doc_type": "HTML",
        "out_doc_current_revision": 0,
        "out_doc_field_mapping": "",
        "out_doc_versioning": 0,
        "out_doc_destination_path": "",
        "out_doc_tags": "",
        "out_doc_pdf_security_enabled": 0,
        "out_doc_pdf_security_open_password": "",
        "out_doc_pdf_security_owner_password": "",
        "out_doc_pdf_security_permissions": ""
    }
 ]

Get Output Document: GET project/{prj_uid}/output-document/{out_doc_uid}

Get a single Output Document in a project.

GET /api/1.0/{workspace}/project/{prj_uid}/output-document/{out_doc_uid}

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID
out_doc_uidStringOutput document UID

Result:

TypeDescription
objectReturns an output document object

Example:

Response

 200 (OK)
 Content-Type: application/json
 {
    "out_doc_uid": "8488283114bffe914417cb5020528882",
    "out_doc_title": "Output doc #1",
    "out_doc_description": "Output doc #1 - Desc",
    "out_doc_filename": "od_generated_1",
    "out_doc_template": "",
    "out_doc_report_generator": "HTML2PDF",
    "out_doc_landscape": 0,
    "out_doc_media": "Letter",
    "out_doc_left_margin": 0,
    "out_doc_right_margin": 0,
    "out_doc_top_margin": 0,
    "out_doc_bottom_margin": 0,
    "out_doc_generate": "BOTH",
    "out_doc_type": "HTML",
    "out_doc_current_revision": 0,
    "out_doc_field_mapping": "",
    "out_doc_versioning": 0,
    "out_doc_destination_path": "",
    "out_doc_tags": "",
    "out_doc_pdf_security_enabled": 0,
    "out_doc_pdf_security_open_password": "",
    "out_doc_pdf_security_owner_password": "",
    "out_doc_pdf_security_permissions": ""
 }


Create Output Document: POST project/{prj_uid}/output-document

Create a new output document for a project.

POST /api/1.0/{workspace}/project/{prj_uid}/output-document

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID

Required Fields:

NameTypeDescription
out_doc_titleStringDocument title
out_doc_descriptionStringDocument description
out_doc_filenameStringGenerated document filename

Optional Fields:

NameTypeDescription
out_doc_templateStringDocument template or shape
out_doc_report_generatorStringDocument generator. It can be TCPDF or HTML2PDF
out_doc_landscapeIntegerDocument orientation (0=portrait and 1=landscape)
out_doc_mediaStringDocument size
out_doc_left_marginIntegerLeft margin
out_doc_right_marginIntegerRight margin
out_doc_top_marginIntegerUpper margin
out_doc_bottom_marginIntegerBottom margin
out_doc_generateStringType of generated document (PDF, WORD or BOTH)
out_doc_typeStringDocument type (HTML)
out_doc_versioningStringDocument version
out_doc_destination_pathStringDocument path
out_doc_tagsStringDocument tag
out_doc_pdf_security_enabledIntegerPassword security enabling for pdf documents (0= does not exist and 1 = exists)
out_doc_pdf_security_open_passwordStringPassword used to open the document
out_doc_pdf_security_owner_passwordStringPassword for the document owner
out_doc_pdf_security_permissionStringDocument permissions

Result:

TypeDescription
objectReturns the new output document object

Example:

Request

 Content-Type: application/json
 {
    "out_doc_title": "Output doc #1",
    "out_doc_description": "Output doc #1 - Desc",
    "out_doc_filename": "od_generated_1",
    "out_doc_template": "Example",
    "out_doc_report_generator": "HTML2PDF",
    "out_doc_landscape": 0,
    "out_doc_media": "Letter",
    "out_doc_left_margin": 0,
    "out_doc_right_margin": 0,
    "out_doc_top_margin": 0,
    "out_doc_bottom_margin": 0,
    "out_doc_generate": "BOTH",
    "out_doc_type": "HTML",
    "out_doc_versioning": 0,
    "out_doc_destination_path": "",
    "out_doc_tags": "",
    "out_doc_pdf_security_enabled": 0,
    "out_doc_pdf_security_open_password": "",
    "out_doc_pdf_security_owner_password": "",
    "out_doc_pdf_security_permissions": ""
 }

Response

 201 (Created)
 {
    "out_doc_title": "Output doc #1",
    "out_doc_description": "Output doc #1 - Desc",
    "out_doc_filename": "od_generated_1",
    "out_doc_template": "Example",
    "out_doc_report_generator": "HTML2PDF",
    "out_doc_landscape": 0,
    "out_doc_media": "Letter",
    "out_doc_left_margin": 0,
    "out_doc_right_margin": 0,
    "out_doc_top_margin": 0,
    "out_doc_bottom_margin": 0,
    "out_doc_generate": "BOTH",
    "out_doc_type": "HTML",
    "out_doc_current_revision": 0,
    "out_doc_field_mapping": "",
    "out_doc_versioning": 0,
    "out_doc_destination_path": "",
    "out_doc_tags": "",
    "out_doc_pdf_security_enabled": 0,
    "out_doc_pdf_security_open_password": "",
    "out_doc_pdf_security_owner_password": "",
    "out_doc_pdf_security_permissions": "",
    "pro_uid": "1265557095225ff5c688f46031700471",
    "out_doc_uid": "62708276253600efb11bde2066213658"
 }


Update Output Document: PUT project/{prj_uid}/output-document/{out_doc_uid}

Update an Output Document in a project.

PUT /api/1.0/{workspace}/project/{prj_uid}/output-document/{out_doc_uid}

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID
out_doc_uidStringOutput document UID

Required Fields:

NameTypeDescription
out_doc_titleStringDocument title
out_doc_descriptionStringDocument description
out_doc_filenameStringDocument filename when it is generated

Optional Fields:

NameTypeDescription
out_doc_report_generatorStringDocument generator. It can be TCPDF or HTML2PDF
out_doc_landscapeIntegerDocument orientation (0=portrait and 1=landscape)
out_doc_mediaStringDocument size
out_doc_left_marginIntegerLeft margin
out_doc_right_marginIntegerRight margin
out_doc_top_marginIntegerUpper margin
out_doc_bottom_marginIntegerBottom margin
out_doc_generateStringGenerated document type (PDF, WORD or BOTH)
out_doc_typeStringDocument type (HTML)
out_doc_versioningStringDocument version
out_doc_destination_pathStringDocument path
out_doc_tagsStringDocument tag
out_doc_pdf_security_enabledStringPassword security enabling for PDF documents (0 = does not exist, 1= exists)
out_doc_pdf_security_open_passwordStringPassword used to open the document
out_doc_pdf_security_owner_passwordStringPassword for the document owner
out_doc_pdf_security_permissionStringDocument permissions

Result:

TypeDescription
emptyNo return

Example:

Request

 Content-Type: application/json
 {
    "out_doc_title": "Output doc #fsdfsdfsd1",
    "out_doc_description": "Output doc #1 - Desc",
    "out_doc_filename": "od_generated_1",
    "out_doc_template": "Example",
    "out_doc_report_generator": "HTML2PDF",
    "out_doc_landscape": 0,
    "out_doc_media": "Letter",
    "out_doc_left_margin": 0,
    "out_doc_right_margin": 0,
    "out_doc_top_margin": 0,
    "out_doc_bottom_margin": 0,
    "out_doc_generate": "BOTH",
    "out_doc_type": "HTML",
    "out_doc_versioning": 0,
    "out_doc_destination_path": "",
    "out_doc_tags": "",
    "out_doc_pdf_security_enabled": 0,
    "out_doc_pdf_security_open_password": "",
    "out_doc_pdf_security_owner_password": "",
    "out_doc_pdf_security_permissions": ""
 }

Response

 200 (OK)


Delete Output Document: DELETE project/{prj_uid}/output-document/{out_doc_uid}

Delete an Output Document in a project.

DELETE /api/1.0/{workspace}/project/{prj_uid}/output-document/{out_doc_uid}

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID
out_doc_uidStringOutput document UID

Result:

TypeDescription
emptyNo return

Example:

Response

 200 (OK)

Input Document endpoints

The following are the methods currently implemented for the input document resources of the designer in the ProcessMaker API.

1. Get a list of input documents of a project

2. Get a single input document of a project

3. Create a new input document for a project

4. Update an input document of a project

5. Delete an input document of a project

Input Document resources:

NameDescriptionTypeValue
inp_doc_uidInput Document UIDString“9541049475298f190420f51086854718” (string of 32 characters)
inp_doc_titleInput document titleString"Title"
inp_doc_descriptionInput document descriptionString"Description"
inp_doc_form_neededDocument typeString"VIRTUAL", "REAL", "VREAL" (unique values)
inp_doc_originalDocument formatString"ORIGINAL", "COPY", "COPYLEGAL", (unique values) Default: "COPY"
inp_doc_publishedType of accessString"PRIVATE" (unique values) Default: "PRIVATE"
inp_doc_versioningEnable versioning controlInteger0, 1 (unique values) Default: 0
inp_doc_destination_pathDestination PathString"/my/path/"
inp_doc_tagsTagsString"INPUT"

Below there is the necessary information of each method:

Get Input Documents List: GET project/{prj_uid}/input-documents

Get a list of Input Documents in a project.

GET /api/1.0/{workspace}/project/{prj_uid}/input-documents

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID

Result:

TypeDescription
arrayReturns an array of objects with each input document

Example:

Response

 200 (OK)
 Content-Type: application/json
 [
  {
    "inp_doc_uid": "61792009652aa1529305888088498275",
    "inp_doc_title": "My Documents1",
    "inp_doc_description": "My Documents1 DESCRIPTION",
    "inp_doc_form_needed": "VIRTUAL",
    "inp_doc_original": "ORIGINAL",
    "inp_doc_published": "PRIVATE",
    "inp_doc_versioning": 1,
    "inp_doc_destination_path": "",
    "inp_doc_tags": "INPUT"
  },
  {
    "inp_doc_uid": "86412625952aa188dd2c124045671550",
    "inp_doc_title": "My Documents2",
    "inp_doc_description": "My Documents2 DESCRIPTION",
    "inp_doc_form_needed": "VIRTUAL",
    "inp_doc_original": "ORIGINAL",
    "inp_doc_published": "PRIVATE",
    "inp_doc_versioning": 1,
    "inp_doc_destination_path": "",
    "inp_doc_tags": "INPUT"
  }
 ]


Get Input Document: GET project/{prj_uid}/input-document/{inp_doc_uid}

Get a single Input Document in a project.

GET /api/1.0/{workspace}/project/{prj_uid}/input-document/{inp_doc_uid}

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID
inp_doc_uidStringInput document UID

Result:

TypeDescription
objectReturns an object with the input document data

Example:

Response

 200 (OK)
 Content-Type: application/json
 {
   "inp_doc_uid": "61792009652aa1529305888088498275",
   "inp_doc_title": "My Documents1",
   "inp_doc_description": "My Documents1 DESCRIPTION",
   "inp_doc_form_needed": "VIRTUAL",
   "inp_doc_original": "ORIGINAL",
   "inp_doc_published": "PRIVATE",
   "inp_doc_versioning": 1,
   "inp_doc_destination_path": "",
   "inp_doc_tags": "INPUT"
 }


Create Input Document: POST project/{prj_uid}/input-document

Create a new Input Document in a project.

POST /api/1.0/{workspace}/project/{prj_uid}/input-document

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID

Required Fields:

NameTypeDescription
inp_doc_titleStringDocument Title

Optional Fields:

NameTypeDescription
inp_doc_descriptionStringInput Document description
inp_doc_form_neededStringDocument type
inp_doc_originalStringDocument format
inp_doc_publishedStringType of access
inp_doc_versioningIntegerType of access
inp_doc_destination_pathStringDestination Path
inp_doc_tagsStringTags

Result:

TypeDescription
objectReturns an object with the new Input Document information, and the "inp_doc_uid" attribute

Example:

Request

 Content-Type: application/json
 {
   "inp_doc_title": "My Documents100",
   "inp_doc_description": "My Documents100 DESCRIPTION",
   "inp_doc_form_needed": "VIRTUAL",
   "inp_doc_original": "ORIGINAL",
   "inp_doc_published": "PRIVATE",
   "inp_doc_versioning": 1,
   "inp_doc_destination_path": "",
   "inp_doc_tags": "INPUT"
 }

Response

 201 (Created)
 {
   "inp_doc_uid": "18588090952ab262d42e3e2019425281",
   "inp_doc_title": "My Documents100",
   "inp_doc_description": "My Documents100 DESCRIPTION",
   "inp_doc_form_needed": "VIRTUAL",
   "inp_doc_original": "ORIGINAL",
   "inp_doc_published": "PRIVATE",
   "inp_doc_versioning": 1,
   "inp_doc_destination_path": "",
   "inp_doc_tags": "INPUT"
 }


Update Input Document: PUT project/{prj_uid}/input-document/{inp_doc_uid}

Update an Input Document in a project.

PUT /api/1.0/{workspace}/project/{prj_uid}/input-document/{inp_doc_uid}
NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID
inp_doc_uidStringThe input document UID

Optional Fields:

NameTypeDescription
inp_doc_titleStringTitle
inp_doc_descriptionStringInput document description
inp_doc_form_neededStringDocument type
inp_doc_originalStringDocument format
inp_doc_publishedStringType of access
inp_doc_versioningIntegerVersion control enabling
inp_doc_destination_pathStringDestination Path
inp_doc_tagsStringTags

Result:

TypeDescription
emptyNo return

Example:

Request

 Content-Type: application/json
 {
   "inp_doc_title": "My Documents100…",
   "inp_doc_description": "My Documents100 DESCRIPTION…",
   "inp_doc_form_needed": "VIRTUAL",
   "inp_doc_original": "ORIGINAL",
   "inp_doc_published": "PRIVATE",
   "inp_doc_versioning": 1,
   "inp_doc_destination_path": "",
   "inp_doc_tags": "INPUT"
 }

Response

 200 (OK)


Delete Input Document: DELETE project/{prj_uid}/input-document/{inp_doc_uid}

Delete an Input Document in a project.

DELETE /api/1.0/{workspace}/project/{prj_uid}/input-document/{inp_doc_uid}

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID
inp_doc_uidStringInput document UID

Result:

TypeDescription
emptyNo return

Example:

Response

 200 (OK)

Trigger endpoints

The following are the methods currently implemented for the trigger resources of the designer in the ProcessMaker API.

1. Get a list of triggers in a project

2. Get a single trigger of a project

3. Create a new trigger for a project

4. Update a trigger of a project

5. Delete a trigger of a project

Trigger resources:

Name Description Type Value
tri_uidTrigger UIDStringString
tri_titleTrigger nameString"Trigger name" (string)
tri_descriptionTrigger descriptionString"Trigger Description" (Alphanumeric String)
tri_webbotTrigger codeString"die('The End.');" (php code)
tri_paramInitial parameters of the triggerString"a:2: {i:0;s:5:dato1";i:1.s:5:"dato2";}" (serialized string)

Below there is the necessary information for each method:

Get Triggers List: GET project/{prj_uid}/triggers

Get a list of triggers in a project.

GET /api/1.0/{workspace}/project/{prj_uid}/triggers

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID

Result:

TypeDescription
arrayReturns an array of objects with the existent triggers

Example:

Response

 200 (OK)
 Content-Type: application/json
 [
    {
       "tri_uid": "56812777252a6313aa8cba2043861472",
       "tri_title": "Trigger #1",
       "tri_description": "Trigger #1 - Desc",
       "tri_type": "SCRIPT",
       "tri_webbot": "",
       "tri_param": "PRIVATE"
    },
    {
       "tri_uid": "59737921052a5d667689400022387588",
       "tri_title": "Trigger #2",
       "tri_description": "Trigger #2 - Desc",
       "tri_type": "SCRIPT",
       "tri_webbot": "",
       "tri_param": "PRIVATE"
    }
 ]


Get Trigger GET project/{prj_uid}/trigger/{tri_uid}

Get a single trigger in a project.

GET /api/1.0/{workspace}/project/{prj_uid}/trigger/{tri_uid}

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID
tri_uidStringTrigger UID

Result:

TypeDescription
arrayReturns a trigger object

Example:

Response

 200 (OK)
 Content-Type: application/json
 {
    "tri_uid": "56812777252a6313aa8cba2043861472",
    "tri_title": "Trigger #1",
    "tri_description": "Trigger #1 - Desc",
    "tri_type": "SCRIPT",
    "tri_webbot": "",
    "tri_param": "PRIVATE"
 }


Create Trigger: POST project/{prj_uid}/trigger

Create a new trigger in a project.

POST /api/1.0/{workspace}/project/{prj_uid}/trigger

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID

Required Fields:

NameTypeDescription
tri_titleStringTrigger name

Optional Fields:

NameTypeDescription
tri_descriptionStringTrigger description
tri_webbotStringTrigger code
tri_paramStringInitial parameters of the trigger

Result:

TypeDescription
objectReturns the created trigger object

Example:

Request

 Content-Type: application/json
 {
    "tri_title": "Trigger #1",
    "tri_description": "Trigger #1 - Desc",
    "tri_type": "SCRIPT",
    "tri_webbot": "",
    "tri_param": "PRIVATE"
 }

Response

 201 (Created)
 {
    "tri_uid": "56812777252a6313aa8cba2043861472",
    "tri_title": "Trigger #1",
    "tri_description": "Trigger #1 - Desc",
    "tri_type": "SCRIPT",
    "tri_webbot": "",
    "tri_param": "PRIVATE"
 }


Update Trigger: PUT project/{prj_uid}/trigger/{tri_uid}

Update a trigger in a project.

PUT /api/1.0/{workspace}/project/{prj_uid}/trigger/{tri_uid}

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID
tri_uidStringTrigger UID

Optional Fields:

NameTypeDescription
tri_titleStringTrigger title
tri_descriptionStringTrigger description
tri_webbotStringTrigger code
tri_paramStringInitial parameters of the trigger

Result:

TypeDescription
emptyNo return

Example:

Request

 Content-Type: application/json
 {
    "tri_title": "Trigger #1",
    "tri_description": "Trigger #1 - Desc (modified)",
    "tri_type": "SCRIPT",
    "tri_webbot": "",
    "tri_param": "PRIVATE"
 }

Response

 200 (OK)


Delete Trigger: DELETE project/{prj_uid}/trigger/{tri_uid}

Delete a trigger in a project.

DELETE /api/1.0/{workspace}/project/{prj_uid}/trigger/{tri_uid}

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID
tri_uidStringTrigger UID

Result:

TypeDescription
emptyNo return

Example:

Response

 200 (OK)

DynaForm endpoints

The following are the methods currently implemented for the dynaform resources of the designer in the ProcessMaker API.

1. Get a list of dynaforms of a project

2. Get a single dynaform of a project

3. Create a new dynaform in a project

3.1. Normal creation of a dynaform
3.2. Creation of a dynaform based on Copy/Import
3.3. Creation of a dynaform based on a PM TAble

4. Update a dynaform in a project

5. Delete a dynaform of a project

Dynaform resources:

NameDescription Type Value
dyn_uidDynaform UIDString"9541049475298f190420f51086854718" (string of 32 characters)
dyn_titleDynaform titleString"Title…"
dyn_descriptionDynaform descriptionString"Description…"
dyn_typeDynaform typeString"xmlform", "grid" (unique values)
dyn_contentDynaform contentStringString with the content.
dyn_versionDynaform versionInteger1. Old version. 2. New version
copy_import **Dynaform data to copy/importObjectObject with the following attributes: prj_uid and dyn_uid
copy_import . prj_uid **Process UIDString"7389179125176dac806d205065699622" (string of 32 characters)
copy_import . dyn_uid **Dynaform UID to Copy / ImportString"77941473952b49c65a01a80041727578" (string of 32 characters)
pmtable **PMTable dataObjectObject with the following attributes: tab_uid and fields
pmtable . tab_uid **PMTable UIDString"72249773552b84ded1d8aa4036518645" (string of 32 characters)
pmtable . fields **Define the primary key field to register the PMTableObjectObject array with the following attributes: fld_name and pro_variable
pmtable . fields . fld_name **Field which is PMTable primary fieldString"ID"
pmtable . fields . pro_variable **Variable name whose value will be stored in the primary key fieldString"@#APPLICATION"

Note. (**) Defines only one value: copy_import or pmtable, if both variables are defined, an error will be shown.

Below there is the necessary information for each method:

Get DynaForm List: GET project/{prj_uid}/dynaforms

Get a list of DynaForms in a project.

GET /api/1.0/{workspace}/project/{prj_uid}/dynaforms

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID

Result:

TypeDescription
arrayReturns an array of dynaforms objects

Example:

Response

 200 (OK)
 Content-Type: application/json
 [
  {
    "dyn_uid": "2074240775261579834c597006169172",
    "dyn_title": "User data",
    "dyn_description": "User data...",
    "dyn_type": "xmlform"
  },
  {
    "dyn_uid": "84564134152b20cb3efa430060666501",
    "dyn_title": "Demo grid1",
    "dyn_description": "Demo grid1 DESCRIPTION...",
    "dyn_type": "grid"
  },
  {
    "dyn_uid": "17796063752b32090a0e950049957998",
    "dyn_title": "My DynaForm1",
    "dyn_description": "My DynaForm1 DESCRIPTION",
     "dyn_type": "xmlform"
  }
 ]


Get DynaForm: GET project/{prj_uid}/dynaform/{dyn_uid}

Get a single DynaForm in a project.

GET /api/1.0/{workspace}/project/{prj_uid}/dynaform/{dyn_uid}

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID
dyn_uidStringDynaform UID

Result:

TypeDescription
objectReturns an object with the dynaform data

Example:

Response

 200 (OK)
 Content-Type: application/json
 {
    "dyn_uid": "2074240775261579834c597006169172",
    "dyn_title": "User data",
    "dyn_description": "User data...",
    "dyn_type": "xmlform"
 }

Get Field List in Grid: GET project/{prj_uid}/dynaform/{dyn_uid}/grid/{grd_name}/field-definitions

Available in version 3.0.1.8 and later.

Get a list of fields found in a specified grid.

GET /api/1.0/{workspace}/project/{prj_uid}/dynaform/{dyn_uid}/grid/{grd_name}/field-definitions

URL Parameters:

NameTypeDescriptionExample
workspaceStringWorkspace name.http://example.com/api/1.0/workflow/project/798659366573140bc117490080056441/dynaform/406442383573140df944390011262710/grid/clientList/field-definitions
prj_uidStringUnique ID of the project, which can be found in the @@PROCESS system variable in the Debugger.http://example.com/api/1.0/workflow/project/798659366573140bc117490080056441/dynaform/406442383573140df944390011262710/grid/clientList/field-definitions
dyn_uidStringUnique ID of the DynaForm which holds the grid, which can be found by clicking on the border of the DynaForm and looking at the id property.http://example.com/api/1.0/workflow/project/798659366573140bc117490080056441/dynaform/406442383573140df944390011262710/grid/clientList/field-definitions
grd_nameStringThe name of the variable which is associated with the grid. Note that it is not possible to retrieve grids which aren't associated with a variable.http://example.com/api/1.0/workflow/project/798659366573140bc117490080056441/dynaform/406442383573140df944390011262710/grid/clientList/field-definitions

Result:

If successful, the HTTP status code is set to 200 and an array of objects is returned, which contain the attributes of the fields in the specified grid. The attributes vary according to the type of field. To learn more, see the Available Attributes of DynaForm controls and Editing DynaForm's JSON code.

Example:

Response

200 (OK)
[
  {
    "type":           "text",
    "variable":       "",
    "var_uid":        "",
    "dataType":       "",
    "protectedValue": false,
    "id":             "clientName",
    "name":           "clientName",
    "label":          "Client Name",
    "defaultValue":   "",
    "placeholder":    "",
    "hint":           "",
    "required":       false,
    "textTransform":  "none",
    ...
  }
  {
    "type":               "datetime",
    "variable":           "",
    "var_uid":            "",
    "dataType":           "",
    "protectedValue":     false,
    "id":                 "contractDate",
    "name":               "contractDate",
    "label":              "Contract Date",
    "placeholder":        "",
    "hint":               "",
    "required":           false,
    "mode":               "parent",
    "format":             "YYYY-MM-DD",
    "dayViewHeaderFormat":"MMMM YYYY",
    "extraFormats":       false,
    "stepping":           1,
    "minDate":            "",
    ...
  }
]

PHP Example:

The following code retrieves the field list for a grid's whose variable is named "clientList" and prints a list of the attributes for each field in the grid.

$oToken = pmRestLogin('YOXQRMHAMMMKSOENEDENDFQDTJTGTUUS', '32667560556abe5142235e0090500305', 'mary', 'p@s5w0rD');
if (!isset($oToken) or !isset($oToken->access_token)) {
   die("Error: Can't access ProcessMaker REST");
}

$gridName = 'clientList';
$dynaformId = '406442383573140df944390011262710';
$projectId = '798659366573140bc117490080056441';
$url = "/api/1.0/workflow/project/$projectId/dynaform/$dynaformId/grid/$gridName/field-definitions";

$oRet = pmRestRequest("GET", $url, null, $oToken->access_token);
if ($oRet->status != 200) {
  print_r($oRet);
  die;
}

print "<pre>"; //if displaying in a web page
foreach($oRet->response as $oField) {
   print "{\n";
   foreach($oField as $key => $value) {
      print "  $key => $value\n";
   }
   print "}\n";
}

Get Field in Grid: GET project/{prj_uid}/dynaform/{dyn_uid}/grid/{grd_name}/field-definition/{fld_id}

Available in version 3.0.1.8 and later.

Get the attributes of a field in a grid.

GET /api/1.0/{workspace}/project/{prj_uid}/dynaform/{dyn_uid}/grid/{grd_name}/field-definition/{fld_id}

URL Parameters:

NameTypeDescriptionExample
workspaceStringWorkspace name.http://example.com/api/1.0/workflow/project/798659366573140bc117490080056441/dynaform/406442383573140df944390011262710/grid/clientList/field-definition/address
prj_uidStringUnique ID of the project, which can be found in the @@PROCESS system variable in the Debugger.http://example.com/api/1.0/workflow/project/798659366573140bc117490080056441/dynaform/406442383573140df944390011262710/grid/clientList/field-definition/address
dyn_uidStringUnique ID of the DynaForm which holds the grid, which can be found by clicking on the border of the DynaForm and looking at the id property.http://example.com/api/1.0/workflow/project/798659366573140bc117490080056441/dynaform/406442383573140df944390011262710/grid/clientList/field-definition/address
grd_nameStringThe name of the variable which is associated with the grid. Note that it is not possible to retrieve grids which aren't associated with a variable.http://example.com/api/1.0/workflow/project/798659366573140bc117490080056441/dynaform/406442383573140df944390011262710/grid/clientList/field-definition/address
fld_idStringThe id of a field inside a grid.http://example.com/api/1.0/workflow/project/798659366573140bc117490080056441/dynaform/406442383573140df944390011262710/grid/clientList/field-definition/address

Result:

If successful, the HTTP status code is set to 200 and an object is returned, which contain the attributes of the grid field. The attributes vary according to the type of field. To learn more, see the Available Attributes of DynaForm controls and Editing DynaForm's JSON code.

Example:

Response

200 (OK)
{
  "type":             "text",
  "variable":         "",
  "var_uid":          "",
  "dataType":         "",
  "protectedValue":   false,
  "id":               "clientName",
  "name":             "clientName",
  "label":            "Client Name",
  "defaultValue":     "",
  "placeholder":      "",
  "hint":             "",
  "required":         false,
  "textTransform":    "none",
  "validate":         "",
  "validateMessage":  "",
  "maxLength":        1000,
  "formula":          "",
  "mode":             "parent",
  "operation":        "",
  "datasource":       "database",
  "dbConnection":     "workflow",
  "dbConnectionLabel":"PM Database",
  "sql":              "",
  "dataVariable":     "",
  "columnWidth":      "30",
  "width":            100,
  "title":            "Client Name"
}

PHP Example:

The following code prints out the attributes for a field with the ID "clientName" found in a grid whose variable is named "clientList".

$oToken = pmRestLogin('YOXQRMHAMMMKSOENEDENDFQDTJTGTUUS', '32667560556abe5142235e0090500305', 'mary', 'p@s5w0rD');
if (!isset($oToken) or !isset($oToken->access_token)) {
   die("Error: Can't access ProcessMaker REST");
}

$gridName = 'clientList';
$fieldId  = 'clientName';
$dynaformId = '406442383573140df944390011262710';
$projectId = '798659366573140bc117490080056441';
$url = "/api/1.0/workflow/project/$projectId/dynaform/$dynaformId/grid/$gridName/field-definition/$fieldId";

$oRet = pmRestRequest("GET", $url, null, $oToken->access_token);

if ($oRet->status == 200) {
   print "<pre>"; //if in web page
   foreach($oRet->response as $key => $value) {
      "$key => $value\n";
   }
}

Create DynaForm: POST project/{prj_uid}/dynaform

Normal creation of a DynaForm.

POST /api/1.0/{workspace}/project/{prj_uid}/dynaform

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID

Required Fields:

NameTypeDescription
dyn_titleStringDynaform title
dyn_typeStringDynaform type, which is always "xmlform".
dyn_versionIntegerDynaform version which is 1 for a classic Dynaform based on XML or 2 for a responsive Dynaform based on JSON.

Optional Fields:

NameTypeDescription
dyn_descriptionStringDynaform description
dyn_contentStringThe XML or JSON code for the Dynaform. This can be found either by exporting a Dynaform as a .json file or by copying the content from the DYNAFORM.DYN_CONTENT field in the database. If importing JSON, all the whitespace needs to be removed.
TIP: If needing to edit a Dynaform's content, go to http://jsonviewer.stack.hu and paste the JSON code. Then, click on Format to get an editable version of the JSON with spacing. When done editing, click on Remove white space to remove the spacing. Then, copy the JSON code into a text editor and search for each " and replace it with \" so that all the Dynaform's code will be contained in a single string.

Result:

TypeDescription
objectReturns an object with the new dynaform information and the attribute: "dyn_uid"

If the dyn_content is included, then new unique IDs will be generated for the Dynaform and its variables when it is imported. If the dyn_title and dyn_description were specified, then they will be inserted in the Dynaform's code, replacing the original title and description.

Example:

Request

 Content-Type: application/json
 {
  "dyn_title": "Billing Form",
  "dyn_description": "Form to bill the client",
  "dyn_type": "xmlform",
  "dyn_version": 2,
  "dyn_content": "{\"name\":\"Product Info\",\"description\":\"\",\"items\":[{\"type\":\"form\",\"variable\":\"\",\"var_uid\":\"\",\"dataType\":\"\",\"id\":\"1352098365c0efd6c21b2d9037373693\",\"name\":\"Product Info\",\"description\":\"\",\"mode\":\"edit\",\"script\":{\"type\":\"js\",\"code\":\"\"},\"language\":\"en\",\"externalLibs\":\"\",\"printable\":false,\"items\":[[{\"type\":\"text\",\"variable\":\"productName\",\"var_uid\":\"5032625705c0efd7c9ba579087277592\",\"dataType\":\"string\",\"protectedValue\":false,\"id\":\"productName\",\"name\":\"productName\",\"label\":\"Product Name\",\"defaultValue\":\"\",\"placeholder\":\"\",\"hint\":\"\",\"required\":false,\"requiredFieldErrorMessage\":\"\",\"textTransform\":\"none\",\"validate\":\"\",\"validateMessage\":\"\",\"maxLength\":1000,\"formula\":\"\",\"mode\":\"parent\",\"operation\":\"\",\"dbConnection\":\"workflow\",\"dbConnectionLabel\":\"PM Database\",\"sql\":\"\",\"var_name\":\"productName\",\"colSpan\":12}],[{\"type\":\"multipleFile\",\"variable\":\"specFiles\",\"var_uid\":\"3466037925c0efd88a7b0e9026297065\",\"dataType\":\"multiplefile\",\"protectedValue\":false,\"id\":\"specFiles\",\"name\":\"specFiles\",\"label\":\"Spec Files\",\"inputDocument\":\"\",\"required\":false,\"requiredFieldErrorMessage\":\"\",\"dnd\":false,\"extensions\":\"*\",\"size\":1024,\"sizeUnity\":\"MB\",\"enableVersioning\":false,\"mode\":\"parent\",\"multiple\":false,\"inp_doc_uid\":\"\",\"var_name\":\"specFiles\",\"colSpan\":12}],[{\"type\":\"submit\",\"id\":\"submit0000000001\",\"name\":\"submit0000000001\",\"label\":\"Submit\",\"colSpan\":12}]],\"variables\":[{\"var_uid\":\"5032625705c0efd7c9ba579087277592\",\"prj_uid\":\"1841478345c0efd4edb4677090328834\",\"var_name\":\"productName\",\"var_field_type\":\"string\",\"var_field_size\":10,\"var_label\":\"string\",\"var_dbconnection\":\"workflow\",\"var_dbconnection_label\":\"PM Database\",\"var_sql\":\"\",\"var_null\":0,\"var_default\":\"\",\"var_accepted_values\":\"[]\",\"inp_doc_uid\":\"\"},{\"var_uid\":\"3466037925c0efd88a7b0e9026297065\",\"prj_uid\":\"1841478345c0efd4edb4677090328834\",\"var_name\":\"specFiles\",\"var_field_type\":\"multiplefile\",\"var_field_size\":10,\"var_label\":\"multiplefile\",\"var_dbconnection\":\"workflow\",\"var_dbconnection_label\":\"PM Database\",\"var_sql\":\"\",\"var_null\":0,\"var_default\":\"\",\"var_accepted_values\":\"[]\",\"inp_doc_uid\":\"\"}]}]}"
 }

Response

 201 (Created)
{
   "dyn_uid": "17796063752b32090a0e950049957998",
   "dyn_title": "Billing Form",
   "dyn_description": "Form to bill the client",
   "dyn_type": "xmlform",
   "dyn_version": 2,
   "dyn_content": "{\"name\":\"Billing Form\",\"description\":\"Form to bill the client\",\"items\":[{\"type\":\"form\",\"variable\":\"\",\"var_uid\":\"\",\"dataType\":\"\",\"id\":\"17796063752b32090a0e950049957998\",\"name\":\"Product Info\",\"description\":\"\",\"mode\":\"edit\",\"script\":{\"type\":\"js\",\"code\":\"\"},\"language\":\"en\",\"externalLibs\":\"\",\"printable\":false,\"items\":[[{\"type\":\"text\",\"variable\":\"productName\",\"var_uid\":\"5032625705c0efd7c9ba579087277592\",\"dataType\":\"string\",\"protectedValue\":false,\"id\":\"productName\",\"name\":\"productName\",\"label\":\"Product Name\",\"defaultValue\":\"\",\"placeholder\":\"\",\"hint\":\"\",\"required\":false,\"requiredFieldErrorMessage\":\"\",\"textTransform\":\"none\",\"validate\":\"\",\"validateMessage\":\"\",\"maxLength\":1000,\"formula\":\"\",\"mode\":\"parent\",\"operation\":\"\",\"dbConnection\":\"workflow\",\"dbConnectionLabel\":\"PM Database\",\"sql\":\"\",\"var_name\":\"productName\",\"colSpan\":12}],[{\"type\":\"multipleFile\",\"variable\":\"specFiles\",\"var_uid\":\"3466037925c0efd88a7b0e9026297065\",\"dataType\":\"multiplefile\",\"protectedValue\":false,\"id\":\"specFiles\",\"name\":\"specFiles\",\"label\":\"Spec Files\",\"inputDocument\":\"\",\"required\":false,\"requiredFieldErrorMessage\":\"\",\"dnd\":false,\"extensions\":\"*\",\"size\":1024,\"sizeUnity\":\"MB\",\"enableVersioning\":false,\"mode\":\"parent\",\"multiple\":false,\"inp_doc_uid\":\"\",\"var_name\":\"specFiles\",\"colSpan\":12}],[{\"type\":\"submit\",\"id\":\"submit0000000001\",\"name\":\"submit0000000001\",\"label\":\"Submit\",\"colSpan\":12}]],\"variables\":[{\"var_uid\":\"5032625705c0efd7c9ba579087277592\",\"prj_uid\":\"1841478345c0efd4edb4677090328834\",\"var_name\":\"productName\",\"var_field_type\":\"string\",\"var_field_size\":10,\"var_label\":\"string\",\"var_dbconnection\":\"workflow\",\"var_dbconnection_label\":\"PM Database\",\"var_sql\":\"\",\"var_null\":0,\"var_default\":\"\",\"var_accepted_values\":\"[]\",\"inp_doc_uid\":\"\"},{\"var_uid\":\"3466037925c0efd88a7b0e9026297065\",\"prj_uid\":\"1841478345c0efd4edb4677090328834\",\"var_name\":\"specFiles\",\"var_field_type\":\"multiplefile\",\"var_field_size\":10,\"var_label\":\"multiplefile\",\"var_dbconnection\":\"workflow\",\"var_dbconnection_label\":\"PM Database\",\"var_sql\":\"\",\"var_null\":0,\"var_default\":\"\",\"var_accepted_values\":\"[]\",\"inp_doc_uid\":\"\"}]}]}"
}

PHP Example:

$content = '{"name":"Product Info","description":"","items":[{"type":"form","variable":"","var_uid":"","dataType":"","id":"1352098365c0efd6c21b2d9037373693","name":"Product Info","description":"","mode":"edit","script":{"type":"js","code":""},"language":"en","externalLibs":"","printable":false,"items":[[{"type":"text","variable":"productName","var_uid":"5032625705c0efd7c9ba579087277592","dataType":"string","protectedValue":false,"id":"productName","name":"productName","label":"Product Name","defaultValue":"","placeholder":"","hint":"","required":false,"requiredFieldErrorMessage":"","textTransform":"none","validate":"","validateMessage":"","maxLength":1000,"formula":"","mode":"parent","operation":"","dbConnection":"workflow","dbConnectionLabel":"PM Database","sql":"","var_name":"productName","colSpan":12}],[{"type":"multipleFile","variable":"specFiles","var_uid":"3466037925c0efd88a7b0e9026297065","dataType":"multiplefile","protectedValue":false,"id":"specFiles","name":"specFiles","label":"Spec Files","inputDocument":"","required":false,"requiredFieldErrorMessage":"","dnd":false,"extensions":"*","size":1024,"sizeUnity":"MB","enableVersioning":false,"mode":"parent","multiple":false,"inp_doc_uid":"","var_name":"specFiles","colSpan":12}],[{"type":"submit","id":"submit0000000001","name":"submit0000000001","label":"Submit","colSpan":12}]],"variables":[{"var_uid":"5032625705c0efd7c9ba579087277592","prj_uid":"1841478345c0efd4edb4677090328834","var_name":"productName","var_field_type":"string","var_field_size":10,"var_label":"string","var_dbconnection":"workflow","var_dbconnection_label":"PM Database","var_sql":"","var_null":0,"var_default":"","var_accepted_values":"[]","inp_doc_uid":""},{"var_uid":"3466037925c0efd88a7b0e9026297065","prj_uid":"1841478345c0efd4edb4677090328834","var_name":"specFiles","var_field_type":"multiplefile","var_field_size":10,"var_label":"multiplefile","var_dbconnection":"workflow","var_dbconnection_label":"PM Database","var_sql":"","var_null":0,"var_default":"","var_accepted_values":"[]","inp_doc_uid":""}]}]}';

$aVars = array(
   "dyn_title" => "Billing Form",
   "dyn_description" => "Form to bill the client",
   "dyn_type" => "xmlform",
   "dyn_version" => 2,
   "dyn_content" => $content
);
$json = json_encode($aVars);

$processId = '6784841035c2ee7cedbc9c4005687877';
$url = "http://example.com/api/1.0/workflow/project/$processId/dynaform";

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
   "Authorization: Bearer " . $accessToken,
   'Content-Type: application/json',
   'Content-Length: ' . strlen($json)
));
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $json);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$oRet = json_decode(curl_exec($ch));
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);


Create DynaForm from Copy/Import: POST project/{prj_uid}/dynaform

Create a DynaForm using Copy/Import.

POST /api/1.0/{workspace}/project/{prj_uid}/dynaform

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID

Required Fields:

NameTypeDescription
dyn_titleStringDynaform title
dyn_versionIntegerDynaform version
copy_importStringDynaform data to Copy/Import
copy_import . prj_uidStringProject UID
copy_import . dyn_uidStringDynaform UID

Optional Fields:

NameTypeDescription
dyn_descriptionStringDynaform description
dyn_contentStringDynaform content

Result:

TypeDescription
objectReturns an object with the dynaform information and the attribute "dyn_uid"

Example:

Request

 Content-Type: application/json
 {
    "dyn_title": "My DynaForm1",
    "dyn_description": "My DynaForm1 DESCRIPTION",
    "dyn_type": "xmlform",
    "copy_import":
    {
      "prj_uid": "7389179125176dac806d205065699622",
      "dyn_uid": "77941473952b49c65a01a80041727578"
    }
 }

Response

 201 (Created)
 {
    "dyn_uid": "17796063752b32090a0e950049957998",
    "dyn_title": "My DynaForm1",
    "dyn_description": "My DynaForm1 DESCRIPTION",
    "dyn_type": "xmlform"
 }


Create DynaForm from PM Table: project/{prj_uid}/dynaform

Create a DynaForm using the fields in a PM Table.

POST /api/1.0/{workspace}/project/{prj_uid}/dynaform

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID

Required Fields:

NameTypeDescription
dyn_titleStringDynaform title
dyn_versionIntegerDynaform version
pmtableobjectPM Table data
pmtable . tab_uidStringPMTable UID
pmtable . fieldsobjectDefinition of the primary key to register in the PM Table

Optional Fields:

NameTypeDescription
dyn_descriptionStringDynaform description
dyn_contentStringDynaform content

Result:

TypeDescription
objectReturns an object with the dynaform information and the attribute "dyn_uid"

Example:

Request

 Content-Type: application/json
 {
   "dyn_title": "My DynaForm1",
   "dyn_description": "My DynaForm1 DESCRIPTION",
   "dyn_type": "xmlform",
   "pmtable":
   {
     "tab_uid": "72249773552b84ded1d8aa4036518645",
      "fields": [
               {
                     "fld_name": "ID",
                     "pro_variable": "@#APPLICATION"
               }
                ]
   }
 }

Response

 201 (Created)
 {
    "dyn_uid": "17796063752b32090a0e950049957998",
    "dyn_title": "My DynaForm1",
    "dyn_description": "My DynaForm1 DESCRIPTION",
    "dyn_type": "xmlform"
 }


Update DynaForm: PUT project/{prj_uid}/dynaform/{dyn_uid}

Update a DynaForm in a project.

PUT /api/1.0/{workspace}/project/{prj_uid}/dynaform/{dyn_uid}

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID
dyn_uidStringDynaform UID

Optional Fields:

NameTypeDescription
dyn_titleStringDynaform title
dynaform_descriptionStringDynaform description
dyn_typeStringDynaform type
dyn_versionIntegerDynaform version
dyn_contentStringDynaform content

Result:

TypeDescription
emptyNo return

Example:

Request

 Content-Type: application/json
 {
    "dyn_title": "My DynaForm1…",
    "dyn_description": "My DynaForm1 DESCRIPTION…",
    "dyn_type": "xmlform"
 }

Response

 200 (OK)


Delete DynaForm: DELETE project/{prj_uid}/dynaform/{dyn_uid}

Delete a DynaForm in a project.

DELETE /api/1.0/{workspace}/project/{prj_uid}/dynaform/{dyn_uid}

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID
dyn_uidStringDynaform UID

Result:

TypeDescription
emptyNo return

Example:

Response

 200 (OK)

Process Supervisor endpoints

The following are the methods currently implemented for the process supervisor resources of the designer in the ProcessMaker API.

1. Get a list of process supervisors in a project

2. Get a specific process supervisor

3. Get available users and groups to assign as process supervisors

4. Get available groups to assign as process supervisor

5. Get available users to assign as process supervisor

6. Get dynaforms assigned to the process supervisors

7. Get a specific dynaform assigned to the process supervisors

8. Get available dynaforms to assign to the process supervisor

9. Get the input documents assigned to process supervisors

10. Get available input documents to assign to the process supervisors

11. Get an input documents assigned to the process supervisors

12. Assign a user or a group as process supervisor

13. Assign a dynaform to the process supervisors

14. Assign an input document to the process supervisors

15. Remove a user or group from the process supervisors

16. Remove a dynaform from the process supervisors

17. Remove an input document from the process supervisors

18. Update a dynaform of the process supervisors

19. Update an input document of the process supervisor

Supervisor Resources:

NameDescription Type Value
pu_uidUID of the relation with users or groupsStringString Alphanumeric
pu_typeUser typeStringAlphanumeric string: "Supervisor" or "Group_supervisor"
usr_uidUser UIDStringAlphanumeric string
usr_usernameUsernameStringAlphabetic string
usr_firstnameUser first nameStringAlphabetic string
usr_lastnameUser lastnameStringAlphanumeric string
usr_emailUser emailStringAlphanumeric string
grp_uidGroup UIDStringAlphanumeric string
grp_nameGroup nameStringAlphanumeric string
obj_typeTypeStringAlphabetic string "user" or "group"
pud_uidUID that connects the relation with the dynaformStringAlphanumeric string
pud_positionDynaform positionNumberNumeric Value
dyn_uidDynaform UIDStringAlphanumeric string
dyn_titleDynaform nameStringAlphanumeric string
pui_uidUID of the relation with the input documentStringAlphanumeric string
pui_positionInput document positionNumberNumeric Value
inp_doc_uidInput document UIDStringAlphanumeric string
inp_doc__titleInput document titleStringAlphanumeric string

Below you will find the necessary information of each method:

Get Process Supervisors List: GET project/{prj_uid}/process-supervisors

Get a list of Process Supervisors in a project.

GET /api/1.0/{workspace}/project/{prj_uid}/process-supervisors

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID

Result:

TypeDescription
arrayReturns an array of users and groups assigned as process supervisors

Example:

Response

 200 (OK)
 Content-Type: application/json
 [
    {
        "pu_uid": "17802550052cc5973dc7c80089693850",
        "pu_type": "SUPERVISOR",
        "usr_uid": "70798526351ed3cf988be33081236564",
        "usr_username": "jdoe",
        "usr_firstname": "Jhon",
        "usr_lastname": "Doe",
        "usr_email": "jdoe@colosa.com"
    },
    {
        "pu_uid": "08969385017802550052cc5973dc7c80",
        "pu_type": "GROUP_SUPERVISOR",
        "grp_uid": "3cf988be3308123656470798526351ed",
        "grp_name": "Admins"
    }
 ]


Get Process Supervisor: GET project/{prj_uid}/process-supervisor/{pu_uid}

Get a specified process supervisor.

GET /api/1.0/{workspace}/project/{prj_uid}/process-supervisor/{pu_uid}

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProcess UID
pu_uidStringUID that connects the relation with the Dynaform

Result:

TypeDescription
objectReturns an object of the specified process supervisor

Example:

Response

 200 (OK)
 {
    "pu_uid": "17802550052cc5973dc7c80089693850",
    "pu_type": "SUPERVISOR",
    "usr_uid": "70798526351ed3cf988be33081236564",
    "usr_username": "jdoe",
    "usr_firstname": "Jhon",
    "usr_lastname": "Doe",
    "usr_email": "jdoe@colosa.com"
 }


Available users/groups to assign as process supervisors: GET project/{prj_uid}/available-process-supervisors

Get a list of the available users and groups, which may be assigned as Process Supervisors.

GET /api/1.0/{workspace}/project/{prj_uid}/available-process-supervisors

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID

Result:

TypeDescription
arrayReturns an array of available users and groups objects

Example:

Response

 200 (OK)
 Content-Type: application/json
 [
    {
        "grp_uid": "17203362252b88ac7c89213094619445",
        "grp_name": "Web Users",
        "obj_type": "group"
    },
    {
        "usr_uid": "00000000000000000000000000000001",
        "usr_firstname": "Administrator",
        "usr_lastname": "Admin",
        "usr_username": "admin",
        "usr_email": "admin@processmaker.com",
        "obj_type": "user"
    }
 ]


Available groups to assign as process supervisors: GET project/{prj_uid}/available-process-supervisors?obj_type=group

Get available groups to assign as Process Supervisors.

GET /api/1.0/{workspace}/project/{prj_uid}/available-process-supervisors?obj_type=group

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID

Optional Parameters:

NameTypeDescription
obj_typeStringAlphabetic string user or group

Result:

TypeDescription
arrayReturns an array of groups objects

Example:

Response

 200 (OK)
 Content-Type: application/json
 [
    {
        "grp_uid": "17203362252b88ac7c89213094619445",
        "grp_name": "Admins"
    },
    {
        "grp_uid": "52b88ac7c89213094619445172033622",
        "grp_name": "Maganers"
    },
    {
        "grp_uid": "09461944517203362252b88ac7c89213",
        "grp_name": "Web Users"
    }
 ]


Available users to assign as Process Supervisors: GET project/{prj_uid}/available-process-supervisors?obj_type=user

Get a list of the available users to assign as process supervisors.

GET /api/1.0/{workspace}/project/{prj_uid}/available-process-supervisors?obj_type=user

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID

Optional Parameters:

NameTypeDescription
obj_typeStringAlphabetic string user or group

Result:

TypeDescription
arrayReturns an array with one-level data

Example:

Response

 200 (OK)
 Content-Type: application/json
 [
    {
        "usr_uid": "00000000000000000000000000000001",
        "usr_firstname": "Administrator",
        "usr_lastname": "Admin",
        "usr_username": "",
        "usr_email": "admin@colosa.com"
    },
    {
        "usr_uid": "c7c8921309461944517203362252b88a",
        "usr_firstname": "John",
        "usr_lastname": "Doe",
        "usr_username": "jdoe",
        "usr_email": "jdoe@colosa.com"
    }
 ]


Get DynaForms assigned to process supervisors: GET project/{prj_uid}/process-supervisor/dynaforms

Get a list of DynaForms assigned to the process supervisors.

GET /api/1.0/{workspace}/project/{prj_uid}/process-supervisor/dynaforms

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID

Result:

TypeDescription
arrayReturns an array of objects with the dynaforms data

Example:

Response

 200 (OK)
 Content-Type: application/json
 [
    {
        "pud_uid": "57883171852cc5265564b92004742683",
        "pud_position": "1",
        "dyn_uid": "766433290522e23c7941be3033545453",
        "dyn_title": "Dynaform #1"
    },
    {
        "pud_uid": "520047426837883171852cc5265564b9",
        "pud_position": "2",
        "dyn_uid": "23c7941be3033545453766433290522e",
        "dyn_title": "Dynaform #2"
    }
 ]


Get DynaForm assigned to process supervisors: GET project/{prj_uid}/process-supervisor/dynaform/{pud_uid}

Get a specified DynaForm assigned to the Process Supervisors.

GET /api/1.0/{workspace}/project/{prj_uid}/process-supervisor/dynaform/{pud_uid}

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID
pud_uidStringUID that connects the relation with the Dynaform

Result:

TypeDescription
objectReturns an object with the dynaform data

Example:

Response

 200 (OK)
 Content-Type: application/json
 {
    "pud_uid": "57883171852cc5265564b92004742683",
    "pud_position": "1",
    "dyn_uid": "766433290522e23c7941be3033545453",
    "dyn_title": "Dynaform #1"
 }


Available DynaForms to assign to Process Supervisors: GET project/{prj_uid}/process-supervisor/available-dynaforms

Get a list of DynaForms which are available to be assigned to Process Supervisors.

GET /api/1.0/{workspace}/project/{prj_uid}/process-supervisor/available-dynaforms

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID

Result:

TypeDescription
arrayReturns an array of objects with the dynaform data

Example:

Response

 200 (OK)
 Content-Type: application/json
 [
    {
        "dyn_uid": "2e23c7941be303354545376643329052",
        "dyn_title": "Dynaform #3"
    },
    {
        "dyn_uid": "9200474268357883171852cc5265564b",
        "dyn_title": "Dynaform #4"
    }
 ]


Get Input Documents assigned to Process Supervisors: GET project/{prj_uid}/process-supervisor/input-documents

Get a list of Input Documents assigned to the Process Supervisors.

GET /api/1.0/{workspace}/project/{prj_uid}/process-supervisor/input-documents

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID

Result:

TypeDescription
arrayReturns an array of objects with the input documents data

Example:

Response

 200 (OK)
 Content-Type: application/json
 [
    {
        "pui_uid": "57883171852cc5265564b92004742683",
        "pui_position": "1",
        "input_doc_uid": "766433290522e23c7941be3033545453",
        "input_doc_title": "Input Document #1"
    },
    {
        "pui_uid": "520047426837883171852cc5265564b9",
        "pui_position": "2",
        "input_doc_uid": "23c7941be3033545453766433290522e",
        "input_doc_title": "Input Document #2"
    }
 ]


Available Input Documents to assign to Process Supervisors: GET project/{prj_uid}/process-supervisor/available-input-documents

Get the available input documents to assign to the Process Supervisors.

GET /api/1.0/{workspace}/project/{prj_uid}/process-supervisor/available-input-documents

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID

Result:

TypeDescription
arrayReturns an array of objects with the available input documents data

Example:

Response

 200 (OK)
 Content-Type: application/json
 [
    {
        "inp_doc_uid": "2e23c7941be303354545376643329052",
        "inp_doc_title": "Input Document #3"
    },
    {
        "inp_doc_uid": "3766433290522e23c7941be303354545",
        "inp_doc_title": "Input Document #4"
    }
 ]


Get Input Document assigned to Process Supervisors: GET project/{prj_uid}/process-supervisor/input-documents/{pui_uid}

Get an Input Document assigned to the Process Supervisors.

GET /api/1.0/{workspace}/project/{prj_uid}/process-supervisor/input-documents/{pui_uid}

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID
pui_uidStringUID of the relation with the input document

Result:

TypeDescription
objectReturns an object with the input document data

Example:

Response

 200 (OK)
 {
    "pui_uid": "520047426837883171852cc5265564b9",
    "pui_position": "2",
    "input_doc_uid": "23c7941be3033545453766433290522e",
    "input_doc_title": "Input Document #2"
 }


Assign a user/group as process supervisor: POST project/{prj_uid}/process-supervisor

Assign a user or group as a process supervisor.

POST /api/1.0/{workspace}/project/{prj_uid}/process-supervisor

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID

Required Fields:

NameTypeDescription
pu_typeStringSpecifies whether it is a user (pu_type = SUPERVISOR) or group (pu_type = GROUP_SUPERVISOR)
usr_uid / grp_uidStringUser UID / Group UID

Optional Fields:

NameTypeDescription
usr_usernameStringUsername
usr_firstnameStringUser firstname
usr_lastnameStringUser lastname
usr_emailStringUser email
grp_nameStringGroup name
obj_typeStringAlphabetic string user or group

Result:

TypeDescription
objectReturns an object with data of the relation user/group - supervisor

Example:

Request

 Content-Type: application/json
 {
    "pu_type": "SUPERVISOR",
    "usr_uid": "70798526351ed3cf988be33081236564",
 }

Response

 201 (Created)
 {
    "pu_uid": "17802550052cc5973dc7c80089693850",
    "pu_type": "SUPERVISOR",
    "usr_uid": "70798526351ed3cf988be33081236564",
    "usr_username": "jdoe",
    "usr_firstname": "Jhon",
    "usr_lastname": "Doe",
    "usr_email": "jdoe@colosa.com"
 }


Assign DynaForm to Process Supervisors: POST project/{prj_uid}/process-supervisor/dynaform

Assign a DynaForm to a Process Supervisor.

POST /api/1.0/{workspace}/project/{prj_uid}/process-supervisor/dynaform

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID

Required Fields:

NameTypeDescription
dyn_uidStringDynaform UID

Optional Fields:

NameTypeDescription
pud_positionStringPosition

Result:

TypeDescription
objectReturns an object with the information of the relation with the dynaform

Example:

Request

 Content-Type: application/json
 {
    "pud_position": "1",
    "dyn_uid": "766433290522e23c7941be3033545453",
 }

Response

 201 (Created)
 {
    "pud_uid": "57883171852cc5265564b92004742683",
    "pud_position": "1",
    "dyn_uid": "766433290522e23c7941be3033545453",
    "dyn_title": "Dynaform #1"
 }


Assign Input Document to Process Supervisor: POST project/{prj_uid}/process-supervisor/input-document

Assign an input document to a Process Supervisor.

POST /api/1.0/{workspace}/project/{prj_uid}/process-supervisor/input-document

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID

Required Fields:

NameTypeDescription
inp_doc_uidStringInput Document UID

Optional Fields:

NameTypeDescription
pui_positionStringPosition

Result:

TypeDescription
objectReturns an object with information of the relation with the input document

Example:

Request

 Content-Type: application/json
 {
    "pui_position": "1",
    "input_doc_uid": "766433290522e23c7941be3033545453",
 }

Response

 201 (Created)
 {
    "pui_uid": "57883171852cc5265564b92004742683",
    "pui_position": "1",
    "input_doc_uid": "766433290522e23c7941be3033545453",
    "input_doc_title": "Input Document #1"
 }


Remove user/group from Process Supervisors: DELETE project/{prj_uid}/process-supervisor/{pu_uid}

Remove a user or group from the Process Supervisors.

DELETE /api/1.0/{workspace}/project/{prj_uid}/process-supervisor/{pu_uid}

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID
pu_uidStringRelation UID with the user or group

Result:

TypeDescription
emptyNo return

Example:

Response

 200 (OK)


Remove DynaForm from Process Supervisors: DELETE project/{prj_uid}/process-supervisor/dynaform/{pud_uid}

Remove a DynaForm from the Process Supervisors.

DELETE /api/1.0/{workspace}/project/{prj_uid}/process-supervisor/dynaform/{pud_uid}

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID
pu_uidStringRelation UID with the dynaform

Result:

TypeDescription
emptyNo return

Example:

Response

 200 (OK)


Remove Input Document from Process Supervisors: DELETE project/{prj_uid}/process-supervisor/input-document/{pui_uid}

Remove an Input Document from the Process Supervisors.

DELETE /api/1.0/{workspace}/project/{prj_uid}/process-supervisor/input-document/{pui_uid}

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID
pu_uidStringRelation UID with the input document

Result:

TypeDescription
emptyNo return

Example:

Response

 200 (OK)


Update DynaForm assigned to the Process Supervisors: PUT project/{prj_uid}/process-supervisor/dynaform/{pu_uid}

Update a DynaForm assigned to the Process Supervisors.

PUT /api/1.0/{workspace}/project/{prj_uid}/process-supervisor/dynaform/{pu_uid}

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID
pu_uidStringRelation UID with the dynaform

Optional Fields:

NameTypeDescription
pud_positionStringDynaform position

Result:

TypeDescription
objectReturns an object with the new information of the relation with the dynaform

Example:

Request

 Content-Type: application/json
 {
         "pud_position":1
 }

Response

 200 (OK)
  {
    "pui_uid": "57883171852cc5265564b92004742683",
    "pud_position": "1",
    "dyn_uid": "766433290522e23c7941be3033545453",
    "dyn_title": "Dynaform #1"
  }


Update Input Document assigned to Process Supervisors: PUT project/{prj_uid}/process-supervisor/input-document/{pu_uid}

Update an input document assigned to the Process Supervisors.

PUT /api/1.0/{workspace}/project/{prj_uid}/process-supervisor/input-document/{pu_uid}

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID
pu_uidStringRelation UID

Optional Fields:

NameTypeDescription
pui_positionStringInput document position

Result:

TypeDescription
objectReturns an object

Example:

Request

 Content-Type: application/json
 {
         "pud_position":1
 }

Response

 200 (OK)
 {
    "pui_uid": "57883171852cc5265564b92004742683",
    "pud_position": "1",
    "dyn_uid": "766433290522e23c7941be3033545453",
    "dyn_title": "Dynaform #1"
 }

Database Connections

The following are the methods currently implemented for data connections of the designer in the ProcessMaker API.

1. Get a list of database connections in a project

2. Get a single database connection of a project

3. Create a new database connection for a project.

4. Test database connection of a project

5. Update a database connection in a project

6. Delete a database connection of a project

Database Connections:

Name Description Type Value
dbs_uidDatabase connection UIDStringString with the database connection UID
dbs_typeDatabase typeString"mysql" (String verified with the DB engine type)
dbs_serverAddress of the database serverString“192.168.11.4” (String)
dbs_database_nameDatabase nameString"mydatabase" (Alphanumeric string)
dbs_usernameUsername in database serverString"root" (Alphanumeric string)
dbs_portDatabase server portString"3306" (Numeric)
dbs_encodeDatabase encodingString"utf8" (Alphanumeric string)
dbs_passwordDatabase server user password (This field is checked by type Database "dbs_type")String"root" (string verified with the types of encoding as "dbs_type")
dbs_descriptionDescription of the connection to the databaseString"My new database" (Alphanumeric string)

Below you will find the necessary information of each method:

Get Database Connections List: GET project/{prj_uid}/database-connections

Get a list of the database connections in a project.

GET /api/1.0/{workspace}/project/{prj_uid}/database-connections

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID

Result:

TypeDescription
arrayReturns an array of database connection objects

Example:

Response

 200 (OK)
 Content-Type: application/json
 [
  {
     "dbs_uid": "17969179752e27c4b3027c3006962937",
     "pro_uid": "444446641528a7318e16744023753627",
     "dbs_type": "mysql",
     "dbs_server": "192.168.11.71",
     "dbs_database_name": "wf_test",
     "dbs_username": "root",
     "dbs_password": "password",
     "dbs_port": 3306,
     "dbs_encode": "utf8",
     "dbs_description": "My database connection description"
  },
  {
     "dbs_uid": "41091498852e27cab755345053537160",
     "pro_uid": "444446641528a7318e16744023753627",
     "dbs_type": "mysql",
     "dbs_server": "192.168.11.71",
     "dbs_database_name": "wf_test1",
     "dbs_username": "root",
     "dbs_password": "password",
     "dbs_port": 3306,
     "dbs_encode": "utf8",
     "dbs_description": "My database connection description"
   }
 ]

Get Database Connection: GET project/{prj_uid}/database-connection/{dbs_uid}

Get information about a database connection.

GET /api/1.0/{workspace}/project/{prj_uid}/database-connection/{dbs_uid}

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProcess UID
dbs_uidStringDatabase UID

Result:

TypeDescription
objectReturns an object with the database connection data

Example:

Response

 200 (OK)
 Content-Type: application/json
 {
     "dbs_uid": "41091498852e27cab755345053537160",
     "pro_uid": "444446641528a7318e16744023753627",
     "dbs_type": "mysql",
     "dbs_server": "192.168.11.71",
     "dbs_database_name": "wf_test",
     "dbs_username": "root",
     "dbs_password": "password",
     "dbs_port": 3306,
     "dbs_encode": "utf8",
     "dbs_description": "My database connection description"
 }

Create Database Connection: POST project/{prj_uid}/database-connection

Create a new Database Connection.

POST /api/1.0/{workspace}/project/{prj_uid}/database-connection

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID

Required Fields:

NameTypeDescription
dbs_typeStringDatabase type
dbs_serverStringAddress of the database server
dbs_database_nameStringDatabase name
dbs_portIntegerDatabase server port
dbs_encodeStringEncoding Database

Optional Fields:

NameTypeDescription
db_usernameStringDatabase username
dbs_passwordStringUser password of the database server (This field is checked by type Database "dbs_type")
dbs_descriptionStringDescription of the database connection

Result:

TypeDescription
objectReturns an object with information of the new database connection

Example:
Request

 Content-Type: application/json
 {
    "dbs_uid": "97821011252e67eb4c6c5d7069642907"
    "pro_uid": "444446641528a7318e16744023753627"
    "dbs_type": "mysql",
    "dbs_server": "192.168.56.11",
    "dbs_database_name": "My database",
    "dbs_username": "root",
    "dbs_password": "sample",
    "dbs_port": 3306,
    "dbs_encode": "utf8",
    "dbs_description": "Database description"
}

Response

 {
    "dbs_type": "mysql",
    "dbs_server": "192.168.56.11",
    "dbs_database_name": "My database",
    "dbs_username": "root",
    "dbs_password": "sample",
    "dbs_port": 3306,
    "dbs_encode": "utf8",
    "dbs_description": "Database description"
 }

Test Database Connection: POST project/{prj_uid}/database-connection/test

Test a Database Connection with the provided settings.

POST /api/1.0/{workspace}/project/{prj_uid}/database-connection/test

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID

Required Fields:

NameTypeDescription
dbs_typeStringDatabase type
dbs_serverStringAddress of the database server
dbs_database_nameStringDatabase name
dbs_portIntegerDatabase server port
dbs_encodeStringEncoding Database

Optional Fields:

NameTypeDescription
db_usernameStringDatabase username
dbs_passwordStringUser password of the database server (This field is checked by type Database "dbs_type")
dbs_descriptionStringDescription of the database connection

Result:

TypeDescription
arrayReturns an array of objects with the connection information

Example:
Request

 Content-Type: application/json
 {
    "dbs_type": "mysql",
    "dbs_server": "192.168.56.11",
    "dbs_database_name": "My database",
    "dbs_username": "root",
    "dbs_password": "sample",
    "dbs_port": 3306,
    "dbs_encode": "utf8",
    "dbs_description": "Database description"
}

Response

 201 (Created)
 [
   {
      "test": "Resolving Host Name 192.168.11.79"
   },
   {
      "test": "Checking port 3306",
      "error": "Error Testing Connection: Checking port FAILED : Destination Port Unreachable"
   },
   {
      "test": "Trying to connect to host 192.168.11.79:3306",
      "error": "Error Testing Connection: Trying to connect to host FAILED : Destination Port Unreachable"
   },
   {
      "test": "Trying to open database [wf_jc]",
      "error": "Error Testing Connection: Trying to open database FAILED : Destination Port Unreachable"
   }
 ]

Update Database Connection: PUT project/{prj_uid}/database-connection/{dbs_uid}

Update a database connection with the provided settings.

PUT /api/1.0/{workspace}/project/{prj_uid}/database-connection/{dbs_uid}

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID
dbs_uidStringDatabase connection UID

Required Fields:

NameTypeDescription
dbs_typeStringDatabase type
dbs_serverStringAddress of the database server
dbs_database_nameStringDatabase name
dbs_portIntegerDatabase server port
dbs_encodeStringEncoding Database

Optional Fields:

NameTypeDescription
db_usernameStringDatabase username
dbs_passwordStringUser password of the database server (This field is checked by type Database "dbs_type")
dbs_descriptionStringDescription of the database connection

Result:

TypeDescription
emptyNo return

Example:

Request

 Content-Type: application/json
 {
     "dbs_type": "mysql",
     "dbs_server": "192.168.56.11",
     "dbs_database_name": "My database",
     "dbs_username": "root",
     "dbs_port": 3306,
     "dbs_encode": "utf8",
     "dbs_description": "Changing the description"
 }

Response

 200 (OK)

Delete Database Connection: DELETE project/{prj_uid}/database-connection/{dbs_uid}

Delete the specified Database Connection.

DELETE /api/1.0/{workspace}/project/{prj_uid}/database-connection/{dbs_uid}

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID
dbs_uidStringRelation UID

Result:

TypeDescription
emptyNo return

Example:

Response

 200 (OK)

Case Scheduler endpoints

The following are the methods currently implemented for the case scheduler resources of the designer in the ProcessMaker API.

1. Get all case schedulers in a project

2. Get a specific case scheduler of a project

3. Create a new case scheduler for a project

4. Update a case scheduler in a project

5. Delete a case scheduler of a project

Case Scheduler resources:

NameDescriptionType Value
sch_uidCase scheduler UIDStringString with the case scheduler UID
sch_optionOption of the period in which the case will be activeNumber1. Daily 2. Weekly 3. Monthly 4. One time only 5. Every
sch_nameCase scheduler nameStringString
sch_del_user_nameUsernameStringString
sch_del_user_passUser passwordStringString
tas_uidTask UIDStringAlphanumeric string
sch_start_timeStart time of the taskDateHH: MM.
sch_start_dateStart date of the taskDateYYYY-mm-dd.
sch_every_daysSpecific number of every how many days the case scheduler will triggerIntegerInteger
sch_week_daysWeekdaysInteger1.Monday 2.Tuesday 3.Wednesday 4.Thursday 5.Friday 6.Saturday 7.Sunday separated by pipeline. E.g. 1|2|3
sch_start_dayInitial optionInteger1. Day of month or 2. The day.
sch_start_day_opt_1Day of the monthInteger1 to 31.
sch_start_day_opt_2Compound dataStringTwo separated data by pipeline. The first 1.First 2.Second 3.Third 4.Fourth 5.Last. The second 1.Monday 2.Tuesday 3.Wednesday 4.Thursday 5.Friday 6.Saturday 7.Sunday. E.g. 1|7
sch_monthsMonthsIntegerE.g. Separated by pipeline 1|2|3
sch_end_dateEnd date of the taskDateYYYY-mm-dd.
sch_repeat_everyHours for the case scheduler to be repeatedDateHH. MM.
sch_repeat_untilRepeat untilStringString
sch_repeat_stop_if_runningStop whenStringString
case_sh_plugin_uidPlugin UIDStringString
sch_time_next_runNext execution dateDateYYYY-mm-dd HH:MM:SS.
sch_last_run_timeLast execution dateStringYYYY-mm-dd HH:MM:SS.
sch_stateCurrent statusStringString
sch_last_statePrevious statusStringString
usr_uidCurrently logged userStringString

Get Case Schedulers List: GET project/{prj_uid}/case-schedulers

Get a list of the case schedulers in a project.

GET /api/1.0/{workspace}/project/{prj_uid}/case-schedulers

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID

Result:

TypeDescription
arrayReturns an array of objects with the case schedulers information

Example:

Response

 200 (OK)
 [
  {
    "sch_uid": "32034912252d93011706986023277342",
    "sch_name": "Test scheduler POST",
    "sch_del_user_name": "admin",
    "sch_del_user_uid": "00000000000000000000000000000001",
    "pro_uid": "1265557095225ff5c688f46031700471",
    "tas_uid": "46941969352af5be2ab3f39001216717",
    "sch_time_next_run": "2014-01-17 18:00:00",
    "sch_last_run_time": "2014-01-16 18:00:00",
    "sch_state": "ACTIVE",
    "sch_last_state": "CREATED",
    "usr_uid": "00000000000000000000000000000001",
    "sch_option": "1",
    "sch_start_time": "2014-01-17 18:00:00",
    "sch_start_date": "2014-01-19 00:00:00",
    "sch_days_perform_task": "1|1",
    "sch_every_days": "0",
    "sch_week_days": "1|2|3|4|5|6|7",
    "sch_start_day": "1",
    "sch_months": "1|2|3|4|5|6|7|8|9|10|11|12",
    "sch_end_date": "2014-01-19 00:00:00",
    "sch_repeat_every": "1",
    "sch_repeat_until": "1",
    "sch_repeat_stop_if_running": "0",
    "case_sh_plugin_uid": null
  },
  {
    "sch_uid": "32034912252d93011706986023277342",
    "sch_name": "Test scheduler POST 2",
    "sch_del_user_name": "admin",
    "sch_del_user_uid": "00000000000000000000000000000001",
    "pro_uid": "1265557095225ff5c688f46031700471",
    "tas_uid": "46941969352af5be2ab3f39001216717",
    "sch_time_next_run": "2014-01-17 18:00:00",
    "sch_last_run_time": "2014-01-16 18:00:00",
    "sch_state": "ACTIVE",
    "sch_last_state": "CREATED",
    "usr_uid": "00000000000000000000000000000001",
    "sch_option": "1",
    "sch_start_time": "2014-01-17 18:00:00",
    "sch_start_date": "2014-01-19 00:00:00",
    "sch_days_perform_task": "1|1",
    "sch_every_days": "0",
    "sch_week_days": "1|2|3|4|5|6|7",
    "sch_start_day": "1",
    "sch_months": "1|2|3|4|5|6|7|8|9|10|11|12",
    "sch_end_date": "2014-01-19 00:00:00",
    "sch_repeat_every": "1",
    "sch_repeat_until": "1",
    "sch_repeat_stop_if_running": "0",
    "case_sh_plugin_uid": null
  }
 ]

Get Case Scheduler: GET project/{prj_uid}/case-scheduler/{sch_uid}

Get a specified case scheduler.

GET /api/1.0/{workspace}/project/{prj_uid}/case-scheduler/{sch_uid}

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID
sch_uidStringCase scheduler UID

Result:

TypeDescription
objectReturns a case scheduler object

Example:

Response

 200 (OK)
 {
    "sch_uid": "32034912252d93011706986023277342",
    "sch_name": "Test scheduler POST 2",
    "sch_del_user_name": "admin",
    "sch_del_user_uid": "00000000000000000000000000000001",
    "pro_uid": "1265557095225ff5c688f46031700471",
    "tas_uid": "46941969352af5be2ab3f39001216717",
    "sch_time_next_run": "2014-01-17 18:00:00",
    "sch_last_run_time": "2014-01-16 18:00:00",
    "sch_state": "ACTIVE",
    "sch_last_state": "CREATED",
    "usr_uid": "00000000000000000000000000000001",
    "sch_option": "1",
    "sch_start_time": "2014-01-17 18:00:00",
    "sch_start_date": "2014-01-19 00:00:00",
    "sch_days_perform_task": "1|1",
    "sch_every_days": "0",
    "sch_week_days": "1|2|3|4|5|6|7",
    "sch_start_day": "1",
    "sch_months": "1|2|3|4|5|6|7|8|9|10|11|12",
    "sch_end_date": "2014-01-19 00:00:00",
    "sch_repeat_every": "1",
    "sch_repeat_until": "1",
    "sch_repeat_stop_if_running": "0",
    "case_sh_plugin_uid": null
 }

Create Case Scheduler: POST project/{prj_uid}/case-scheduler

Create a new Case Scheduler.

POST /api/1.0/{workspace}/project/{prj_uid}/case-scheduler

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID

Required Fields:

NameTypeDescription
sch_optionNumberOption of the period the case scheduler will be activated in the case
sch_start_time (Mandatory when sch_option=1,2,3, or 4)DateTask start time
sch_start_date (Mandatory when sch_option=1,2,3, or 4)DateTask start date
sch_week_days (Mandatory when sch_option=2)IntegerDays of the week (1-7, they may go separated by a pipeline)
sch_start_day (Mandatory when sch_option=3)IntegerDays of the week (1. Day of the month, 2. The day)
sch_start_day_opt_1 (Mandatory when sch_start_day=1)IntegerDays of the month (1-30)
sch_start_day_opt_2 (Mandatory when sch_start_day=2)IntegerCompound data. (Check their definitions in the main table)
sch_months (Mandatory when sch_option=3)IntegerMonths
sch_end_date (Mandatory when sch_option=1,2 or 3)DateEnd date of the task
sch_repeat_every (Mandatory when sch_option=5)DateHours for the case scheduler to be repeated
sch_nameStringCase scheduler name
sch_del_user_nameStringCase scheduler username
tas_uidStringTask UID

Optional Fields:

NameTypeDescription
sch_del_user_passStringCase scheduler password
sch_repeat_untilStringRepeat until
sch_repeat_stop_if_runningIntegerStop when
case_sh_plugin_uidStringPlugin UID
sch_stateStringCurrent status
sch_last_stateStringPrevious status

Result:

TypeDescription
objectReturns an object with data of the new case scheduler

Example:

Request

 Content-Type: application/json
 {
    "sch_option": "3",
    "sch_name": "Test scheduler POST",
    "sch_del_user_name": "admin",
    "tas_uid": "46941969352af5be2ab3f39001216717",
    "sch_start_time": "15:00",
    "sch_start_date": "2014-01-16",
    "sch_week_days": "1|2|3|4|5|6|7",
    "sch_start_day": "1",
    "sch_start_day_opt_1": "1",
    "sch_start_day_opt_2": "1|2",
    "sch_months": "1|2|3|4|5|6|7|8|9|10|11|12",
    "sch_end_date": "2014-01-19",
    "sch_repeat_every": "22.00"
 }

Response

 201 (Created)
 {
    "sch_uid": "32034912252d93011706986023277342",
    "sch_name": "Test scheduler POST 2",
    "sch_del_user_name": "admin",
    "sch_del_user_uid": "00000000000000000000000000000001",
    "pro_uid": "1265557095225ff5c688f46031700471",
    "tas_uid": "46941969352af5be2ab3f39001216717",
    "sch_time_next_run": "2014-01-17 18:00:00",
    "sch_last_run_time": "2014-01-16 18:00:00",
    "sch_state": "ACTIVE",
    "sch_last_state": "CREATED",
    "usr_uid": "00000000000000000000000000000001",
    "sch_option": "1",
    "sch_start_time": "2014-01-17 18:00:00",
    "sch_start_date": "2014-01-19 00:00:00",
    "sch_days_perform_task": "1|1",
    "sch_week_days": "1|2|3|4|5|6|7",
    "sch_start_day": "1",
    "sch_months": "1|2|3|4|5|6|7|8|9|10|11|12",
    "sch_end_date": "2014-01-19 00:00:00",
    "sch_repeat_every": "22.00",
    "sch_repeat_until": "",
    "sch_repeat_stop_if_running": "0",
    "case_sh_plugin_uid": null
 }

Update Case Scheduler: PUT project/{prj_uid}/case-scheduler/{sch_uid}

Update a Case Scheduler.

PUT /api/1.0/{workspace}/project/{prj_uid}/case-scheduler/{sch_uid}

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID
sch_uidStringCase scheduler UID

Required Fields:

NameTypeDescription
sch_optionNumberOption of the period the case scheduler will be activated in the case
sch_nameStringCase scheduler name
sch_del_user_nameStringCase scheduler username
tas_uidStringTask UID
sch_stateStringCase scheduler status
sch_start_time (Mandatory when sch_option=1,2,3, or 4)DateTask start time
sch_start_date (Mandatory when sch_option=1,2,3, or 4)DateTask start date
sch_week_days (Mandatory when sch_option=2)IntegerDays of the week (1-7, they may go separated by a pipeline)
sch_start_day (Mandatory when sch_option=3)IntegerDays of the week (1. Day of the month, 2. The day)
sch_start_day_opt_1 (Mandatory when sch_start_day=1)IntegerDays of the month (1-30)
sch_start_day_opt_2 (Mandatory when sch_start_day=2)IntegerCompound data. (View their definitions in the main table)
sch_months (Mandatory when sch_option=3)IntegerMonths
sch_end_date (Mandatory when sch_option=1,2 or 3)DateEnd date of the task
sch_repeat_every (Mandatory when sch_option=5)DateHours for the case scheduler to be repeated

Optional Fields:

NameTypeDescription
sch_del_user_passStringCase scheduler password
sch_repeat_untilStringRepeat until
sch_repeat_stop_if_runningIntegerStop when
case_sh_plugin_uidStringPlugin UID
sch_last_stateStringPrevious status

Result:

TypeDescription
objectReturns an object with the case scheduler new information

Example:

Request

 Content-Type: application/json
 {
    "sch_name": "Test scheduler PUT",
    "sch_del_user_name": "admin",
    "sch_del_user_pass": "admin",
    "tas_uid": "46941969352af5be2ab3f39001216717",
    "sch_start_time": "15:00",
    "sch_start_date": "2014-01-16",
    "sch_week_days": "1|2|3|4|5|6|7",
    "sch_start_day": "1",
    "sch_start_day_opt_1": "1",
    "sch_start_day_opt_2": "1|2",
    "sch_months": "1|2|3|4|5|6|7|8|9|10|11|12"
    "sch_end_date": "2014-01-19",
    "sch_repeat_every": "11.00",
    "sch_state": "ACTIVE"
    "sch_option": "1"
 }

Response

 200 (OK)
 {
    "sch_uid": "32034912252d93011706986023277342",
    "sch_name": "Test scheduler POST 2",
    "sch_del_user_name": "admin",
    "sch_del_user_pass": "7a5a743821232f297a594a0e4a801fc3",
    "sch_del_user_uid": "00000000000000000000000000000001",
    "pro_uid": "1265557095225ff5c688f46031700471",
    "tas_uid": "46941969352af5be2ab3f39001216717",
    "sch_time_next_run": "2014-01-17 18:00:00",
    "sch_last_run_time": "2014-01-16 18:00:00",
    "sch_state": "ACTIVE",
    "sch_last_state": "CREATED",
    "usr_uid": "00000000000000000000000000000001",
    "sch_option": "1",
    "sch_start_time": "2014-01-17 18:00:00",
    "sch_start_date": "2014-01-19 00:00:00",
    "sch_days_perform_task": "1|1",
    "sch_week_days": "1|2|3|4|5|6|7",
    "sch_start_day": "1",
    "sch_months": "1|2|3|4|5|6|7|8|9|10|11|12",
    "sch_end_date": "2014-01-19 00:00:00",
    "sch_repeat_every": "1",
    "sch_repeat_until": "1",
    "sch_repeat_stop_if_running": "0",
    "case_sh_plugin_uid": null
 }

Delete Case Scheduler: DELETE project/{prj_uid}/case-scheduler/{sch_uid}

Delete a Case Scheduler.

DELETE /api/1.0/{workspace}/project/{prj_uid}/case-scheduler/{sch_uid}

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID
sch_uidStringCase scheduler UID

Result:

TypeDescription
emptyNo return

Example:

Response

  200 (OK)

Process Permission endpoints

The following are the methods currently implemented for the process permission resources of the designer in the ProcessMaker API.

1. Get all process permissions of the project

2. Get a process permission of the project

3. Create a new process permission for a project

4. Update a process permission in the project

5. Delete a process permission of the project

Process Permission resources:

NameDescriptionType Value
op_uidProcess permission UIDString"h3kj231..." (String)
usr_uidUser or group which will get the permission (value depends on "Op_user_relation")String"h3kj231..." (user or group UID)
op_user_relationValue to determine if the permission will be set to a user or a group (1 =user, 2 = group)String"1" or "2" (unique values)
op_case_statusThe case status which will get the permissionString"ALL" or "DRAFT" or "TO_DO" or "PAUSED" or "COMPLETED" or (unique values)
op_participateValue to enable the permission for the user who participated or not in the case (0 = did not participate, 1 = participated)String"0" or "1" (unique values)
opt_obj_typeValue for the type of object of the permissionString"ANY" or "DYNAFORM" OR "INPUT" "OUTPUT" "CASES_NOTES" "MSGS_HISTORY" (unique values)
op_actionType of action of the assigned permissionString"BLOCK" or "VIEW" or "DELETE" (unique values)
tas_uidValue of the objective task UID of the permission.String"h3kj231..." (task UID)
op_task_sourceValue of the origin task UID of the permission.String"h3kj231..." (task UID)
dynaformsValue of the dynaform UID of the permission (Only takes into account that field when the value of "op_obj_type" is "DYNAFORM"String"h3kj231..." (Dynaform UID)
inputsValue of the input permission UID (Only takes into account that field when the value of "op_obj_type" is "INPUT")Integer"h3kj321..." (Input UID)
outputsValue of the output permission UID (Only takes in account the field when the "op_obj_type" value is "OUTPUT")Integer"h3kj321..." (Output UID)

Get Process Permissions List: GET project/{prj_uid}/process-permissions

Get a list of the Process Permissions in a project.

GET /api/1.0/{workspace}/project/{prj_uid}/process-permissions

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID

Result:

TypeDescription
arrayReturns an array of the process permissions objects

Example:

Response

 200 (OK)
 [
    {
      "op_uid": "48370777252dec9d6cbf645068319750",
      "pro_uid": "251815090529619a99a2bf4013294414",
      "tas_uid": "",
      "usr_uid": "35762872152cda4323207c6035916735",
      "op_user_relation": "2",
      "op_task_source": "",
      "op_participate": "1",
      "op_obj_type": "any",
      "op_obj_uid": "",
      "op_action": "view",
      "op_case_status": "all",
      "task_target": "all tasks",
      "group_user": "accounting",
      "task_source": "all tasks",
      "object_type": "all",
      "object": "all",
      "participated": "yes",
      "action": "view"
    },
    {
   "op_uid": "69838576352dec9fa91c316052065643",
   "pro_uid": "251815090529619a99a2bf4013294414",
    "tas_uid": "95655319552a5c790b69a04054667879",
   "usr_uid": "20972963752cda4006d1676029328277",
        "op_user_relation": "1",
        "op_task_source": "95655319552a5c790b69a04054667879",
        "op_participate": "0",
        "op_obj_type": "dynaform",
        "op_obj_uid": "41320210152964e39d34c91015371856",
        "op_action": "block",
        "op_case_status": "draft",
        "task_target": "task 2",
        "group_user": "adam corey (adam)",
        "task_source": "task 2",
        "object_type": "dynaform",
        "object": "eede",
        "participated": "no",
        "action": "block"
    }
 ]

Get Process Permission: GET project/{prj_uid}/process-permission/{op_uid}

Get a specified Process Permission.

GET /api/1.0/{workspace}/project/{prj_uid}/process-permission/{op_uid}

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID
op_uidStringProcess Permission UID

Result:

TypeDescription
objectReturns an object of the process permission

Example:

Response

 200 (OK)
 [
     "op_uid": "69838576352dec9fa91c316052065643",
     "pro_uid": "251815090529619a99a2bf4013294414",
     "tas_uid": "95655319552a5c790b69a04054667879",
     "usr_uid": "20972963752cda4006d1676029328277",
     "op_user_relation": "1",
     "op_task_source": "95655319552a5c790b69a04054667879",
     "op_participate": "0",
     "op_obj_type": "dynaform",
     "op_obj_uid": "41320210152964e39d34c91015371856",
     "op_action": "block",
     "op_case_status": "draft",
     "task_target": "task 2",
     "group_user": "adam corey (adam)",
     "task_source": "task 2",
     "object_type": "dynaform",
     "object": "eede",
     "participated": "no",
     "action": "block"
 ]

Create Process Permission: POST project/{prj_uid}/process-permission

Create a new Process Permission for a project.

POST /api/1.0/{workspace}/project/{prj_uid}/process-permission

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID

Required Fields:

NameTypeDescription
op_user_relationStringDetermines if the permission is assigned to a user or to a group 1 = user, 2 = group
usr_uidStringUser or group that will have the permission. It depends on op_user_relation
op_actionStringType of action assigned in the permission
op_case_statusStringThe case status which will get permission
op_participateString0 = Not participated, 1 = Participated
op_obj_typeStringValue for the object type of permission

Optional Fields:

NameTypeDescription
tas_uidStringTask value UID, permission target
op_task_sourceStringTask value UID, permission source
dynaformsStringDynaform value UID of the permission (Only takes account the field when the value of "It op_obj_type" is "DYNAFORM"
inputsIntegerValue of the ID of the input Permission (Only takes into account that field when the value of "op_obj_type" is "INPUT")
outputsIntegerThe output value of the ID Permission (Only takes into account that field when the value of "op_obj_type" is "OUTPUT")

Result:

TypeDescription
objectReturns an object with the information of the new permission

Example:

Request

 Content-Type: application/json
 {
     "tas_uid": "",
     "usr_uid": "00000000000000000000000000000001",
     "op_user_relation": "1",
     "op_obj_type": "ANY",
     "op_task_source" : "",
     "op_participate": "0",
     "op_action": "BLOCK",
     "op_case_status": "DRAFT"
 }

Response

 201 (Created)
 [
     "op_uid": "69838576352dec9fa91c316052065643",
     "pro_uid": "251815090529619a99a2bf4013294414",
     "tas_uid": "95655319552a5c790b69a04054667879",
     "usr_uid": "20972963752cda4006d1676029328277",
     "op_user_relation": "1",
     "op_task_source": "95655319552a5c790b69a04054667879",
     "op_participate": "0",
     "op_obj_type": "dynaform",
     "op_obj_uid": "41320210152964e39d34c91015371856",
     "op_action": "block",
     "op_case_status": "draft",
     "task_target": "task 2",
     "group_user": "adam corey (adam)",
     "task_source": "task 2",
     "object_type": "dynaform",
     "object": "eede",
     "participated": "no",
     "action": "block"
 ]

Update Process Permission: PUT project/{prj_uid}/process-permission/{op_uid}

Update a Process Permission.

PUT /api/1.0/{workspace}/project/{prj_uid}/process-permission/{op_uid}

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID
op_uidStringProcess-permissions UID

Required Fields:

NameTypeDescription
usr_uidStringop_user_relation
op_user_relationString1 = user, 2 = group
op_actionStringType of action assigned in the permission
op_case_statusStringThe state of the case which will get permission
op_participateString0 = Not participated, 1 = Participated
op_obj_typeStringValue for the object type of permission
op_actionStringType of action assigned in the permission

Optional Fields:

NameTypeDescription
tas_uidStringTask value UID, permission target
op_task_sourceStringTask value UID, permission source
dynaformsStringDynaform value UID of the permission (Only takes account the field when the value of "It op_obj_type" is "DYNAFORM"
inputsIntegerValue of the ID of the input Permission (Only takes into account that field when the value of "op_obj_type" is "INPUT")
outputsIntegerThe output value of the ID Permission (Only takes into account that field when the value of "op_obj_type" is "OUTPUT")

Result:

TypeDescription
emptyNo return

Example:

Response

 200 (OK)
 {
     "tas_uid": "",
     "usr_uid": "00000000000000000000000000000001",
     "op_user_relation": "1",
     "op_obj_type": "ANY",
     "op_task_source" : "",
     "op_participate": "0",
     "op_action": "BLOCK",
     "op_case_status": "TO_DO"
 }

Delete Process Permission: DELETE project/{prj_uid}/process-permission/{op_uid}

Delete a Process Permission.

DELETE /api/1.0/{workspace}/project/{prj_uid}/process-permission/{op_uid}

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID
op_uidStringProcess-permissions UID

Result:

TypeDescription
emptyNo return

Example:

Response

   200 (OK)

Web Entry

The following are the methods currently implemented for the web entry of the designer in the ProcessMaker API.

1. Get a list of web entries

2. Get a web entry

3. Create new web entry

3.1. Using the method: PHP pages with web Services
3.2. Using the method: Single HTML

4. Update a web entry

5. Delete a web entry

Web Entry:

NameDescriptionType Value
we_uidWeb entry UIDString"9541049475298f190420f51086854718" (String of 32 characters)
tas_uidTask UIDString"9541049475298f190420f51086854718" (String of 32 characters)
dyn_uidDynaform UIDString"9541049475298f190420f51086854718" (String of 32 characters)
usr_uidUser UIDString"9541049475298f190420f51086854718" (String of 32 characters)
we_titleTitleString"My dynaform"
we_descriptionDescriptionString"Description"
we_methodCreation methodString"WS", "HTML" (unique values)
we_input_document_accessInput Document AccessInteger0, 1 (unique values) 0: Restricted to process permissions 1: No Restriction
we_dataDataString"9541049475298f190420f51086854718" (String of 32 characters)
we_create_usr_uidUID of the user who created the process.String"9541049475298f190420f51086854718" (String of 32 characters)
we_update_usr_uidUID of the user who updated the registry.String"9541049475298f190420f51086854718" (String of 32 characters)
we_create_dateCreation date (According to setting in "Global Date Format").Datetime“2012-10-22 14:51:11”
we_update_dateUpdate date (According to setting in "Global Date Format")Datetime“2012-10-22 14:51:11”

Get Web Entries List: GET project/{prj_uid}/web-entries

Get a list of the Web Entries in a project.

GET /api/1.0/{workspace}/project/{prj_uid}/web-entries

Parameters:

NameTypeDescription
workspaceStringWorkspace name.
prj_uidStringProject UID

Result:

TypeDescription
arrayReturns an array of objects with data of each web entry.

Example:

Response

 200 (OK)
 Content-Type: application/json
 [
   {
       "we_uid": "587419583511e8b709dcc89064621895",
       "tas_uid": "90179407652dfd8022a69c4009728891",
       "dyn_uid": "41124331652de92e93bff96031343341",
       "usr_uid": "00000000000000000000000000000001",
       "we_title": "My DynaForm 1",
       "we_description": "Description...",
       "we_method": "WS",
       "we_input_document_access": 1,
       "we_data": "http://your_pm_server/sysworkflow/en/neoclassic/8061532405176da5242da84006421863/My_DynaForm_1.php",
       "we_create_usr_uid": "00000000000000000000000000000001",
       "we_update_usr_uid": "",
       "we_create_date": "2014/04/16",
       "we_update_date": ""
   },
   {
       "we_uid": "518973060512235cb814be8004067411",
       "tas_uid": "821603509526eae5e100ac2043080803",
       "dyn_uid": "2820662365261577c336381090786467",
       "usr_uid": "",
       "we_title": "My DynaForm 2",
       "we_description": "Description...",
   "we_method": "HTML",
       "we_input_document_access": 1,
       "we_data": "<html>...</html>",
       "we_create_usr_uid": "00000000000000000000000000000001",
       "we_update_usr_uid": "",
       "we_create_date": "2014/04/16",
       "we_update_date": ""
   }
 ]

Get Web Entry: GET project/{prj_uid}/web-entry/{we_uid}

Get a specified Web Entry.

GET /api/1.0/{workspace}/project/{prj_uid}/web-entry/{we_uid}

Parameters:

NameTypeDescription
workspaceStringWorkspace name.
prj_uidStringProject UID
we_uidStringWeb entry UID

Result:

TypeDescription
objectReturns an object with data of the Web Entry

Example:

Response

 200 (OK)
 Content-Type: application/json
 {
    "we_uid": "587419583511e8b709dcc89064621895",
    "tas_uid": "90179407652dfd8022a69c4009728891",
    "dyn_uid": "41124331652de92e93bff96031343341",
    "usr_uid": "00000000000000000000000000000001",
    "we_title": "My DynaForm 1",
    "we_description": "Description...",
    "we_method": "WS",
    "we_input_document_access": 1,
    "we_data": "http://your_pm_server/sysworkflow/en/neoclassic/8061532405176da5242da84006421863/My_DynaForm_1.php",
    "we_create_usr_uid": "00000000000000000000000000000001",
    "we_update_usr_uid": "",
    "we_create_date": "2014/04/16",
    "we_update_date": ""
 }

Create Web Entry: POST project/{prj_uid}/web-entry

Create a new Web Entry using the method "PHP pages with Web Services".

POST /api/1.0/{workspace}/project/{prj_uid}/web-entry

Parameters:

NameTypeDescription
workspaceStringWorkspace name.
prj_uidStringProject UID

Required Fields:

NameTypeDescription
tas_uidStringTask UID
dyn_uidStringDynaform UID
usr_uidStringUser UID
we_titleStringTitle
we_methodStringCreation method = "WS"
we_input_document_accessStringInput document access

Optional Fields:

NameTypeDescription
we_descriptionStringDescription
we_dataStringData

Result:

TypeDescription
objectReturns an object with data of the web entry plus the "we_uid" attribute.

Example:

Request

 Content-Type: application/json
 {
    "tas_uid": "90179407652dfd8022a69c4009728891",
    "dyn_uid": "41124331652de92e93bff96031343341",
    "usr_uid": "00000000000000000000000000000001",
    "we_title": "My DynaForm 1",
    "we_description": "Description...",
    "we_method": "WS",
    "we_input_document_access": 1
 }

Response

 201 (Created)
 {
    "we_uid": "587419583511e8b709dcc89064621895",
    "tas_uid": "90179407652dfd8022a69c4009728891",
    "dyn_uid": "41124331652de92e93bff96031343341",
    "usr_uid": "00000000000000000000000000000001",
    "we_title": "My DynaForm 1",
    "we_description": "Description...",
    "we_method": "WS",
    "we_input_document_access": 1,
    "we_data": "http://your_pm_server/sysworkflow/en/neoclassic/8061532405176da5242da84006421863/My_DynaForm_1.php",
    "we_create_usr_uid": "00000000000000000000000000000001",
    "we_update_usr_uid": "",
    "we_create_date": "2014/04/16",
    "we_update_date": ""
 }

Create Web Entry with HTML page: POST project/{prj_uid}/web-entry

Create a Web Entry using the method "Single HTML" page.

POST /api/1.0/{workspace}/project/{prj_uid}/web-entry

Parameters:

NameTypeDescription
workspaceStringWorkspace name.
prj_uidStringProject UID

Required Fields:

NameTypeDescription
tas_uidStringTask UID
dyn_uidStringDynaform UID
we_titleStringTitle
we_methodStringCreation method = "HTML"
we_input_document_accessStringInput document access

Optional Fields:

NameTypeDescription
usr_uidStringUser UID
we_descriptionStringDescription
we_dataStringData

Result:

TypeDescription
objectReturns an object with data of the web entry plus the "we_uid" attribute.

Example:

Request

 Content-Type: application/json
 {
    "tas_uid": "821603509526eae5e100ac2043080803",
    "dyn_uid": "2820662365261577c336381090786467",
    "we_title": "My DynaForm 2",
    "we_description": "Description...",
    "we_method": "HTML",
    "we_input_document_access": 1
 }

Response

 201 (Created)
 {
   "we_uid": "518973060512235cb814be8004067411",
   "tas_uid": "821603509526eae5e100ac2043080803",
   "dyn_uid": "2820662365261577c336381090786467",
   "usr_uid": "",
   "we_title": "My DynaForm 2",
   "we_description": "Description...",
   "we_method": "HTML",
   "we_input_document_access": 1,
   "we_data": "<html>...</html>",
   "we_create_usr_uid": "00000000000000000000000000000001",
   "we_update_usr_uid": "",
   "we_create_date": "2014/04/16",
   "we_update_date": ""
 }

Update Web Entry: PUT project/{prj_uid}/web-entry/{we_uid}

Update a specified Web Entry.

PUT /api/1.0/{workspace}/project/{prj_uid}/web-entry/{we_uid}

Parameters:

NameTypeDescription
workspaceStringWorkspace name.
prj_uidStringProject UID
we_uidStringWeb entry UID

Optional Fields:

NameTypeDescription
tas_uidStringTask UID
dyn_uidStringDynaform UID
usr_uidStringUser UID
we_titleStringTitle
we_descriptionStringDescription
we_methodStringCreation method
we_input_document_accessStringInput document access
we_dataStringData

Result:

TypeDescription
emptyNo return

Example:

Request

 Content-Type: application/json
 {
   "tas_uid": "90179407652dfd8022a69c4009728891",
   "dyn_uid": "41124331652de92e93bff96031343341",
   "usr_uid": "00000000000000000000000000000001",
   "we_title": "My DynaForm 1",
   "we_description": "Description...",
   "we_method": "WS",
   "we_input_document_access": 1
 }

Response

  200(OK)

Delete Web Entry: DELETE project/{prj_uid}/web-entry/{we_uid}

Delete a specified Web Entry.

DELETE /api/1.0/{workspace}/project/{prj_uid}/web-entry/{we_uid}

Parameters:

NameTypeDescription
workspaceStringWorkspace name.
prj_uidStringProject UID
we_uidStringWeb entry UID

Result:

TypeDescription
emptyNo return

Example:

Response

 200(OK)

Case Tracker

The following are the methods currently implemented for the case tracker of the designer in the ProcessMaker API.

1. Get case tracker data of a project

2. Update the case tracker data in a project

3. Get a list of case tracker objects of a project

4. Get a list of available case tracker objects of a project

5. Get a single case tracker object of a project

6. Assign an object to a project

7. Update a case tracker object of a project

8. Delete a case tracker object of a project

Case Tracker:

NameDescriptionType Value
map_typeMap typeString"NONE", "PROCESSMAP", "STAGES" (unique values)
routing_historyRouting historyInteger0,1 (unique values)
messages_historyMessages historyInteger0,1 (unique values)
cto_uidCase tracker object UIDString"9541049475298f190420f51086854718” (String of the 32 characters)
cto_type_obj*Object typeString"DYNAFORM", "INPUT_DOCUMENT", "OUTPUT_DOCUMENT" (unique values)
cto_uid_obj*Object UIDString"9541049475298f190420f51086854718” (String of the 32 characters)
cto_conditionCase tracker object condition, the object is only available if the condition accomplishes trueString"@@YEAR==2014"
cto_positionPosition that specifies the order of deployment, it starts on 1Integer1,2...
obj_uidObject UIDString"9541049475298f190420f51086854718” (String of the 32 characters)
obj_titleObject titleString"Title..."
obj_descriptionObject descriptionString"Description..."
obj_typeObject typeString"DYNAFORM", "INPUT_DOCUMENT","OUTPUT_DOCUMENT" (unique values)

Note: cto_type_obj and cto_uid_obj are dependent variables, thus, if one of them is sent the other must be sent mandatorily.

Get Case Tracker Properties: GET project/{prj_uid}/case-tracker/property

Get the properties of a Case Tracker.

GET /api/1.0/{workspace}/project/{prj_uid}/case-tracker/property

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID

Result:

TypeDescription
arrayReturns an array of objects with data of the Case Tracker

Example:

Response

 200 (OK)
 Content-Type: application/json
 {
    "map_type": "PROCESSMAP",
    "routing_history": 0,
    "message_history": 1
 }

Update Case Tracker: PUT project/{prj_uid}/case-tracker/property

Update a Case Tracker.

PUT /api/1.0/{workspace}/project/{prj_uid}/case-tracker/property

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID

Optional Fields:

NameTypeDescription
map_typeStringMap type
routing_historyIntegerRouting history
messages_historyIntegerMessages history

Result:

TypeDescription
emptyNo return

Example:

Request

 Content-Type: application/json
 {
    "map_type": "NONE",
    "routing_history": 0,
    "message_history": 0
 }

Response

 200 (OK)

Case Tracker Objects List: GET project/{prj_uid}/case-tracker/objects

Get a list of Case Tracker objects in a project.

GET /api/1.0/{workspace}/project/{prj_uid}/case-tracker/objects

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID

Result:

TypeDescription
arrayReturns an object array with data of each Case Tracker Object of the project

Example:

Response

 200 (OK)
 Content-Type: application/json
 [
    {
       "cto_uid": "78926541452d4115c49de46083431983",
       "cto_type_obj": "DYNAFORM",
       "cto_uid_obj": "480515388526013e03f5323091406324",
       "cto_condition": "",
       "cto_position": 1,
       "obj_title": "My DynaForm1",
       "obj_description": "My DynaForm1 DESCRIPTION"
    },
    {
       "cto_uid": "54092543952d41151604923013637615",
       "cto_type_obj": "INPUT_DOCUMENT",
       "cto_uid_obj": "17796063752b32090a0e950049957998",
       "cto_condition": "",
       "cto_position": 2,
       "obj_title": "My InputDocument1",
       "obj_description": "My InputDocument1 DESCRIPTION"
    }
 ]

Available Case Tracker objects: GET project/{prj_uid}/case-tracker/available-objects

Get a list of the available Case Tracker objects in a project.

GET /api/1.0/{workspace}/project/{prj_uid}/case-tracker/available-objects

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID

Result:

TypeDescription
arrayReturns an object array with data of each Object available for the project

Example:

Response

 200 (OK)
 Content-Type: application/json
 [
    {
       "obj_uid": "172506336526157835e72e6060691417",
       "obj_title": "My DynaForm2",
       "obj_description": "My DynaForm2 DESCRIPTION",
       "obj_type": "DYNAFORM"
    },
    {
       "obj_uid": "86369594352602caa32c5c3004407686",
       "obj_title": "My OutputDocument1",
       "obj_description": "My OutputDocument1 DESCRIPTION",
       "obj_type": "OUTPUT_DOCUMENT"
    }
 ]

Get Case Tracker Object: GET project/{prj_uid}/case-tracker/object/{cto_uid}

Get a specified Case Tracker object.

GET /api/1.0/{workspace}/project/{prj_uid}/case-tracker/object/{cto_uid}

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID
cto_uidStringCase tracker object UID

Result:

TypeDescription
objectReturns an object with the Case Tracker Object data

Example:

Response

 200 (OK)
 Content-Type: application/json
 {
     "cto_uid": "54092543952d41151604923013637615",
     "cto_type_obj": "INPUT_DOCUMENT",
     "cto_uid_obj": "17796063752b32090a0e950049957998",
     "cto_condition": "",
     "cto_position": 2,
     "obj_title": "My InputDocument1",
     "obj_description": "My InputDocument1 DESCRIPTION"
 }

Assign Case Tracker Object: POST project/{prj_uid}/case-tracker/object

Assign an object (DynaForm, Input Document, Output Document) to a case tracker.

POST /api/1.0/{workspace}/project/{prj_uid}/case-tracker/object

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID

Optional Fields:

NameTypeDescription
cto_type_objStringIf sent cto_type_obj it is necessary to send cto_uid_obj
cto_uid_objStringIf sent cto_uid_obj it is necessary to send cto_type_obj
cto_conditionStringCase tracker condition
cto_positionStringPosition that specifies the order of deployment, it starts on 1
obj_uidStringObject UID
obj_titleStringObject title
obj_descriptionStringObject description
obj_typeStringObject type

Result:

TypeDescription
objectReturns an object with the Case Tracker Object data, plus "cto_uid"

Example:

Request

 Content-Type: application/json
 {
     "cto_type_obj": "OUTPUT_DOCUMENT",
     "cto_uid_obj": "61792009652aa1529305888088498275",
     "cto_condition": "",
     "cto_position": 5
 }

Response

 201 (Created)
 {
     "cto_uid": "64188005052d59b470fd692026506249",
     "cto_type_obj": "OUTPUT_DOCUMENT",
     "cto_uid_obj": "61792009652aa1529305888088498275",
     "cto_condition": "",
     "cto_position": 5
 }

Update Case Tracker Object: PUT project/{prj_uid}/case-tracker/object/{cto_uid}

Update an object in a case tracker.

PUT /api/1.0/{workspace}/project/{prj_uid}/case-tracker/object/{cto_uid}

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID
cto_uidStringCase tracker object UID

Optional Fields:

NameTypeDescription
cto_type_objStringIf sent cto_type_obj it is necessary to send cto_uid_obj
cto_uid_objStringIf sent cto_uid_obj it is necessary to send cto_type_obj
cto_conditionStringCase tracker condition
cto_positionStringPosition that specifies the order of deployment, it starts on 1
obj_uidStringObject UID
obj_titleStringObject title
obj_descriptionStringObject description
obj_typeStringObject type

Result:

TypeDescription
emptyNo return

Example:

Request

 Content-Type: application/json
 {
     "cto_type_obj": "OUTPUT_DOCUMENT",
     "cto_uid_obj": "61792009652aa1529305888088498275",
     "cto_condition": "@@YEAR == 2014",
     "cto_position": 5
 }

Response

  200 (OK)

Delete Case Tracker Object: DELETE project/{prj_uid}/case-tracker/object/{cto_uid}

Delete a Case Tracker object.

DELETE /api/1.0/{workspace}/project/{prj_uid}/case-tracker/object/{cto_uid}

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID
cto_uidStringCase tracker object UID

Result:

TypeDescription
emptyNo return

Example:

Response

 200 (OK)

Process File Manager endpoints

The following are the methods currently implemented for the process file manager resources of the designer in the ProcessMaker API.

1. List files contained in the project

2. Create a new file inside the project

3. Update a file content

4. Upload a document

5. Download document

6. Delete a document of a file

7. Delete a file

8. List a single file

Process File Manager resources:

NameDescriptionType Value
prj_uidProject UIDStringString of 32 characters
prf_uidFile UIDStringString of 32 characters
prf_pathPath nameString"public/.../..." or "templates/.../..."
pathPath nameString"public/.../..." or "templates/.../..."
prf_filenameFile nameStringString
contentFile contentStringString
usr_uidUID of the user who created the documentStringString
prg_update_usr_uidUID of the user who updated the documentStringString
prf_typeRegistry typeStringString. It could be a file or folder
prf_editableIndicates if the registry is editableStringString
prf_create_dateDocument creation dateDateDate
prf_update_dateDocument update dateDateDate
prf_contentDocument contentStringString

Get Files List: GET project/{prj_uid}/file-manager?path={path}

Get a list of the files in a project.

GET /api/1.0/{workspace}/project/{prj_uid}/file-manager?path={path}

Function: doGetProcessFileManager()

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID

Optional Parameter:

NameTypeDescription
pathStringFile path

Result:

TypeDescription
arrayReturns an array of objects with information of the files

Example:

Response

 {path}
 // public -> 'public'
 // templates -> file alias 'mainTemplates'

 200 (OK)
 [
    {
        "name": "templates",
        "type": "folder",
        "path": "/",
        "editable": false
    },
    {
        "name": "public",
        "type": "folder",
        "path": "/",
        "editable": false
    }
 ]

 // For sub files E.g. 'public/directory_1/.../directory_n'
 200(OK)
 [
    {
        "prf_name": "test",
        "prf_type": "folder",
        "prf_path": "templates"
    },
    {
        "prf_uid": "906750465531e05b994e711084668227",
        "prf_filename": "test.txt",
        "usr_uid": "00000000000000000000000000000001",
        "prf_update_usr_uid": "",
        "prf_path": "templates/",
        "prf_type": "file",
        "prf_editable": "true",
        "prf_create_date": "2014-03-10 14:34:33",
        "prf_update_date": null,
        "prf_content": "fsdfsdgsdgsd"
    },
    {
        "prf_uid": "376806779533adc6f96be58025995587",
        "prf_filename": "alert_message.html",
        "usr_uid": "00000000000000000000000000000001",
        "prf_update_usr_uid": "",
        "prf_path": "templates/",
        "prf_type": "file",
        "prf_editable": "false",
        "prf_create_date": "2014-04-01 11:34:07",
        "prf_update_date": null,
        "prf_content": ""
    }
 ]

Create file: POST project/{prj_uid}/file-manager

Create a file in the File Manager.

POST /api/1.0/{workspace}/project/{prj_uid}/file-manager
Function: doPostProcessFilesManager()

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID

Required Fields:

NameTypeDescription
prf_pathStringPath name
prf_filenameStringFile name
contentStringFile content

Result:

TypeDescription
objectReturns an object with information of the new file

Example:

Request

 Content-Type: application/json
 {
    "prf_filename": "file.html",
    "prf_path": "public/carpeta_1",
    "prf_content": "document content"
 }

Response

 201 (Created)
 {
    "prf_uid": "10135107353961aff6201c8069655112",
    "prf_filename": "file.html",
    "usr_uid": "00000000000000000000000000000001",
    "prf_update_usr_uid": "",
    "prf_path": "public/carpeta_1/",
    "prf_type": "file",
    "prf_editable": false,
    "prf_create_date": "2014-06-09 16:37:19",
    "prf_update_date": null,
    "prf_content": "contenido del documento"
 }


3. Update a file content

PUT /api/1.0/{workspace}/project/{prj_uid}/file-manager/{prf_uid}
Function: (doPutProcessFileManager)

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID
prf_uidStringFile UID

Required Fields:

NameTypeDescription
contentStringFile content

Result:

TypeDescription
objectReturns an object with information of the file

Example:

Request

 Content-Type: application/json
 {
    "prf_content": "modify content"
 }

Response

 200 (OK)
 {
    "prf_uid": "7164627665397061c79d806082862933",
    "prf_filename": "file2.html",
    "usr_uid": "00000000000000000000000000000001",
    "prf_update_usr_uid": "",
    "prf_path": "public/carpeta_1/",
    "prf_type": "file",
    "prf_editable": false,
    "prf_create_date": "2014-06-10 09:20:28",
    "prf_update_date": null,
    "prf_content": "contenido del documento"
 }


4. Upload a document

POST /api/1.0/{workspace}/project/{prj_uid}/file-manager/{prf_uid}/upload
Function: (doPostProcessFilesManagerUpload)

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID
prf_uidStringFile UID

Result:

TypeDescription
emptyNo return

Example:

Response

 201 (Created)


5. Download document

GET /api/1.0/{workspace}/{prj_uid}/file-manager/{prf_uid}/download
Function: (doGetProcessFilesManagerDownload)

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID
prf_uidStringFile UID

Result:

TypeDescription
emptyNo return

Example:

Response

  200(OK)


6. Delete a document of a file

DELETE /api/1.0/{workspace}/project/{prj_uid}/file-manager/{prf_uid}
Function: (doDeleteProcessFilesManager)

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID
prf_uidStringFile UID

Result:

TypeDescription
emptyNo return

Example:

Response

  200(OK)


7. Delete a file in the project

DELETE /api/1.0/{workspace}/project/{prj_uid}/file-manager/folder?path={path}
Function: (doDeleteFolderProcessFilesManager)

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID

Optional Parameter:

NameTypeDescription
pathStringFile path

Result:

TypeDescription
emptyNo return

Example:

Response

  200(OK)


8. List a single file

GET /api/1.0/{workspace}/project/{prj_uid}/file-manager/{prf_uid}
Function: (doGetProcessFileManager)

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID
prf_uidStringFile UID

Result:

TypeDescription
objectReturns an object

Example:

Response

 200(OK)
 {
    "prf_uid": "10135107353961aff6201c8069655112",
    "prf_filename": "file.html",
    "usr_uid": "00000000000000000000000000000001",
    "prf_update_usr_uid": "",
    "prf_path": "public/carpeta_1",
    "prf_type": "file",
    "prf_editable": 0,
    "prf_create_date": "2014-06-09 16:37:19",
    "prf_update_date": null,
    "prf_content": "contenido del documento"
 }

Report Table

The following are the methods currently implemented for report tables in the designer end point of the ProcessMaker API.

1. Get a list of report tables of a project

2. Get a single report table of a project

3. Populate a single report table of a project

4. Get data of a report table in a project

5. Create a new report table for a project

6. Update a report table in a project

7. Delete a report table of a project

Report Table:

NameDescriptionType Value
rep_uidReport table UIDStringString
rep_tab_nameReport table nameString"name" or "pmt_NAME" (Text string)
rep_tab_dscReport table descriptionString"Description of Report Table" (Text String)
rep_tab_connectionConnection for the report table, possible values are: "workflow", "rp" and Database connectionsString"workflow" or "h348fd..." (Text String)
rep_tab_typeReport table type, possible values are: "NORMAL" or "GRID"String"NORMAL" ("NORMAL" and "GRID") (unique allowed values)
rep_tab_gridBase grid UID on which the report table will be generatedInteger"tr8945m..." (String of 32 characters)
fieldsArray of the report table columnsArrayCheck the next fields
Field Variables
fld_dynField name known in a dynaformString"Accepted" (Text String)
fld_nameField name for the table creation in mysqlString"Accepted" (Text String)
fld_labelLabel name of the field for the GUI in PMString"Accepted" (Text String)
fld_typeField type in mysql, values: "BOOLEAN", "TINYINT", "SMALLINT", "INTEGER", "BIGINT", "DOUBLE", "FLOAT","REAL", "DECIMAL", "CHAR", "VARCHAR", "LONGVARCHAR", "DATE", "TIME", "DATETIME"String"VARCHAR" (String type mysql field)
fld_sizeField size in mysqlInteger"23" (Numeric)

Get Report Tables List: GET project/{prj_uid}/report-tables

Get a list of Report Tables in a project.

GET /api/1.0/{workspace}/project/{prj_uid}/report-tables

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID

Result:

TypeDescription
arrayReturns an array of report table objects

Example:

Response

 200 (OK)
 Content-Type: application/json
 [
    {
        "rep_uid": "12965606852f8dcf2154e21097825813",
        "rep_tab_name": "PMT_EJEMPLO",
        "rep_tab_description": "My table description",
        "rep_tab_class_name": "PmtExample",
        "rep_tab_connection": "workflow",
        "rep_tab_type": "NORMAL",
        "rep_tab_grid": "",
        "rep_num_rows": 2,
        "fields":
        [
           {
               "fld_uid": "64688692552f8de120c57d0031739165",
               "fld_index": "0",
               "fld_name": "APP_UID",
               "fld_description": "APP_UID",
               "fld_type": "VARCHAR",
               "fld_size": "32",
               "fld_null": "0",
               "fld_auto_increment": "0",
               "fld_key": "1",
               "fld_foreign_key": "0",
               "fld_foreign_key_table": "",
               "fld_dyn_name": "",
               "fld_dyn_uid": "",
               "fld_filter": "0"
           }
        ]
     }
 ]

Get Report Table: GET project/{prj_uid}/report-table/{rep_uid

Get a specified Report Table.

GET /api/1.0/{workspace}/project/{prj_uid}/report-table/{rep_uid}

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID
rep_uidStringReport table UID

Result:

TypeDescription
objectReturns a report table object

Example:

Response

 200 (OK)
 Content-Type: application/json
 [
    {
        "rep_uid": "12965606852f8dcf2154e21097825813",
        "rep_tab_name": "PMT_EJEMPLO",
        "rep_tab_description": "descripcion de la tabla",
        "rep_tab_class_name": "PmtEjemplo",
        "rep_tab_connection": "workflow",
        "rep_tab_type": "NORMAL",
        "rep_tab_grid": "",
        "rep_num_rows": 2,
        "fields":
        [
           {
               "fld_uid": "64688692552f8de120c57d0031739165",
               "fld_index": "0",
               "fld_name": "APP_UID",
               "fld_description": "APP_UID",
               "fld_type": "VARCHAR",
               "fld_size": "32",
               "fld_null": "0",
               "fld_auto_increment": "0",
               "fld_key": "1",
               "fld_foreign_key": "0",
               "fld_foreign_key_table": "",
               "fld_dyn_name": "",
               "fld_dyn_uid": "",
               "fld_filter": "0"
           }
        ]
     }
 ]

Populate Report Table: GET project/{prj_uid}/report-table/{rep_uid}/populate

Repopulate a Report Table with case data. This endpoint deletes the contents of a specified Report Table and then refills it with data from the cases. This endpoint can be called if the data in a Report Table gets out of sync with the data from the cases.

GET /api/1.0/{workspace}/project/{prj_uid}/report-table/{rep_uid}/populate

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID
rep_uidStringReport table UID

Result:

TypeDescription
emptyNo return

Example:

Response

 200 (OK)

Get Report Table Data: GET project/{prj_uid}/report-table/{rep_uid}/data

Get the data from a Report Table. Returns all the rows in a Report Table and a count of the number of rows.

GET /api/1.0/{workspace}/project/{prj_uid}/report-table/{rep_uid}/data

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID
rep_uidStringReport table UID

Result:

TypeDescription
objectReturns an object with data of the report table

Example:

Response

 200 (OK)
 Content-Type: application/json
 {
     "rows": [
        {
            "app_uid":    "16154487852d6e4a63e8974075801312",
            "app_number": "652",
            "app_status": "DRAFT",
            "name":       "Jane Doe",
            "address":    "2132 W. Oak Av.",
            "__index__":  "lqaeqZWWpJyooqbFmNGZ0aOnxpqlnKSdq5aanJajnqY"
        },
        {
            "app_uid": "29839101252b8a4f21dfb22075517639",
            "app_number": "647",
            "app_status": "DRAFT",
            "name":       "Joh Roe",
            "address":    "955 S. Birch St.",
            "__index__": "l6mlp5qTnJaioqbDms2Z1p+lxcjOl6Kdq5aXnZymoK0"
        }
     ],
     "count": 2
 }

Create Report Table: POST project/{prj_uid}/report-table

Create a new Report Table.

POST /api/1.0/{workspace}/project/{prj_uid}/report-table

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID

Required Fields:

NameTypeDescription
rep_tab_nameStringReport table name
rep_tab_dscStringReport table description
rep_tab_connectionStringReport table connection, possible values: "workflow", "rp" and database connection
rep_tab_typeStringReport table type, possible values: "NORMAL" or "GRID"
fieldsArrayColumns of the report table. Check their variables in the main table.

Optional Fields:

NameTypeDescription
rep_tab_gridStringBase grid UID in which the report table was generated

Result:

TypeDescription
objectReturns an object with data of the new repot table

Example:

Request

 Content-Type: application/json
 [
    {
        "rep_tab_name" : "PMT_TEST",
        "rep_tab_dsc" : "Test from endpoint",
        "rep_tab_connection" : "workflow",
        "rep_tab_type" : "NORMAL",
        "rep_tab_grid" : "",
        "fields":
            [
                {
                    "fld_name" : "textVar001",
                    "fld_label": "textVar001",
                    "fld_type" : "VARCHAR",
                    "fld_size" : 20
                 },
                 {
                     "fld_name" : "textVar002",
                     "fld_label": "textVar002",
                     "fld_type" : "VARCHAR",
                     "fld_size" : 20
                 }
            ]
     }
 ]

Response

 201 (Created)
 {
   "rep_uid": "6931669405b0c18862478b7029286394",
   "rep_tab_name": "PMT_TEST",
   "rep_tab_description": "Test from endpoint",
   "rep_tab_class_name": "PmtTest",
   "rep_tab_connection": "workflow",
   "rep_tab_type": "NORMAL",
   "rep_tab_grid": "",
   "rep_num_rows": 0,
   "fields": [
       {
           "fld_uid": "2682051775b0c188627a5c3080551761",
           "fld_index": "0",
           "fld_name": "APP_UID",
           "fld_description": "APP_UID",
           "fld_type": "VARCHAR",
           "fld_size": "32",
           "fld_null": "0",
           "fld_auto_increment": "0",
           "fld_key": "1",
           "fld_table_index": "0"
       },
       {
           "fld_uid": "4990108315b0c18862994b9085393824",
           "fld_index": "1",
           "fld_name": "APP_NUMBER",
           "fld_description": "APP_NUMBER",
           "fld_type": "INTEGER",
           "fld_size": "11",
           "fld_null": "0",
           "fld_auto_increment": "0",
           "fld_key": "0",
           "fld_table_index": "0"
       },
       {
           "fld_uid": "9975526035b0c18862b2ea7012340214",
           "fld_index": "2",
           "fld_name": "APP_STATUS",
           "fld_description": "APP_STATUS",
           "fld_type": "VARCHAR",
           "fld_size": "10",
           "fld_null": "0",
           "fld_auto_increment": "0",
           "fld_key": "0",
           "fld_table_index": "0"
       },
       {
           "fld_uid": "8030932485b0c18862ce156011041868",
           "fld_index": "3",
           "fld_name": "TEXTVAR001",
           "fld_description": "textVar001",
           "fld_type": "VARCHAR",
           "fld_size": "20",
           "fld_null": "1",
           "fld_auto_increment": "0",
           "fld_key": "0",
           "fld_table_index": "0"
       },
       {
           "fld_uid": "8972005165b0c18862e9ae8009837282",
           "fld_index": "4",
           "fld_name": "TEXTVAR002",
           "fld_description": "textVar002",
           "fld_type": "VARCHAR",
           "fld_size": "20",
           "fld_null": "1",
           "fld_auto_increment": "0",
           "fld_key": "0",
           "fld_table_index": "0"
       }
   ]
}

Update Report Table: PUT project/{prj_uid}/report-table/{rep_uid}

Update a specified Report Table.

PUT /api/1.0/{workspace}/project/{prj_uid}/report-table/{rep_uid}

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID
rep_uidStringReport table UID

Required Fields:

NameTypeDescription
fieldsArrayColumns of the report table. Check their variables in the main table.

Optional Fields:

NameTypeDescription
rep_tab_dscStringReport table description

Result:

TypeDescription
emptyNo return

Example:

Request

 {
    "rep_tab_dsc" : "table description",
    "fields" : [
      {
          "fld_name" : "CAMPO",
          "fld_label" : "CAMPITO",
          "fld_type" : "VARCHAR",
          "fld_size" : 200
       }
    ]
 }

Response

 200 (OK)

Delete Report Table: DELETE project/{prj_uid}/report-table/{rep_uid}

Delete a Report Table.

DELETE /api/1.0/{workspace}/project/{prj_uid}/report-table/{rep_uid}

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID
rep_uidStringReport table UID

Result:

TypeDescription
emptyNo return

Example:

Response

 200 (OK)

Project endpoints

The following are the methods currently implemented for project resources in the designer end point of the ProcessMaker API.

1. Get a list of projects

2. Get the definition of a project activity

3. Create a project

4. Update a project

5. Delete a project activity

Project resources:

NameDescriptionType Value
*prj_uidProject UIDString“1598d2h3…”(String of 32 characters)
*prj_nameProject name or titleString“Name” (Alphanumeric string)
*prj_descriptionProject descriptionString“Description” (Alphanumeric string)
prj_target_namespaceThis attribute specifies the namespace associated with the definition and continues the conversion for the XMLString“String” (Alphanumeric string)

prj_expresion_languageThis attribute identifies the formal languageString“temp.html” (Valid template)
prj_type_languageThis attribute identifies the type of system the elements used in the languageString“String” (Alphanumeric string)
prj_exporterThis attribute identifies the tool the BPMN model file is exportingString“String” (Alphanumeric string)
prj_exporter_versionThis attribute identifies the tool version the BPMN model file is exportingString“String” (Alphanumeric string)
prj_create_dateProject creation dateDateTime“2015-01-01 12:00:00”(Datetime string)
prj_update_dateProject update dateDateTime“2015-01-01 12:00:00” (Datetime string)
prj_authorProject author UIDString
prj_author_versionValue of the version of the project authorString“String” (Alphanumeric string)
prj_original_sourceOriginal code of the projectString“String” (Alphanumeric string)
*diagramsDiagram array

Diagram Fields:

NameDescriptionType Value
*dia_uidDiagram UIDString“1598d2h3…”(String of 32 characters)
*activitiesActivities arrayArray
*eventsEvents arrayArray
*gatewaysGateways arrayArray

*flowsFlows arrayArray
*artifactsArtifacts arrayArray

Activity Fields:

NameDescriptionType Value
*act_uidActivity UIDString“1598d2h3…”(String of 32 characters)
*act_nameActivity nameString“Name”(Alphanumeric string)
*act_typeActivity typeString“TASK” or “SUB_PROCESS” (Unique values)
act_is_for_compensationShows the activityInteger1 (Numeric value)
act_start_quantityQuantity of required tokens for the activity to be availableInteger1 (Numeric value)
act_completion_quantityQuantity of required tokens for the activity to be completedInteger1 (Numeric value)
act_task_typeType of the activity taksString“String” (Alphanumeric string)
act_implementationActivity implementationString“String” (Alphanumeric string)
act_instantiateActivity instanceInteger1 (Numeric string)
act_script_typeScript type associated to the activityString"String" (Alphanumeric string)
act_scriptScript associated to the activityString"String" (Alphanumeric string)
act_loop_typeLoop type of the activityString"String" (Alphanumeric string)
act_test_beforeValue to decide when the loop condition will be evaluatedInteger1 (Numeric value)
act_loop_maximumMaximum number of iteration for loopInteger1 (Numeric Value)
act_loop_conditionLoop conditionString"String" (Alphanumeric string)
act_loop_cardinalityNumber of cases to be generated with the loopInteger1 (Numeric value)
act_loop_behaviorDefines if and when an event is released with the loopString"String" (Alphanumeric string)
act_is_adhocVerifies if the activity allows ad hoc transferInteger1 (Numeric value)
act_is_collapsedVerifies if the task can collapseInteger1 (Numeric value)
act_completion_conditionCondition for the activity to finishString"String" (Alphanumeric string)
act_orderingSet the order type in the activityString"String" (Alphanumeric string)
act_cancel_remaining_instancesThis attribute is only used if the request is parallel. Determines if it executes cases, it cancels when the act_completion_condition is trueInteger1 (Numeric value)
act_protocolActivity protocolString"String" (Alphanumeric string)
act_methodActivity methodString"String" (Alphanumeric string)
act_is_globalValue that specifies if the activity is globalInteger1 (Numeric value)
act_refererActivity referenceString"String" (Alphanumeric string)
act_default_flowFlow that the activity uses by defaultString"String" (Alphanumeric string)
act_master_diagramActivity master diagramString"String" (Alphanumeric string)
*bou_xX-Coordinate of the elementInteger348 (Numeric value)
*bou_yY-Coordinate of the elementInteger348 (Numeric value)
*bou_widthElement widthInteger40(Numeric value)
*bou_heightElement heightInteger28 (Numeric value)
bou_containerClass of the element containerString“bpmnDiagram”(Alphanumeric string)

Event Fields:

NameDescriptionType Value
*evn_uidEvent UIDString“1598d2h3…”(String of 32 characters)
*evn_nameEvent nameString"name" (Alphanumeric string)
*evn_typeEvent typeString“START” or “END”(Unique values)
*evn_markerEvent marker typeString“EMPTY” or “TIMER” o “MESSAGE” (Unique values)

evn_is_interruptingValue for the event to interrupt the caseInteger1 (Numeric value)
evn_cancel_activityValue for the event to cancel the activityInteger1 (Numeric value)
evn_activity_refReference that has with activityString"String" (Alphanumeric string)
evn_wait_for_completionValue that specifies the wait to complete a caseInteger1 (Numeric value)
evn_error_nameError name that may occur in the eventString"String" (Alphanumeric string)
evn_error_codeError code that may occur in the eventString"String" (Alphanumeric string)
evn_escalation_nameEvent escalation nameString"String" (Alphanumeric string)
evn_escalation_codeEvent escalation codeString"String" (Alphanumeric string)
evn_messageEvent messageString"String" (Alphanumeric string)
evn_operation_nameEvent operation nameString"String" (Alphanumeric string)
evn_operation_implementation_refEvent operation referenceString"String" (Alphanumeric string)
evn_time_dateInitial event time dateString"String" (Alphanumeric string)
evn_time_cycleEvent time cycleString"String" (Alphanumeric string)
evn_time_durationEvent time durationString“String” (Alphanumeric string)
evn_behaviorEvent behaviourString"String" (Alphanumeric string)
*bou_xX-Coordinate of the elementInteger348 (Numeric Value)
*bou_yY-Coordinate of the elementInteger348 (Numeric Value)
*bou_widthElement widthInteger40 (Numeric Value)
*bou_heightElement heightInteger28 (Numeric Value)
bou_containerClass of the element containerString“bpmnDiagram” (Alphanumeric string)

Note: * Web enty is now an start event which is defined as a Message start (evn_marker field).
* Case Scheduler is now an start event which is defined as a Timer start (evn_marker field)

Gateway Fields:

NameDescriptionType Value
*gat_uidGateway UIDString“1598d2h3…”(String of 32 characters)
*gat_nameGateway nameString“String” (Alphanumeric string)
*gat_typeGateway TypeString“EXCLUSIVE” or “INCLUSIVE” or “PARALLEL” or “COMPLEX” (Unique values)
*gat_directionGateway directionString“DIVERGING” or “CONVERGING” (Unique values)

gat_instantiateGateway instanceInteger1 (Numeric value)
gat_event_gateway_typeEvent gateway typeString“String” (Alphanumeric string)
gat_activation_countExpress the entrance doors in the gateways activationInteger1 (Numeric value)
gat_waiting_for_startExpress if the flow will recieve a count during its executionInteger1 (Numeric value)
gat_default_flowIndicates the gateway default flowString“String” (Alphanumeric string)
*bou_xX-Coordinate of the elementInteger348 (Numeric value)
*bou_yY-Coordinate of the elementInteger348 (Numeric value)
*bou_widthElement widthInteger40 (Numeric value)
*bou_heightElement heightInteger28 (Numeric value)
bou_containerClass of the element containerString“bpmnDiagram” (Alphanumeric string)

Artifact Fields:

NameDescriptionType Value
*art_uidArtifact UIDString“1598d2h3…”(String of 32 characters)
*art_typeArtifact typeString“TEXT_ANNOTATION” or “VERTICAL_LINE” or “HORIZONTAL_LINE” (Unique values)
*art_nameActivity nameString“Name” (Alphanumeric string)
art_category_refReference of the artifact categoryString“String” (Alphanumeric string)
*bou_xX-Coordinate of the elementInteger348 (Numeric value)
*bou_yY-Coordinate of the elementInteger348 (Numeric value)
*bou_widthElement widhtInteger40 (Numeric value)
*bou_heightElement heightInteger28 (Numeric value)
bou_containerClass of the element containerString“bpmnDiagram” (Alphanumeric string)

Flow Fields:

NameDescriptionType Value
*flo_uidFlow UIDString“1598d2h3…”(String of 32 characters)
*flo_typeFlow typeString“SEQUENCE” (Unique value)
*flo_nameFlow nameString“Name” (Alphanumeric string)
*flo_element_originRelation of the origin element flowString“String” (Alphanumeric string)
*flo_element_origin_typeType of the origin element flowString“String” (Alphanumeric string)
*flo_element_destRelation of the destiny element flowString“String” (Alphanumeric string)
*flo_element_dest_typeType of the destiny element flowString“String” (Alphanumeric string)
flo_is_inmidiateValue to determine if the flow is inmediateInteger1 (Numeric value)
*flo_conditionFlow conditionString“String” (Alphanumeric string)
*flo_x1X-Coordinate of the origin elementInteger348 (Numeric value)
*flo_y1Y-Coordinate of the origin elementInteger348 (Numeric value)
*flo_x2X-Coordinate of the final elementInteger40 (Numeric value)
*flo_y2Y-Coordinate of the final elementInteger28 (Numeric value)
*flo_statePoint array where the flow generates an angleArray

NOTE: Only fields marked with an asterisk(*) are the current ones with an implementation.

Get Projects List: GET project

Get a list of the projects in the workspace.

GET /api/1.0/{workspace}/project

Parameters:

NameTypeDescription
workspaceStringWorkspace name

Result:

TypeDescription
arrayReturns an array of objects

Example:

Response

 200 (OK)
 Content-Type: application/json
 [
    {
        "prj_uid": "655001588534fece2d46f86033751389",
        "prj_name": "Project_name",
        "prj_description": "",
        "prj_category": "",
        "prj_type": "bpmn",
        "prj_create_date": "2014-04-17 11:01:54",
        "prj_update_date": "2014-04-17 15:11:21"
        },
        {
            "prj_uid": "4437391625350213a013912065378061",
            "prj_name": "Project_name2",
            "prj_description": "",
            "prj_category": "",
            "prj_type": "classic",
            "prj_create_date": "2014-04-17 14:45:13",
            "prj_update_date": null
        }
    }
 ]

Get Project Definition: GET project/{uid}

Get the definition of a project.

GET /api/1.0/{workspace}/project/{uid}

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID

Result:

TypeDescription
arrayReturns an array of objects

Example:

Response

 200 (OK)
 Content-Type: application/json
 {
    "prj_uid": "655001588534fece2d46f86033751389",
    "prj_name": "Project_name",
    "prj_description": "",
    "prj_target_namespace": "",
    "prj_expresion_language": null,
    "prj_type_language": null,
    "prj_exporter": null,
    "prj_exporter_version": null,
    "prj_create_date": "2014-04-17 11:01:54",
    "prj_update_date": "2014-04-21 08:46:17",
    "prj_author": "00000000000000000000000000000001",
    "prj_author_version": null,
    "prj_original_source": null,
    "diagrams": [
        {
            "dia_uid": "956446767534fece3179b54016939905",
            "prj_uid": "655001588534fece2d46f86033751389",
            "dia_name": "Diagram name",
            "dia_is_closable": 0,
            "pro_uid": "736054291534fece3342096012897456",
            "activities": [
                {
                    "act_uid": "569214945534fecfa8f0835033274864",
                    "act_name": "Task # 1",
                    "act_type": "TASK",
                    "act_is_for_compensation": "0",
                    "act_start_quantity": "1",
                    "act_completion_quantity": "0",
                    "act_task_type": "EMPTY",
                    "act_implementation": "",
                    "act_instantiate": "0",
                    "act_script_type": "",
                    "act_script": "",
                    "act_loop_type": "NONE",
                    "act_test_before": "0",
                    "act_loop_maximum": "0",
                    "act_loop_condition": "0",
                    "act_loop_cardinality": "0",
                    "act_loop_behavior": "0",
                    "act_is_adhoc": "0",
                    "act_is_collapsed": "0",
                    "act_completion_condition": "0",
                    "act_ordering": "0",
                    "act_cancel_remaining_instances": "0",
                    "act_protocol": "0",
                    "act_method": "0",
                    "act_is_global": "0",
                    "act_referer": "0",
                    "act_default_flow": "0",
                    "act_master_diagram": "0",
                    "bou_x": "486",
                    "bou_y": "101",
                    "bou_width": "161",
                    "bou_height": "42",
                    "bou_container": "bpmnDiagram"
                }
            ],
            "events": [
                {
                    "evn_uid": "259220802534fecfad49854013091940",
                    "evn_name": "Start # 1",
                    "evn_type": "START",
                    "evn_marker": "MESSAGE",
                    "evn_is_interrupting": "1",
                    "evn_cancel_activity": "0",
                    "evn_activity_ref": null,
                    "evn_wait_for_completion": "0",
                    "evn_error_name": null,
                    "evn_error_code": null,
                    "evn_escalation_name": null,
                    "evn_escalation_code": null,
                    "evn_message": "LEAD",
                    "evn_operation_name": null
                    "evn_operation_implementation_ref": null,
                    "evn_time_date": null,
                    "evn_time_cycle": null,
                    "evn_time_duration": null,
                    "evn_behavior": "CATCH"
                    "bou_x": "517",
                    "bou_y": "19",
                    "bou_width": "33",
                    "bou_height": "33",
                    "bou_container": "bpmnDiagram"
                },
              {
                "evn_uid": "856003291534fecfae5dff7085708495",
                "evn_name": "End # 1",
                "evn_type": "END",
                "evn_marker": "EMPTY",
                "evn_is_interrupting": "1",
                "evn_cancel_activity": "0",
                "evn_activity_ref": null,
                "evn_wait_for_completion": "0",
                "evn_error_name": null,
                "evn_error_code": null,
                "evn_escalation_name": null,
                "evn_escalation_code": null,
                "evn_message": "",
                "evn_operation_name": null,
                "evn_operation_implementation_ref": null,
                "evn_time_date": null,
                "evn_time_cycle": null,
                "evn_time_duration": null,
                "evn_behavior": "THROW",
                "bou_x": "549",
                "bou_y": "181",
                "bou_width": "33",
                "bou_height": "33",
                "bou_container": "bpmnDiagram"
              }
            "gateways": [],
            "flows": [
                {
                    "flo_uid": "17092374253551306216a72013534569",
                    "flo_type": "SEQUENCE",
                    "flo_name": null,
                    "flo_element_origin": "569214945534fecfa8f0835033274864",
                    "flo_element_origin_type": "bpmnActivity",
                    "flo_element_dest": "856003291534fecfae5dff7085708495",
                    "flo_element_dest_type": "bpmnEvent",
                    "flo_is_inmediate": "1",
                    "flo_condition": null,
                    "flo_x1": "561",
                    "flo_y1": "193",
                    "flo_x2": "577"
                    "flo_y2": "193",
                    "flo_state": [
                {
                    "x": 566,
                    "y": 145
                },
                {
                    "x": 566,
                    "y": 171
                },
                {
                    "x": 602,
                    "y": 171
                },
                {
                    "x": 602,
                    "y": 198
                },
                {
                    "x": 582,
                    "y": 198
                }
            ]
        },
        {
            "flo_uid": "304762728534fecfaf3bf88040991913"
            "flo_type": "SEQUENCE",
            "flo_name": null,
            "flo_element_origin": "259220802534fecfad49854013091940",
            "flo_element_origin_type": "bpmnEvent",
            "flo_element_dest": "569214945534fecfa8f0835033274864",
            "flo_element_dest_type": "bpmnActivity",
            "flo_is_inmediate": "1",
            "flo_condition": null,
            "flo_x1": "529",
            "flo_y1": "95",
            "flo_x2": "556",
            "flo_y2": "95",
            "flo_state": [
                {
                    "x": 534,
                    "y": 52
                },
                {
                    "x": 534,
                    "y": 76
                },
                {
                    "x": 561,
                    "y": 76
                },
                {
                    "x": 561,
                    "y": 100
                }
            ]
        }
    ],
    "artifacts": [],
    "laneset": [],
    "lanes": []
    }
  ]
 }

Create Project: POST project

Create a new project.

POST /api/1.0/{workspace}/project

Parameters:

NameTypeDescription
workspaceStringWorkspace name

Required fields:

NameTypeDescription
Required Fields for Projects
prj_nameStringProject name or title
prj_descriptionStringProject description

The following tables describe the fields needed to create elements inside a project. Remember that to create a project only the name and the description aer required.

NameTypeDescription
Required Fields for Activities
act_nameStringActivity name
act_typeStringActivity type
bou_xIntegerX-Coordinate of the element
bou_yIntegerY-Coordinate of the element
bou_widthIntegerElement width
bou_heightIntegerElement height
Required Fields for Events
evn_typeStringEvent type
evn_markerStringEvent marker type
bou_xIntegerX-Coordinate of the element
bou_yIntegerY-Coordinate of the element
bou_widthIntegerElement width
bou_heightIntegerElement height
Required Fields for Gateways
gat_nameStringGateway name
gat_typeStringGateway type
gat_directionStringGateway direction
bou_xIntegerX-Coordinate of the element
bou_yIntegerY-Coordinate of the element
bou_widthIntegerElement width
bou_heightIntegerElement height
Required Fields for Artifacts
art_typeStringArtifact type
art_nameStringActivity name
bou_xIntegerX-Coordinate of the element
bou_yIntegerY-Coordinate of the element
bou_widthIntegerElement width
bou_heightIntegerElement height
Required Fields for Flows
flo_typeStringFlow type
flo_nameStringFlow name
flo_element_origin_typeStringType of the flow origin element
flo_element_destStringRelation of the destiny element of the flow
flo_element_dest_typeStringType of the flow destiny element
flo_is_inmediateIntegerValue that determines if the flow is inmediate
flo_conditionStringFlow condition
flo_x1IntegerX-Coordinate of the origin element
flo_y1IntegerY-Coordinate of the origin element
flo_x2IntegerX-Coordinate of the final element
flo_y2IntegerY-Coordinate of the final element

Optional fields:

Name Type Description
Optional Fields for Projects
prj_type String Type of project which could be "NORMAL", "BPMN"
prj_category String UID of the category of the project
diagrams Array Diagrams array
Optional Fields for Diagrams
activitiesArrayActivities array
eventsArrayEvents array
gatewaysArrayGateways array
flowsArrayFlows array
Optional Fields for Flows
flo_element_originStringRelation of the flow origin element
flo_stateArrayArray of points where the flow generates an angle

Result:

TypeDescription
emptyNo return

Example:

Request

 Content-Type: application/json
 {
    "prj_uid": "655001588534fece2d46f86033751389",
    "prj_name": "Project_name",
    "prj_description": "",
    "prj_target_namespace": "",
    "prj_expresion_language": null,
    "prj_type_language": null,
    "prj_exporter": null,
    "prj_exporter_version": null,
    "prj_create_date": "2014-04-17 11:01:54",
    "prj_update_date": "2014-04-21 08:46:17",
    "prj_author": "00000000000000000000000000000001",
    "prj_author_version": null,
    "prj_original_source": null,
    "diagrams": [
        {
            "prj_uid": "655001588534fece2d46f86033751389",
            "dia_name": "Diagram name",
            "dia_is_closable": 0,
            "pro_uid": "736054291534fece3342096012897456",
            "activities": [
                {
                    "act_name": "Task # 1",
                    "act_type": "TASK",
                    "act_is_for_compensation": "0",
                    "act_start_quantity": "1",
                    "act_completion_quantity": "0",
                    "act_task_type": "EMPTY",
                    "act_implementation": "",
                    "act_instantiate": "0",
                    "act_script_type": "",
                    "act_script": "",
                    "act_loop_type": "NONE",
                    "act_test_before": "0",
                    "act_loop_maximum": "0",
                    "act_loop_condition": "0",
                    "act_loop_cardinality": "0",
                    "act_loop_behavior": "0",
                    "act_is_adhoc": "0",
                    "act_is_collapsed": "0",
                    "act_completion_condition": "0",
                    "act_ordering": "0",
                    "act_cancel_remaining_instances": "0",
                    "act_protocol": "0",
                    "act_method": "0",
                    "act_is_global": "0",
                    "act_referer": "0",
                    "act_default_flow": "0",
                    "act_master_diagram": "0",
                    "bou_x": "486",
                    "bou_y": "101",
                    "bou_width": "161",
                    "bou_height": "42",
                    "bou_container": "bpmnDiagram"
                }
            ],
            "events": [
                {
                    "evn_name": "Start # 1",
                    "evn_type": "START",
                    "evn_marker": "MESSAGE",
                    "evn_is_interrupting": "1",
                    "evn_cancel_activity": "0",
                    "evn_activity_ref": null,
                    "evn_wait_for_completion": "0",
                    "evn_error_name": null,
                    "evn_error_code": null,
                    "evn_escalation_name": null,
                    "evn_escalation_code": null,
                    "evn_message": "LEAD",
                    "evn_operation_name": null,
                    "evn_operation_implementation_ref": null,
                    "evn_time_date": null,
                    "evn_time_cycle": null,
                    "evn_time_duration": null,
                    "evn_behavior": "CATCH",
                    "bou_x": "517",
                    "bou_y": "19",
                    "bou_width": "33",
                    "bou_height": "33",
                    "bou_container": "bpmnDiagram"
                },
                {
                    "evn_uid": "856003291534fecfae5dff7085708495",
                    "evn_name": "End # 1",
                    "evn_type": "END",
                    "evn_marker": "EMPTY",
                    "evn_is_interrupting": "1",
                    "evn_cancel_activity": "0",
                    "evn_activity_ref": null,
                    "evn_wait_for_completion": "0",
                    "evn_error_name": null,
                    "evn_error_code": null,
                    "evn_escalation_name": null,
                    "evn_escalation_code": null,
                    "evn_message": "",
                    "evn_operation_name": null,
                    "evn_operation_implementation_ref": null,
                    "evn_time_date": null,
                    "evn_time_cycle": null,
                    "evn_time_duration": null,
                    "evn_behavior": "THROW",
                    "bou_x": "549",
                    "bou_y": "181",
                    "bou_width": "33",
                    "bou_height": "33",
                    "bou_container": "bpmnDiagram"
                }
            ],
            "gateways": [],
            "flows": [
                {
                    "flo_type": "SEQUENCE",
                    "flo_name": null,
                    "flo_element_origin": "569214945534fecfa8f0835033274864",
                    "flo_element_origin_type": "bpmnActivity",
                    "flo_element_dest": "856003291534fecfae5dff7085708495",
                    "flo_element_dest_type": "bpmnEvent",
                    "flo_is_inmediate": "1",
                    "flo_condition": null,
                    "flo_x1": "561",
                    "flo_y1": "193",
                    "flo_x2": "577",
                    "flo_y2": "193",
                    "flo_state": [
                        {
                            "x": 566,
                            "y": 145
                        },
                        {
                            "x": 566,
                            "y": 171
                        },
                        {
                            "x": 602,
                            "y": 171
                        },
                        {
                            "x": 602,
                            "y": 198
                        },
                        {
                            "x": 582,
                            "y": 198
                        }
                    ]
                },
                {
                    "flo_type": "SEQUENCE",
                    "flo_name": null,
                    "flo_element_origin": "259220802534fecfad49854013091940",
                    "flo_element_origin_type": "bpmnEvent",
                    "flo_element_dest": "569214945534fecfa8f0835033274864",
                    "flo_element_dest_type": "bpmnActivity",
                    "flo_is_inmediate": "1",
                    "flo_condition": null,
                    "flo_x1": "529",
                    "flo_y1": "95",
                    "flo_x2": "556",
                    "flo_y2": "95",
                    "flo_state": [
                        {
                            "x": 534,
                            "y": 52
                        },
                        {
                            "x": 534,
                            "y": 76
                        },
                        {
                            "x": 561,
                            "y": 76
                        },
                        {
                            "x": 561,
                            "y": 100
                        }
                    ]
                }
            ],
            "artifacts": [],
            "laneset": [],
            "lanes": []
        }
    ]
}

Response

 201 (Created)

Update Project: PUT project project/{uid}

Update a project.

PUT /api/1.0/{workspace}/project/{uid}

Parameters:

NameTypeDescription
workspaceStringWorkspace name
uidStringProject UID

Required fields:

NameTypeDescription
Required Fields for Projects
prj_nameStringProject name or title
prj_descriptionStringProject description
Required Fields for Activities
act_uidStringActivity UID
act_nameStringActivity name
act_typeStringActivity type
bou_xIntegerX-Coordinate of the element
bou_yIntegerY-Coordinate of the element
bou_widthIntegerElement width
bou_heightIntegerElement height
Required Fields for Events
evn_uidStringEvent UID
evn_nameStringEvent name
evn_typeStringEvent type
evn_markerStringEvent marker type
bou_xIntegerX-Coordinate of the element
bou_yIntegerY-Coordinate of the element
bou_widthIntegerElement width
bou_heightIntegerElement height
Required Fields for Gateways
gat_uidStringGateway UID
gat_nameStringGateway name
gat_typeStringGateway type
gat_directionStringGateway direction
bou_xIntegerX-Coordinate of the element
bou_yIntegerY-Coordinate of the element
bou_widthIntegerElement width
bou_heightIntegerElement height
Required Fields for Artifacts
art_uidStringArtifact UID
art_typeStringArtifact type
art_nameStringActivity name
bou_xIntegerX-Coordinate of the element
bou_yIntegerY-Coordinate of the element
bou_widthIntegerElement width
bou_heightIntegerElement height
Required Fields for Flows
flo_uidStringFlow UID
flo_typeStringFlow type
flo_nameStringFlow name
flo_element_origin_typeStringType of the flow origin element
flo_element_destStringRelation of the destiny element of the flow
flo_element_dest_typeStringType of the flow destiny element
flo_is_inmediateIntegerValue that determines if the flow is inmediate
flo_conditionStringFlow condition
flo_x1IntegerX-Coordinate of the origin element
flo_y1IntegerY-Coordinate of the origin element
flo_x2IntegerX-Coordinate of the final element
flo_y2IntegerY-Coordinate of the final element

Optional fields:

NameTypeDescription
Optional Fields for Projects
prj_type String Type of project which could be "NORMAL", "BPMN"
prj_category String UID of the category of the project
diagramsArrayDiagrams array
Optional Fields for Diagrams
dia_uidStringDiagram UID
activitiesArrayActivities array
eventsArrayEvents array
gatewaysArrayGateways array
flowsArrayFlows array
Optional Fields for Flows
flo_element_originStringRelation of the flow origin element
flo_stateArrayArray of points where the flow generates an angle

Result:

TypeDescription
emptyNo return

Example:

Request

 Content-Type: application/json
 {
    "prj_uid": "655001588534fece2d46f86033751389",
    "prj_name": "Project_name",
    "prj_description": "",
    "prj_target_namespace": "",
    "prj_expresion_language": null,
    "prj_type_language": null,
    "prj_exporter": null,
    "prj_exporter_version": null,
    "prj_create_date": "2014-04-17 11:01:54",
    "prj_update_date": "2014-04-21 08:46:17",
    "prj_author": "00000000000000000000000000000001",
    "prj_author_version": null,
    "prj_original_source": null,
    "diagrams": [
        {
            "dia_uid": "956446767534fece3179b54016939905",
            "prj_uid": "655001588534fece2d46f86033751389",
            "dia_name": "Diagram name",
            "dia_is_closable": 0,
            "pro_uid": "736054291534fece3342096012897456",
            "activities": [
                {
                    "act_uid": "569214945534fecfa8f0835033274864",
                    "act_name": "Task # 1",
                    "act_type": "TASK",
                    "act_is_for_compensation": "0",
                    "act_start_quantity": "1",
                    "act_completion_quantity": "0",
                    "act_task_type": "EMPTY",
                    "act_implementation": "",
                    "act_instantiate": "0",
                    "act_script_type": "",
                    "act_script": "",
                    "act_loop_type": "NONE",
                    "act_test_before": "0",
                    "act_loop_maximum": "0",
                    "act_loop_condition": "0",
                    "act_loop_cardinality": "0",
                    "act_loop_behavior": "0",
                    "act_is_adhoc": "0",
                    "act_is_collapsed": "0",
                    "act_completion_condition": "0",
                    "act_ordering": "0",
                    "act_cancel_remaining_instances": "0",
                    "act_protocol": "0",
                    "act_method": "0",
                    "act_is_global": "0",
                    "act_referer": "0",
                    "act_default_flow": "0",
                    "act_master_diagram": "0",
                    "bou_x": "486",
                    "bou_y": "101",
                    "bou_width": "161",
                    "bou_height": "42",
                    "bou_container": "bpmnDiagram"
                }
            ],
            "events": [
                {
                    "evn_uid": "259220802534fecfad49854013091940",
                    "evn_name": "Start # 1",
                    "evn_type": "START",
                    "evn_marker": "MESSAGE",
                    "evn_is_interrupting": "1",
                    "evn_cancel_activity": "0",
                    "evn_activity_ref": null,
                    "evn_wait_for_completion": "0",
                    "evn_error_name": null,
                    "evn_error_code": null,
                    "evn_escalation_name": null,
                    "evn_escalation_code": null,
                    "evn_message": "LEAD",
                    "evn_operation_name": null
                    "evn_operation_implementation_ref": null,
                    "evn_time_date": null,
                    "evn_time_cycle": null,
                    "evn_time_duration": null,
                    "evn_behavior": "CATCH"
                    "bou_x": "517",
                    "bou_y": "19",
                    "bou_width": "33",
                    "bou_height": "33",
                    "bou_container": "bpmnDiagram"
                },
                  {
                      "evn_uid": "856003291534fecfae5dff7085708495",
                      "evn_name": "End # 1",
                      "evn_type": "END",
                      "evn_marker": "EMPTY",
                      "evn_is_interrupting": "1",
                      "evn_cancel_activity": "0",
                      "evn_activity_ref": null,
                      "evn_wait_for_completion": "0",
                      "evn_error_name": null,
                      "evn_error_code": null,
                      "evn_escalation_name": null,
                      "evn_escalation_code": null,
                      "evn_message": "",
                      "evn_operation_name": null,
                      "evn_operation_implementation_ref": null,
                      "evn_time_date": null,
                      "evn_time_cycle": null,
                      "evn_time_duration": null,
                      "evn_behavior": "THROW",
                      "bou_x": "549",
                      "bou_y": "181",
                      "bou_width": "33",
                      "bou_height": "33",
                      "bou_container": "bpmnDiagram"
                  }
            "gateways": [],
            "flows": [
                {
                    "flo_uid": "17092374253551306216a72013534569",
                    "flo_type": "SEQUENCE",
                    "flo_name": null,
                    "flo_element_origin": "569214945534fecfa8f0835033274864",
                    "flo_element_origin_type": "bpmnActivity",
                    "flo_element_dest": "856003291534fecfae5dff7085708495",
                    "flo_element_dest_type": "bpmnEvent",
                    "flo_is_inmediate": "1",
                    "flo_condition": null,
                    "flo_x1": "561",
                    "flo_y1": "193",
                    "flo_x2": "577"
                    "flo_y2": "193",
                    "flo_state": [
                {
                    "x": 566,
                    "y": 145
                },
                {
                    "x": 566,
                    "y": 171
                },
                {
                    "x": 602,
                    "y": 171
                },
                {
                    "x": 602,
                    "y": 198
                },
                {
                    "x": 582,
                    "y": 198
                }
            ]
        },
        {
            "flo_uid": "304762728534fecfaf3bf88040991913"
            "flo_type": "SEQUENCE",
            "flo_name": null,
            "flo_element_origin": "259220802534fecfad49854013091940",
            "flo_element_origin_type": "bpmnEvent",
            "flo_element_dest": "569214945534fecfa8f0835033274864",
            "flo_element_dest_type": "bpmnActivity",
            "flo_is_inmediate": "1",
            "flo_condition": null,
            "flo_x1": "529",
            "flo_y1": "95",
            "flo_x2": "556",
            "flo_y2": "95",
            "flo_state": [
                {
                    "x": 534,
                    "y": 52
                },
                {
                    "x": 534,
                    "y": 76
                },
                {
                    "x": 561,
                    "y": 76
                },
                {
                    "x": 561,
                    "y": 100
                }
            ]
        }
    ],
    "artifacts": [],
    "laneset": [],
    "lanes": []
    }
  ]
 }

Response

 200 (OK)

Delete Project: DELETE project/{uid}

Delete a project.

DELETE /api/1.0/{workspace}/project/{uid}

Parameters:

NameTypeDescription
workspaceStringWorkspace name
uidStringProject UID

Result:

TypeDescription
emptyNo return

Example:

Response

 200 (OK)

Create BPMN Project: POST project/generate-bpmn

Creates a BPMN Project for a given process.

POST /api/1.0/{workspace}/project/generate-bpmn

Parameters:

NameTypeDescription
workspaceStringWorkspace name

Required Fields:

NameTypeDescription
pro_uidStringProcess UID

Result:

TypeDescription
objectReturns an object the data sent plus the "prj_uid" attribute

Example:

Request

 Content-Type: application/json
 {
    "pro_uid": "177459544536a7b17a4ead3036190234"
 }

Response

  201 (Created)
  {
     "prj_uid": "84880409353d7fdfec43975021914082",
     "pro_uid": "177459544536a7b17a4ead3036190234"
  }

Event endpoints

The following are the methods currently implemented for the event resources in the designer end point of the ProcessMaker API.

1. Get events of a project

2. Get event messages of a project

3. Get event conditions of a project

4. Get event multiple items of a project

5. Get a single event of a project

6. Create a new event for a project

7. Update an event in a project

8. Delete an event of a project

Event resources:

NameDescriptionType Value
evn_uidEvent UIDStringString
evn_descriptionEvent descriptionStringString
evn_statusEvent statusString“ACTIVE” or “INACTIVE” (Unique values)
evn_actionVariable for the priority of the caseString“SEND_MESSAGE”, “EXECUTE_CONDITIONAL_TRIGGER” or “EXECUTE_TRIGGER” (Unique values)
evn_related_toTemplate of the derivation screenString“SINGLE” or “MULTIPLE” (Unique values)
tas_uidTask UID, if it is an event with a single taskString“h3kj231…” (Task UID)
evn_tas_uid_fromInitial task UID, if it is an event with a range of tasksString“h3kj231…”(Task UID)
evn_tas_estimated_durationTime lapse for the completion of the tasks. (Type value of the variable "evn_time_unit")String2 (Numeric Value)
evn_time_unitValue type of the time lapse when performing a task or tasksString“DAYS” or “HOURS” (Unique values)
evn_whenValue in days of the time lapse for the execution of the eventInteger3 (Numeric Value)
evn_when_occursTime in which the event will be heldInteger“AFTER_TIME” or “TASK_STARTED” (Numeric Value)
tri_uidTrigger UID in which the event will be executedInteger2 (Integer value)
evn_tas_uid_toFinal task UID, if it is an event with a range of tasksString“DAYS” or “HOURS” (Unique values)
evn_conditionsCondition which if is accomplished, the event will executeString“@@VAL == 2” (Condition value)

Get Events List: GET project/{prj_uid}/events

Get a list of the events in a project.

GET /api/1.0/{workspace}/project/{prj_uid}/events

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID

Result:

TypeDescription
arrayReturns an array of existing events in the process

Example:

Response

 200 (OK)
 Content-Type: application/json
 [
    {
         "evn_uid": "58444125052cc6b0763c9e7073755888",
         "evn_action": "SEND_MESSAGE",
         "evn_status": "ACTIVE",
         "evn_when_occurs": "AFTER_TIME",
         "evn_related_to": "SINGLE",
         "evn_description": "change description",
         "tas_uid": "97192372152a5c78f04a794095806311",
         "evn_tas_uid_from": "",
         "evn_tas_uid_to": "",
         "evn_tas_estimated_duration": 1,
         "evn_time_unit": "DAYS",
         "evn_when": 1,
         "evn_conditions": null,
         "tri_uid": "75916963152cc6ab085a704081670580"
     },
     {
         "evn_uid": "89509271952cc6a790edf82030863972",
         "evn_action": "SEND_MESSAGE",
         "evn_status": "ACTIVE",
         "evn_when_occurs": "AFTER_TIME",
         "evn_related_to": "SINGLE",
         "evn_description": "change description",
         "tas_uid": "97192372152a5c78f04a794095806311",
         "evn_tas_uid_from": "",
         "evn_tas_uid_to": "",
         "evn_tas_estimated_duration": 1,
         "evn_time_unit": "DAYS",
         "evn_when": 1,
         "evn_conditions": null,
         "tri_uid": "95325847552af0c07792c15098680510"
    }
 ]

Get Event Messages: GET project/{prj_uid}/events?filter=message

Get a list of the event messages in a project.

GET /api/1.0/{workspace}/project/{prj_uid}/events?filter=message

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID

Optional Parameters:

NameTypeDescription
filterStringEvent type to be listed ("message")

Result:

TypeDescription
arrayReturns an array of existing events in the process

Example:

Response

 200 (OK)
 Content-Type: application/json
 [
   {
       "evn_uid": "58444125052cc6b0763c9e7073755888",
       "evn_action": "SEND_MESSAGE",
       "evn_status": "ACTIVE",
       "evn_when_occurs": "AFTER_TIME",
       "evn_related_to": "SINGLE",
       "evn_description": "change description",
       "tas_uid": "97192372152a5c78f04a794095806311",
       "evn_tas_uid_from": "",
       "evn_tas_uid_to": "",
       "evn_tas_estimated_duration": 1,
       "evn_time_unit": "DAYS",
       "evn_when": 1,
       "evn_conditions": null,
       "tri_uid": "75916963152cc6ab085a704081670580"
    },
    {
        "evn_uid": "89509271952cc6a790edf82030863972",
        "evn_action": "SEND_MESSAGE",
        "evn_status": "ACTIVE",
        "evn_when_occurs": "AFTER_TIME",
        "evn_related_to": "SINGLE",
        "evn_description": "change description",
        "tas_uid": "97192372152a5c78f04a794095806311",
        "evn_tas_uid_from": "",
        "evn_tas_uid_to": "",
        "evn_tas_estimated_duration": 1,
        "evn_time_unit": "DAYS",
        "evn_when": 1,
        "evn_conditions": null,
        "tri_uid": "95325847552af0c07792c15098680510"
    }
 ]

Get Event Condition: GET project/{prj_uid}/events?filter=conditional

Get a list of the event conditions in a project.

GET /api/1.0/{workspace}/project/{prj_uid}/events?filter=conditional

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID

Optional Parameters:

NameTypeDescription
filterStringEvent type to be listed ("conditional")

Result:

TypeDescription
arrayReturns an array of existing events in the process

Example:

Response

 200 (OK)
 Content-Type: application/json
 [
   {
       "evn_uid": "11122125052cc6b0763c9e7073755888",
       "evn_action": "EXECUTE_CONDITIONAL_TRIGGER",
       "evn_status": "ACTIVE",
       "evn_when_occurs": "AFTER_TIME",
       "evn_related_to": "SINGLE",
       "evn_description": "change description",
       "tas_uid": "97192372152a5c78f04a794095806311",
       "evn_tas_uid_from": "",
       "evn_tas_uid_to": "",
       "evn_tas_estimated_duration": 1,
       "evn_time_unit": "DAYS",
       "evn_when": 1,
       "evn_conditions": null,
       "tri_uid": "75916963152cc6ab085a704081670580"
    },
    {
        "evn_uid": "asdf9271952cc6a790edf82030863972",
        "evn_action": "EXECUTE_CONDITIONAL_TRIGGER",
        "evn_status": "ACTIVE",
        "evn_when_occurs": "AFTER_TIME",
        "evn_related_to": "SINGLE",
        "evn_description": "change description",
        "tas_uid": "97192372152a5c78f04a794095806311",
        "evn_tas_uid_from": "",
        "evn_tas_uid_to": "",
        "evn_tas_estimated_duration": 1,
        "evn_time_unit": "DAYS",
        "evn_when": 1,
        "evn_conditions": null,
        "tri_uid": "95325847552af0c07792c15098680510"
    }
 ]

Get Multiple Events List: GET project/{prj_uid}/events?filter=multiple

Get a list of the multiple events in a project.

GET /api/1.0/{workspace}/project/{prj_uid}/events?filter=multiple

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID

Optional Parameters:

NameTypeDescription
filterStringEvent type to be listed ("multiple")

Result:

TypeDescription
arrayReturns an array of existing events in the process

Example:

Response

 200 (OK)
 Content-Type: application/json
 [
   {
       "evn_uid": "ttyyu4125052cc6b0763c9e7073755888",
       "evn_action": "EXECUTE_TRIGGER",
       "evn_status": "ACTIVE",
       "evn_when_occurs": "AFTER_TIME",
       "evn_related_to": "SINGLE",
       "evn_description": "change description",
       "tas_uid": "97192372152a5c78f04a794095806311",
       "evn_tas_uid_from": "",
       "evn_tas_uid_to": "",
       "evn_tas_estimated_duration": 1,
       "evn_time_unit": "DAYS",
       "evn_when": 1,
       "evn_conditions": null,
       "tri_uid": "75916963152cc6ab085a704081670580"
    },
    {
        "evn_uid": "q34fd2471952cc6a790edf82030863972",
        "evn_action": "EXECUTE_TRIGGER",
        "evn_status": "ACTIVE",
        "evn_when_occurs": "AFTER_TIME",
        "evn_related_to": "SINGLE",
        "evn_description": "change description",
        "tas_uid": "97192372152a5c78f04a794095806311",
        "evn_tas_uid_from": "",
        "evn_tas_uid_to": "",
        "evn_tas_estimated_duration": 1,
        "evn_time_unit": "DAYS",
        "evn_when": 1,
        "evn_conditions": null,
        "tri_uid": "95325847552af0c07792c15098680510"
    }
 ]

Get Event: GET project/{prj_uid}/event/{evn_uid}

Get information about an event.

GET /api/1.0/{workspace}/project/{prj_uid}/event/{evn_uid}

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID
evn_uidStringEvent UID

Result:

TypeDescription
objectReturns an object with the event data

Example:

Response

 200 (OK)
 Content-Type: application/json
 {
    "evn_uid": "58444125052cc6b0763c9e7073755888",
    "evn_action": "SEND_MESSAGE",
    "evn_status": "ACTIVE",
    "evn_when_occurs": "AFTER_TIME",
    "evn_related_to": "SINGLE",
    "evn_description": "change description",
    "tas_uid": "97192372152a5c78f04a794095806311",
    "evn_tas_uid_from": "",
    "evn_tas_uid_to": "",
    "evn_tas_estimated_duration": 1,
    "evn_time_unit": "DAYS",
    "evn_when": 1,
    "evn_conditions": null,
    "tri_uid": "75916963152cc6ab085a704081670580"
 }

Create Event: POST project/{prj_uid}/event

Create a new event.

POST /api/1.0/{workspace}/project/{prj_uid}/event

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID

Required Fields:

NameTypeDescription
evn_descriptionStringEvent description
evn_statusStringEvent status
evn_actionStringVariable for the priority case
evn_related_toStringTemplate of the derivation screen
tas_uidStringTask UID. Only if evn_related_to = "SINGLE"
evn_tas_uid_fromStringInitial task UID. Only if evn_related_to = "MULTIPLE"
evn_tas_estimated_durationStringTime lapse for the completion of the tasks
evn_time_unitStringValue type of the time lapse when performing a task or tasks
evn_whenIntegerValue in days of the time lapse for the execution of the event
evn_when_occursIntegerTime in which the event will be held
tri_uidIntegerTrigger UID in which the event will be executed
evn_tas_uid_toStringFinal task UID. Only if evn_related_to = "MULTIPLE"

Optional Fields:

NameTypeDescription
evn_conditionsStringCondition which if is accomplished, the event will execute

Result:

TypeDescription
objectReturns an object with data of the created event

Example:

Request

 Content-Type: application/json
 {
    "evn_description": "event 1",
    "evn_status": "ACTIVE",
    "evn_action": "SEND_MESSAGE",
    "evn_related_to": "MULTIPLE",
    "evn_tas_uid_from": "97192372152a5c78f04a794095806311",
    "evn_tas_uid_to": "58444125052cc6b0763c9e7073755888",
    "evn_tas_estimated_duration": 1,
    "evn_time_unit": "DAYS",
    "evn_when": 1,
    "evn_when_occurs": "AFTER_TIME",
    "tri_uid": "95325847552af0c07792c15098680510"
 }

Response

  201 (Created)

Update Event: PUT project/{prj_uid}/event/{evn_uid}

Update an event.

PUT /api/1.0/{workspace}/project/{prj_uid}/event/{evn_uid}

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID
evn_uidStringEvent UID

Required Fields:

NameTypeDescription
evn_descriptionStringEvent description
evn_statusStringEvent status
evn_actionStringVariable for the priority case
evn_related_toStringTemplate of the derivation screen
tas_uidStringTask UID. Just if evn_related_to = "SINGLE"
evn_tas_uid_fromStringInitial task UID. Just if evn_related_to = "MULTIPLE"
evn_tas_estimated_durationStringTime lapse for the completion of the tasks
evn_time_unitStringValue type of the time lapse when performing a task or tasks
evn_whenIntegerValue in days of the time lapse for the execution of the event
evn_when_occursIntegerTime in which the event will occur.
tri_uidIntegerTrigger UID in which the event will be executed
evn_tas_uid_toStringFinal task UID. Just if evn_related_to = "MULTIPLE"

Optional Fields:

NameTypeDescription
evn_conditionsStringCondition which if is accomplished, the event will execute

Result:

TypeDescription
emptyNo return

Example:

Request

 Content-Type: application/json
 {
    "evn_description": "change description",
    "evn_status": "ACTIVE",
    "evn_action": "SEND_MESSAGE",
    "evn_related_to": "SINGLE",
    "tas_uid": "97192372152a5c78f04a794095806311",
    "evn_tas_estimated_duration": 1,
    "evn_time_unit": "DAYS",
    "evn_when": 1,
    "evn_when_occurs": "AFTER_TIME",
    "tri_uid": "95325847552af0c07792c15098680510"
 }

Response

  200 (OK)

Delete Event: DELETE project/{prj_uid}/event/{evn_uid}

Delete an event.

DELETE /api/1.0/{workspace}/project/{prj_uid}/event/{evn_uid}

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID
evn_uidStringEvent UID

Result:

TypeDescription
emptyNo return

Example:

Response

  200 (OK)

Export Project

The following is the method for exporting a project from the ProcessMaker API.

1. Export a project

Export Project:

NameDescriptionType Value
workspaceWorkspace nameString“workflow”
prj_uidProject UIDString“9541049475298f190420f51086854718” (String of 32 characters)

Export Project: GET project/{prj_uid}/export

Export a project.

GET /api/1.0/{workspace}/project/{prj_uid}/export

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID

Result:

TypeDescription
XMLReturns an xml with all process information

Example:

Response

Content-Type: xml
200 (OK)
<?xml version="1.0" encoding="utf-8"?>
<ProcessMaker-Project version="3.0">
   <metadata>
      <meta key="workspace">workflow</meta>
      <meta key="name">My Project</meta>
      <meta key="uid">4197736685367bbca5bee15040503918</meta>
      …
   </metadata>
   <definition class="BPMN">
      <table name="PROJECT">
         <record>
            <prj_uid>4197736685367bbca5bee15040503918</prj_uid>
            <prj_name>My Project</prj_name>
            ...
         </record>
      </table>
      <table name="PROCESS">
         <record>
            <pro_uid>5417674845367bbca675488032419039</pro_uid>
            <prj_uid>4197736685367bbca5bee15040503918</prj_uid>
            <pro_name>My Project</pro_name>
            ...
         </record>
      </table>
      …
   </definition>
   <definition class="workflow">
      <table name="process">
         <record>
            <pro_uid>4197736685367bbca5bee15040503918</pro_uid>
            <pro_title>My Project</pro_title>
            ...
         </record>
      </table>
      <table name="tasks"/>
      <table name="dynaforms"/>
      ...
   </definition>
   <workflow-files/>
</ProcessMaker-Project>

Import Project

Import Project: POST /project/import?option={option}&option_group={option_group}

Import a project.

POST /api/1.0/{workspace}/project/import?option={option}&option_group={option_group}

Parameters:

Name Description Type Value
workspace Workspace name String “workflow”
prj_uid Project UID String “9541049475298f190420f51086854718” (string of 32 characters)
option (Optional) Option that indicates what to do a project with the same unique ID already exists in the workspace. If not set, the default option will be CREATE. The available options are:
  • CREATE: Creates a new project and assign new unique IDs to all the objects in the imported project.
  • OVERWRITE: Overwrites the existing project, keeping the same unique IDs in the imported project.
  • DISABLE: Disables the existing project and create a new version of the project with new unique IDs assigned to all the objects in the imported project.
  • KEEP: Keeps the existing project and creates a completely new project with new unique IDs in all the objects of the imported project.
String "CREATE", "OVERWRITE", "DISABLE", "KEEP" (Unique values).
option_group Group option that indicates what to do a if the imported project has group(s) of users with the same name of already existing group(s). If not set, the default option will be CREATE. The available options are:
  • CREATE: Imports/Creates the group(s).
  • RENAME: Renames the imported groups.
  • MERGE: Merges the imported groups, with the existing groups (no changes will be made to the local groups).
String "CREATE", "RENAME ", "MERGE" (unique values)

Required Fields:

Name Description Type Value
project_file “pmx” file String “MyProject.pmx”

Note.- Files are imported with the .pmx format, see example below. It is not possible to use those process in older versions of ProcessMaker and viceversa.

Result:

Type Description
object The return is an object and the prj_uid attribute

Example:

Request

 <?php
      $url  = "http://processmaker.example.com/api/1.0/workflow/project/import";
      $accessToken = "2443abcdef12345087362abcdef22458913";
      $projectFilePath = "/path/to/project/MyProject.pmx";
      $header = array(
            "Authorization: Bearer " . $accessToken
      );

      $aPost = array(
           "project_file" => new CURLFile($projectFilePath) //if using PHP 5.5.0 or later

          //Note: if using PHP 5.4.X or earlier, then access the project file this way:
          //"project_file" => "@" . $projectFilePath
      );
         
      //Send file
      $ch = curl_init();
      curl_setopt($ch, CURLOPT_URL, $url);
      curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
      curl_setopt($ch, CURLOPT_POSTFIELDS, $aPost);
      curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
      $arrayResponse = (array)(json_decode(curl_exec($ch)));
      curl_close($ch);
      var_dump($arrayResponse);

      //if failed to import because the project already exists, then resend the file
      //with options to create a new project and merge groups with existing groups
      if (!isset($arrayResponse["prj_uid"])) {
         $ch = curl_init();
         curl_setopt($ch, CURLOPT_URL, $url . "?option=keep&option_group=merge");
         curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
         curl_setopt($ch, CURLOPT_POSTFIELDS, $aPost);
         curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
         $arrayResponse = (array)(json_decode(curl_exec($ch)));
         curl_close($ch);
         var_dump($arrayResponse);
      }
?>

Response

 201 (Created)
 {
  "prj_uid": "8131652775363e959e5fdf4087993497"
  "prj_file": "MyProject.pmx"
 }

Case Task

The following is the method currently implemented for the case tasks of the designer in the ProcessMaker API.

1. Get case tasks

Case Task:

Name Description Type Value
app_uid Case UID String String of 32 characters.
tas_uid Task UID String String
tas_title Task title String String
tas_type Task type String String
routing Route Array Array with the task information
rou_type Derivation type Integer 0: Sequential, 1: Select, 2: Evaluate, 3: Parallel, 4: Parallel-By-Evaluation, 5: Sec-Join
to Task route Array Array with the information of a specific task
rou_next_task Next route task String Task UID In the case this is a final task it will have the value of -1
rou_conditional Route condition String If the condition exits
rou_optional Route condition String If the condition exists
usr_uid User UID who executes the task String String of 32 characters.
usr_firstname Username who executes the task String String
usr_lastname User lastname who executes the task String String
del_init_date Initial task date Datetime "2014-01-01 00:00:00"
del_task_due_date Due date task Datetime "2014-01-01 00:00:00"
del_finish_date End task date Datetime "2014-01-01 00:00:00"
duration Task duration Datetime E.g. 120 Hours 22 Minutes 56 Seconds
status Task status String -Task in progress. -Finished task. -Pending task/Not executed. -Yellow, parallel task
tas_assign_type Assignment type String BALANCED, Cyclical Assignment. MANUAL, Manual Assignment. EVALUATE, Based Assignment. REPORT_TO, Reports to. SELF_SERVICE, Self Service. SELF_SERVICE_EVALUATE, Self Service Value Based Assignment
tas_assign_location Location of the assigned users String TRUE, FALSE
tas_assign_location_adhoc Location of the assigned ad hoc users String TRUE, FALSE
tas_last_assigned Last assignment String String of 32 characters
tas_start Initial task String TRUE, FALSE
tas_to_last_user Task to the last user String TRUE, FALSE
tas_derivation Derivation String NORMAL

Get Tasks in Case: GET cases/{app_uid}/tasks

Get a list of the tasks in a given case.

GET /api/1.0/{workspace}/cases/{app_uid}/tasks

Parameters:

Name Type Description
workspace String Workspace name
app_uid String Case UID

Result:

Type Description
array Returns an array with data of the tasks

Example:

Response

200 (OK)
Content-Type: application/json
[
   {
      "tas_uid": "19637005553206ad2306ad9052977300",
      "tas_type": "NORMAL",
      "tas_title": "Task 5",
      "tas_assign_type": "BALANCED",
      "tas_assign_location": "FALSE",
      "tas_assign_location_adhoc": "FALSE",
      "tas_last_assigned": "00000000000000000000000000000001",
      "tas_start": "TRUE",
      "tas_to_last_user": "FALSE",
      "tas_derivation": "NORMAL",
      "routing": {
         "rou_type": "EVALUATE",
         "to": [
            {
               "rou_next_task": "797629896534ecfddb82881064189585",
               "rou_condition": "@@continue==\"yes\"",
               "rou_to_last_user": "FALSE",
               "rou_optional": "FALSE",
               "usr_uid": "Administrator Last",
               "usr_firstname": "Administrator",
               "usr_lastname": "Last",
               "del_init_date": "2014-04-16 15:25:57",
               "del_task_due_date": "2014-04-17 15:25:57",
               "del_finish_date": "2014-04-21 15:48:53",
               "duration": "120 Hours 22 Minutes 56 Seconds"
            },
            {
               "rou_next_task": "-1",
               "rou_condition": "@@continue==\"no\"",
               "rou_to_last_user": "FALSE",
               "rou_optional": "FALSE",
               "usr_uid": "Administrator Last",
               "usr_firstname": "Administrator",
               "usr_lastname": "Last",
               "del_init_date": "2014-04-16 15:25:57",
               "del_task_due_date": "2014-04-17 15:25:57",
               "del_finish_date": "2014-04-21 15:48:53",
               "duration": "120 Hours 22 Minutes 56 Seconds"
            }
         ]
      },
      "status": "Task in Progress"
   },
   {
      "tas_uid": "797629896534ecfddb82881064189585",
      "tas_type": "NORMAL",
      "tas_title": "Cyclical",
      "tas_assign_type": "BALANCED",
      "tas_assign_location": "FALSE",
      "tas_assign_location_adhoc": "FALSE",
      "tas_last_assigned": "00000000000000000000000000000001",
      "tas_start": "TRUE",
      "tas_to_last_user": "FALSE",
      "tas_derivation": "NORMAL",
      "routing": {
         "rou_type": 0,
         "to": [
            {
               "rou_next_task": "-1",
               "rou_condition": "",
               "rou_to_last_user": "FALSE",
               "rou_optional": "FALSE",
               "usr_uid": "Administrator Last",
               "usr_firstname": "Administrator",
               "usr_lastname": "Last",
               "del_init_date": "2014-05-08 16:03:03",
               "del_task_due_date": "2014-04-22 15:48:54",
               "del_finish_date": "Not finished",
               "duration": "Not finished"
            }
         ]
      },
      "status": "Task in Progress"
   }
]

Process endpoints

The following are the methods currently implemented for managing the resources of a process inside a project in the ProcessMaker API.

1. Get a process

2. Update a process

Process resources:

Name Description Type Value
prj_uid Project UID String "9541049475298f190420f51086854718" String of 32 characters
pro_uid Process UID String "9541049475298f190420f51086854718" String of 32 characters
pro_title Process title String "title..."
pro_description Process description String "Description..."
pro_parent Parent process UID (if the process does not have a parent this field is left empty) String "9541049475298f190420f51086854718" String of 32 characters
pro_status Process status String "ACTIVE", "INACTIVE" (unique values)
pro_show_message Hide the case number and the case title in the steps Integer 0,1 (unique values)
pro_subprocess This is a subprocess Integer 0,1 (unique values)
pro_tri_deleted Trigger UID (Execute a trigger when the case is deleted) String "9541049475298f190420f51086854718" String of 32 characters
pro_tri_canceled Trigger UID (Execute a trigger when a case is canceled) String "9541049475298f190420f51086854718" String of 32 characters
pro_tri_paused Trigger UID (Execute a trigger when a case is paused) String "9541049475298f190420f51086854718" String of 32 characters
pro_tri_reassigned Trigger UID (Execute a trigger when a case is reassigned) String "9541049475298f190420f51086854718" String of 32 characters
pro_category Process category UID String "9541049475298f190420f51086854718" String of 32 characters
pro_update_date Process update date Datetime "2013-04-23 14:54:57"
pro_create_date Process create date Datetime "2013-04-23 14:54:57"
pro_create_user Process user owner UID String "9541049475298f190420f51086854718" String of 32 characters
pro_debug Debug Integer 0,1 (unique values)
pro_derivation_screen_tpl Routing screen template String "MyTemplate.html"
pro_summary_dynaform Dynaform UID (Dynaform to show a case summary) String "9541049475298f190420f51086854718" String of 32 characters
pro_calendar Calendar UID (Process calendar) String "9541049475298f190420f51086854718" String of 32 characters

Get Process: GET project/{prj_uid}/process/

Get information about a process.

GET /api/1.0/{workspace}/project/{prj_uid}/process

Parameters:

Name Type Description
workspace String Workspace name
prj_uid String Project UID
pro_uid String Process UID

Result:

Type Description
object Returns an object with information about the process

Example:

Response

 200 (OK)
{
   "pro_uid": "14414793652a5d718b65590036026581",
   "pro_title": "Sample Project #1",
   "pro_description": "Description...",
   "pro_parent": "14414793652a5d718b65590036026581",
   "pro_status": "INACTIVE",
   "pro_show_message": 1,
   "pro_subprocess": 1,
   "pro_tri_deleted": "39979192352f11fa180f9a3046876080",
   "pro_tri_canceled": "32636698052efa15b2e75a9095960272",
   "pro_tri_paused": "32636698052efa15b2e75a9095960272",
   "pro_tri_reassigned": "32636698052efa15b2e75a9095960272",
   "pro_category": "946156723508e864dbf85b9084284874",
   "pro_update_date": null,
   "pro_create_date": "2013-04-23 14:54:57",
   "pro_create_user": "00000000000000000000000000000001",
   "pro_debug": 1,
   "pro_derivation_screen_tpl": "MyTemplate.html",
   "pro_summary_dynaform": "77941473952b49c65a01a80041727578",
   "pro_calendar": "86431145652efa6f2413d29045495711"
}

Update Process: PUT project/{prj_uid}/process

Update a process.

PUT /api/1.0/{workspace}/project/{prj_uid}/process

Parameters:

Name Type Description
workspace String Workspace name
prj_uid String Project UID

Required Fields

pro_uid String Process UID

Optional Fields

Name Type Description
pro_title String Process title
pro_description String Process description
pro_parent String Process parent UID (if the process does not have a parent this field is left empty)
pro_status String Process status
pro_show_message Integer Hide the case number and the case title in the steps
pro_subprocess Integer This is a subprocess
pro_tri_deleted String Trigger UID (Execute a trigger when a case is deleted)
pro_tri_canceled String Trigger UID (Execute a trigger when a case is canceled)
pro_tri_paused String Trigger UID (Execute a trigger when a case is paused)
pro_tri_reassigned String Trigger UID (Execute a trigger when a case is reassigned)
pro_category String Process category UID
pro_debug Integer 0,1 (unique values)
pro_derivation_screen_tpl String Routing screen template
pro_summary_dynaform String Dynaform UID (Dynaform to show a case summary)
pro_calendar String Calendar UID (Process calendar)

Result:

Type Description
empty No return

Example:

Request

Content-Type: application/json
{
   "pro_title": "Sample Project #1...",
   "pro_description": "Description... ...",
   "pro_parent": "14414793652a5d718b65590036026581",
   "pro_status": "ACTIVE",
   "pro_show_message": 1,
   "pro_subprocess": 1,
   "pro_tri_deleted": "39979192352f11fa180f9a3046876080",
   "pro_tri_canceled": "32636698052efa15b2e75a9095960272",
   "pro_tri_paused": "32636698052efa15b2e75a9095960272",
   "pro_tri_reassigned": "32636698052efa15b2e75a9095960272",
   "pro_category": "946156723508e864dbf85b9084284874",
   "pro_update_date": null,
   "pro_create_date": "2013-04-23 14:54:57",
   "pro_create_user": "00000000000000000000000000000001",
   "pro_debug": 0,
   "pro_derivation_screen_tpl": "MyTemplate.html",
   "pro_summary_dynaform": "77941473952b49c65a01a80041727578",
   "pro_calendar": "86431145652efa6f2413d29045495711"
}

Response

200 (OK)

Process Variables endpoints

Process variables (which are also called "case variables") are variables which are listed under Variables in the process designer sidebar. These variables can be associated with controls in DynaForms and exported in Report Tables. The following endpoints can be used to manipulate process variables:

  1. Get Process Variables List: GET project/{prj_uid}/process-variables
  2. Get Process Variable: GET project/{prj_uid}/process-variable/{var_uid}
  3. Create Process Variable: POST project/{prj_uid}/process-variable
  4. Update Process Variable: PUT project/{prj_uid}/process-variable/{var_uid}
  5. Delete Process Variable: DELETE project/{prj_uid}/process-variable/{var_uid}
  6. Query Options in Variable's Control: POST project/{prj_uid}/process-variable/{var_name}/execute-query-suggest

Get Variables List: GET project/{prj_uid}/process-variables

Get a list of the process variables in a project.

GET /api/1.0/{workspace}/project/{prj_uid}/process-variables

URL Parameters:

NameDescriptionExample
workspaceWorkspace name, which is workflow by default.http://example.com/api/1.0/workflow/project/403523844589b4eb42a0371030886565/process-variables
prj_uidUnique ID of the project or process.http://example.com/api/1.0/workflow/project/403523844589b4eb42a0371030886565/process-variables

Result:

If successful, the HTTP status is 200 (OK) and it returns an array of objects with information about each variable in the process.

Example:

Response

200 (OK)
Content-Type: application/json
[
   {
      "var_uid": "4415812967531539f30a166211600459",
      "prj_uid": "812967531539f30a1662116004594415",
      "var_name": "salary",
      "var_field_type": "float",
      "var_field_size": "10",
      "var_label": "float",
      "var_dbconnection": "workflow",
      "var_dbconnection_label": "PM Database",
      "var_sql": "",
      "var_null": 0,
      "var_default": "38000.00",
      "var_accepted_values": "[]"
      "inp_doc_uid": ""
   },
   {
      "var_uidv": "57820440553b1a6e4304938032532769",
      "prj_uid": "812967531539f30a1662116004594415",
      "var_name": "companyName",
      "var_field_type": "string",
      "var_field_size": 10,
      "var_label": "string",
      "var_dbconnection": "593565383589b7e57b8f698065544771",
      "var_dbconnection_label": "[localhost:3306] mysql: clients",
      "var_sql": "SELECT COMPANY_NAME, COMPANY_NAME FROM PRIMARY_CLIENTS ORDER BY CLIENT_ID",
      "var_null": 1,
      "var_default": "",
      "var_accepted_values": "[]",
      "inp_doc_uid": ""
   }
]

Get Process Variable: GET project/{prj_uid}/process-variable/{var_uid}

Get a process variable.

GET /api/1.0/{workspace}/project/{prj_uid}/process-variable/{var_uid}

URL Parameters:

NameDescriptionExample
workspaceWorkspace name, which is workflow by default.http://example.com/api/1.0/workflow/project/403523844589b4eb42a0371030886565/process-variable/709254783589b7ddb84ca28030749329
prj_uidUnique ID of the project or process.http://example.com/api/1.0/workflow/project/403523844589b4eb42a0371030886565/process-variable/709254783589b7ddb84ca28030749329
var_uidUnique ID of variable.http://example.com/api/1.0/workflow/project/403523844589b4eb42a0371030886565/process-variable/709254783589b7ddb84ca28030749329

Result:

TypeDescription
objectReturns an object with data of the requested variable

Example:

Response

200 (OK)
Content-Type: application/json
{
   "var_uidv": "57820440553b1a6e4304938032532769",
   "prj_uid": "812967531539f30a1662116004594415",
   "var_name": "companyName",
   "var_field_type": "string",
   "var_field_size": 10,
   "var_label": "string",
   "var_dbconnection": "593565383589b7e57b8f698065544771",
   "var_dbconnection_label": "[localhost:3306] mysql: clients",
   "var_sql": "SELECT COMPANY_NAME, COMPANY_NAME FROM PRIMARY_CLIENTS ORDER BY CLIENT_ID",
   "var_null": 1,
   "var_default": "",
   "var_accepted_values": "[]",
   "inp_doc_uid": ""
}

Create Process Variable: POST project/{prj_uid}/process-variable

Create a process variable.

POST /api/1.0/{workspace}/project/{prj_uid}/process-variable

URL Parameters:

NameDescriptionExample
workspaceWorkspace name, which is workflow by default.http://example.com/api/1.0/workflow/project/403523844589b4eb42a0371030886565/process-variable
prj_uidUnique ID of the project or process.http://example.com/api/1.0/workflow/project/403523844589b4eb42a0371030886565/process-variable

POST parameters:

ElementTypeDescription
{
"var_name": "country",StringRequired. Name of new variable, which must start with a letter or underscore and may only contain letters, numbers or underscores in the rest of the name. No spaces or symbols are allowed and non-ASCII characters are not recommended.
"var_field_type": "float",StringRequired. Variable type, which may be: "string", "integer", "boolean", "float", "datetime", "grid", "array", "file" or "multiplefile".
If set to "multiplefile", "datetime" or "grid", then only "var_name", "var_field_type" and "var_label" will be used and any other setting will be ignored. If set to "file", then only "var_name", "var_field_type", "var_label" and "inp_doc_uid" will be used.
"var_label": "string",StringRequired. Variable label, which is up to 32 characters long and can accept all characters including spaces. It is generally set the variable type, but can be set to any value to guide the user.
"var_field_size": 30,IntegerOptional. The size of the variable, when it is exported to a Report Table. It is the maximum number of permitted digits for integers and floats and the maximum number of characters for strings. It is set to 0 by default.
"var_dbconnection": "workflow",StringOptional. Unique ID of the Database Connection used by the SQL query. If set to "workflow" or "", then the query will be in the database of the current workspace.
"var_sql": "SELECT IC_UID, IC_NAME from ISO_COUNTRY", StringOptional. The SQL query to initially populate the variable when it is first created in a case. Queries should be in the following format which returns two fields:
"SELECT VALUE, LABEL FROM TABLE"
where the VALUE in the first record returned by the query will set the @@variable and the LABEL will set the @@variable_label. Do NOT include the database name in the query and do NOT include ; (semicolon) at the end to terminate the query. Note that it is not possible to use variables in the query.
"var_null": 1, IntegerOptional. Set to 1 if null (no value) is allowed, or 0 if the variable must have a value. This option is used when exporting the variable to Report Tables.
"var_default": "MX"StringOptional. The default value for the variable when initially created in a case. Set to "" (empty string) by default.
"var_accepted_values": "[]"StringOptional. An array of objects in a JSON string of the values which are accepted by the variable. The format is:
"[{"value":"value1","label":"label1"},{"value":"value2","label":"label2"},...]"
For example:
"[{"value":"US","label":"United States"},{"value":"MX","label":"Mexico"}]"
For boolean variables, set the labels for the values of 1 (true) and 0 (false), such as:
"[{"value":"1","label":"Yes"},{"value":"0","label":"No"}]"
Set to NULL by default.
"inp_doc_uid": "",stringOptional. The unique ID of the Input Document associated with a file variable. For all other variable types, this is always set to "" (empty string).
}

Result:

Returns an HTTP status of 201 (Created) and an object with the following properties of the new variable:
ElementDescription
{
"var_uid": "131046792589b6dc3b7f5e1035955425",Unique ID of the new variable.
"prj_uid": "403523844589b4eb42a0371030886565",Unique ID of the process/project.
"var_name": "country",Name of the new variable.
"var_field_type": "string",Type of the variable.
"var_field_size": 0,The size of the variable, when it is exported to a Report Table. It is the maximum number of permitted digits for integers and floats and the maximum number of characters for strings. It is set to 0 by default.
"var_label": "string",Label of the variable, which is generally set to the type of variable, but it can be anything that guides the user.
"var_dbconnection": "workflow",Unique ID of the Database Connection used by the SQL query. If set to "workflow", then the query will be in the database of the current workspace.
"var_dbconnection_label": "[localhost:3306] mysql: clients",The label of the Database Connection, which has the format "[domain-name:port] database-type: database-name". If using the database of the current workspace, then set to "PM Database" by default.
"var_sql": "",The SQL SELECT statement used to populate the variable when it is initially created in a case.
"var_null": 0,If set to 1 then null values are allowed; if set to 0, then they are not allowed.
"var_default": "MX",The default value of the variable when it is initially created in a case.
"var_accepted_values": NULL,An array of objects in a JSON string of the values which are accepted by the variable.
"inp_doc_uid": "",The unique ID of the Input Document associated with a file variable. For all other variable types, this is always set to "" (empty string).
}

Example:

Request

Content-Type: application/json
{
   "var_name":            "selectCountry",
   "var_field_type":      "string",
   "var_field_size":      120,
   "var_label":           "string",
   "var_dbconnection":    "workflow",
   "var_sql":             "SELECT IC_UID, IC_NAME from ISO_COUNTRY",
   "var_null":            0,
   "var_default":         "",
   "var_accepted_values": "[]"
}

Response

201 (Created)
{
   "var_uid":                "4415812967531539f30a166211600459",
   "var_name":               "selectCountry",
   "var_field_type":         "string",
   "var_field_size":         120,
   "var_label":              "string",
   "var_dbconnection":       "workflow",
   "var_dbconnection_label": "PM Database"
   "var_sql":                "SELECT IC_UID, IC_NAME from ISO_COUNTRY",
   "var_null":               0,
   "var_default":            "",
   "var_accepted_values":    "[]",
   "inp_doc_uid":            ""
}

Update Process Variable: PUT project/{prj_uid}/process-varable/{var_uid}

Update a process variable.

PUT /api/1.0/{workspace}/project/{prj_uid}/process-variable/{var_uid}

URL Parameters:

NameDescriptionExample
workspaceWorkspace name, which is workflow by default.http://example.com/api/1.0/workflow/project/403523844589b4eb42a0371030886565/process-variable/709254783589b7ddb84ca28030749329
prj_uidUnique ID of the project or process.http://example.com/api/1.0/workflow/project/403523844589b4eb42a0371030886565/process-variable/709254783589b7ddb84ca28030749329
var_uidUnique ID of variable.http://example.com/api/1.0/workflow/project/403523844589b4eb42a0371030886565/process-variable/709254783589b7ddb84ca28030749329

Optional POST parameters:

NameTypeDescription
var_nameStringVariable name
var_field_typeStringVariable type
var_labelStringVariable label
var_field_sizeIntegerVariable size
var_dbconnectionStringDatabase connection
var_sqlStringSQL query
var_nullStringWhether the variable will accept null values
var_defaultStringValues by default
var_accepted_valuesStringAccepted values

Result:

TypeDescription
EmptyNo return

Example:

Request

Content-Type: application/json
{
   "var_name":            "selectCountry",
   "var_field_type":      "string",
   "var_field_size":      120,
   "var_label":           "string",
   "var_dbconnection":    "workflow",
   "var_sql":             "SELECT IC_UID, IC_NAME from ISO_COUNTRY",
   "var_null":            0,
   "var_default":         "",
   "var_accepted_values": "[]"
}

Response

200 (OK)

Delete Process Variable: DELETE project/{prj_uid}/process-variable/{var_uid}

Delete a process variable.

DELETE /api/1.0/{workspace}/project/{prj_uid}/process-variable/{var_uid}

URL Parameters:

NameDescriptionExample
workspaceWorkspace name, which is workflow by default.http://example.com/api/1.0/workflow/project/403523844589b4eb42a0371030886565/process-variable/709254783589b7ddb84ca28030749329
prj_uidUnique ID of the project or process.http://example.com/api/1.0/workflow/project/403523844589b4eb42a0371030886565/process-variable/709254783589b7ddb84ca28030749329
var_uidUnique ID of variable.http://example.com/api/1.0/workflow/project/403523844589b4eb42a0371030886565/process-variable/709254783589b7ddb84ca28030749329

Result:

If successful, the HTTP status is set to 200 (OK) and there is no return object.

Example:

Response

200 (OK)

Execute Query: POST project/{prj_uid}/process-variable/{var_name}/execute-query

Executes an SQL query of a dependent field, such as a dropdown box, checkgroup or radiogroup, that uses an SQL query with one or more dynamic variables to populate its list of options.

POST /api/1.0/{workspace}/project/{prj_uid}/process-variable/{var_name}/execute-query

URL Parameters:

Name Description Example
workspace Workspace name, which is "workflow" by default. http://www.example.com/api/1.0/workflow/project/84233230756cbb13a780d37064601378/process-variable/dropdownVar001/execute-query
prj_uid Unique ID of the project. This can be found by running a case with the Debugger turned on and looking at the @@PROCESS system variable. http://www.example.com/api/1.0/workflow/project/84233230756cbb13a780d37064601378/process-variable/dropdownVar001/execute-query
var_name Name of the variable assigned to the dependent field that uses an SQL query to populate its list of options. It is not possible to use this endpoint with controls that do not have an associated variable. Remember that variable names are case sensitive and they can only contain letters, numbers and _ (underscores). http://www.example.com/api/1.0/workflow/project/84233230756cbb13a780d37064601378/process-variable/dropdownVar001/execute-query

POST Parameters:

Name Description
{
'dyn_uid': '406442383573140df944390011262710', Required. The unique ID of the Dynaform that holds the dependent control associated with the specified variable.
'field_uid': 'dropdownVar001', Required. The name of the variable that is associated with the dependent field.
'COUNTRY1': 'U%', Required. The variable used in the SQL query of the dependent field. The name of this parameter will change according to the variable name. In this example, the variable used in the SQL query shown in the example below is named @@COUNTRY1, so the parameter name is 'COUNTRY1'. The string defined as its value will be used in the SQL query. The value is case insensitive. Note that at least one of the variables used in the dependent field must be present in the request body.
'app_uid': '37439823957314102c66d78026868117', Optional. The unique ID of the case whose variable will be queried for the options in the suggest box.
'del_index': 0, Optional. Delegation index of the case specified in the app_uid parameter, which counts tasks executed in the case starting from 1.
}

Result:

If successful, returns an HTTP status code of 200 (OK) and an array of objects in the following format:

[ { "value": "value1", "text" : "text1" }, { "value": "value2", "text" : "text2" } ... ]

Where "value" is the ID of each option in the control and "text" is its displayed label.

If the {var_name} doesn't exist or if the control doesn't have a SQL query defined, then the HTTP status code will be set to 400 and the response will be NULL.

Example:

A dropdown box is associated with a variable named "selectCountry" and uses the following SQL query to populate its contents:

SELECT IC_UID, IC_NAME FROM ISO_COUNTRY WHERE IC_UID LIKE @@COUNTRY1 AND IC_UID <> @@COUNTRY2

Where @@COUNTRY1 and @@COUNTRY2 are variables associated to two different textboxes.

Request

The URL is http://www.example.com/api/1.0/workflow/project/84233230756cbb13a780d37064601378/process-variable/selectCountry/execute-query and the POST variables are:

{
        "dyn_uid": "61907528958ab229099c681078186062",
        "field_id": "dropdownVar001",
        "COUNTRY1": "U%",
        "COUNTRY2" : "US",
    "app_uid": "4029846195956990555d732058297161",
        "del_index": 1
}

Response

All the countries that start with the letter U will be displayed, except the United States.

200 (OK)
[
    {
        "value": "UA",
        "text": "Ukraine"
    },
    {
        "value": "UG",
        "text": "Uganda"
    },
    {
        "value": "UM",
        "text": "United States Minor Outlying Islands"
    },
    {
        "value": "UY",
        "text": "Uruguay"
    },
    {
        "value": "UZ",
        "text": "Uzbekistan"
    }
]

Query Options in Control: POST project/{prj_uid}/process-variable/{var_name}/execute-query-suggest

Queries the options in a suggest box, dropdown box, checkgroup or radiogroup, which uses an SQL query to populate its list of options (or uses a datasource "array variable" in version 3.0.1.8 or later).

Permission:

Users must have the PM_FACTORY permission assigned to their role to perform this action.

Structure:

POST /api/1.0/{workspace}/project/{prj_uid}/process-variable/{var_name}/execute-query-suggest

URL Parameters:

Name Description Example
workspace Workspace name, which is "workflow" by default. http://www.example.com/api/1.0/workflow/project/84233230756cbb13a780d37064601378/process-variable/country/execute-query-suggest
prj_uid Unique ID of the project. This can be found by running a case with the Debugger turned on and looking at the @@PROCESS system variable. http://www.example.com/api/1.0/workflow/project/84233230756cbb13a780d37064601378/process-variable/country/execute-query-suggest
var_name Name of the variable with a suggest box, dropdown box, radiogroup or checkgroup, which uses an SQL query to populate its list of options (or uses a datasource which is "array variable" in version 3.0.1.8 or later). It is not possible to use this endpoint with controls that do not have an associated variable. Remember that variable names are case sensitive and they can only contain letters, numbers and _ (underscores). http://www.example.com/api/1.0/workflow/project/84233230756cbb13a780d37064601378/process-variable/country/execute-query-suggest

POST Parameters:

Name Description
{
'dyn_uid': '406442383573140df944390011262710', Required. The unique ID of the Dynaform that holds the control associated with the specified variable.
"field_uid": "suggestVar001", Required. The name of the variable that is associated with the suggest box, dropdown box, radiogroup or checkgroup.
"filter": "Adam", Optional. A string that searches the displayed text of the options. The search is case insensitive and can find results anywhere within the text. If not included, then all options in the suggest box are returned.
"start": 10, Optional. The number of the option where to start. The first option is 0, the second option is 1, etc. If not included, then starts at 0 by default.
"limit": 20 Optional. The maximum number of options to return, which is 10 by default.
"order_by": "ASC", Optional. The sorting order that can be "ASC" or "DESC". If not included, the response will be retrieved in an ascending order.
"app_uid": "37439823957314102c66d78026868117", Optional. The unique ID of a case whose variable will be queried for the options in the suggest box. This is only used if the datasource for the control associated with the specified variable is set to "array variable". Remember that this array variable must store its list of options in the following format: array( array('value', 'text-label'), array('value', 'text-label'), ... )
"del_index": 0, Optional. Delegation index of the case specified in the app_uid parameter, which counts tasks executed in the case starting from 1.
"variable-name": "variable-value" Optional. If the SQL statement for the control contains variable(s), then the name and value of the variable(s) should be included, so they will be inserted into the SQL statement when it is executed.
For example, if the SQL statement for the control is: SELECT CLIENT_ID, CLIENT_NAME FROM CLIENTS WHERE SALES_AREA=@@selectArea OR COUNTRY=@@selectCountry Then, the POST parameters would be something like this: "selectArea": "MIDWEST", "selectCountry": "UK"
}

Result:

If successful, returns an HTTP status code of 200 (OK) and an array of objects in the following format: [ { "value": "value1", "text" : "text1" }, { "value": "value2", "text" : "text2" } ... ]

Where "value" is the ID of each option in the control and "text" is its displayed label.

If the {var_name} doesn't exist or if the control doesn't have a defined sql query, then the HTTP status code will be set to 400 and the response will be NULL.

Example:

A suggest box is associated with a variable named "selectCountry" and it uses the following sql to populate its contents:

SELECT IC_UID, IC_NAME FROM ISO_COUNTRY

Request

The URL is http://www.example.com/api/1.0/workflow/project/84233230756cbb13a780d37064601378/process-variable/selectCountry/execute-query-suggest and the POST variables are:

{
  "filter": "Nic",
  "limit":  1000
}

Response

200 (OK)
[
  {
    "value": "DM",
    "text":  "Dominica"
  },
  {
    "value": "DO",
    "text":  "Dominican Republic"
  },
  {
    "value": "NI",
    "text":  "Nicaragua"
  }
]

PHP Example:

Using the same "selectCountry" suggest control from the previous example, the following PHP code constructs the HTML code for a list of options in an <select> box.

$oToken = pmRestLogin('YOXQRMHAMMMKSOENEDENDFQDTJTGTUUS', '32667560556abe5142235e0090500305', 'mary', 'p@s5w0rD');
if (!isset($oToken) or !isset($oToken->access_token)) {
   die("Error: Can't access ProcessMaker REST");
}

$varName = 'selectCountry';
$dynaformId = '406442383573140df944390011262710';
$projectId = '798659366573140bc117490080056441';
$url = "/api/1.0/workflow/project/$projectId/process-variable/$varName/execute-query-suggest";
$aParams = array(
   "filter"   => "",
   "limit"    => '50',
   "dyn_uid"  => $dynaformId
);

$oRet = pmRestRequest("POST", $url, $aParams, $oToken->access_token);
if ($oRet->status == 200) {
  print '<p>Select Country:<br><select id="selectCountry">';
  foreach ($oRet->response as $oOption) {
    print "<option value=\"{$oOption->value}\">{$oOption->text}</option>\n";
  }
  print '</select>';
}

Variables

These endpoints work with all types of variables, including both system and process variables, as well as variables of the old style DynaForms and the new responsive Dynaforms.

1. Get all variables

2. Get grid variables

3. Get variables in a grid

Process variables:

Name Description Type Value
prj_uidProject UIDString"9541049475298f190420f51086854718" (String of 32 characters)
var_nameVariable nameString"SYS_SYS"
var_labelLabel of the variableString"System Variables"
var_typeVariable typeString"system"
var_sourceDynaform UID (when the variable is defined in a Dynaform of the 2.x version) or variable UID (when the variable is defined for Dynaforms of PM v.3). This field will be left blank if these are system or grid variables.String"75298f190420f5108685471895410494" (string of 32 characters)
grid_uidGrid UID (Dydnaform UID)String"9541049475298f190420f51086854718" (string of 32 characters)

Get Variables List: GET project/{prj_uid}/variables

Get a list of the variables in a project, including both system and process variables.

GET /api/1.0/{workspace}/project/{prj_uid}/variables

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID

Result:

TypeDescription
arrayReturns an array with data of each variable of the process

Example:

Response

 200 (OK)
Content-Type: application/json
[
   {
      "var_name": "SYS_SYS",
      "var_label": "System Variables",
      "var_type": "system",
      "var_source": ""
   },
   {
      "var_name": "USER",
      "var_label": "User",
      "var_type": "dropdown",
      "var_source": "47014765053e4fd0e42e029057786697"
   },
   {
      "var_name": "USERNEW",
      "var_label": "UserNew",
      "var_type": "string",
      "var_source": "5053e4fd0e42e0290577866974701476"
   },
   {
      "var_name": "GRD1",
      "var_label": "[ Grid ]",
      "var_type": "grid",
      "var_source": ""
   }
]

2. Get grid variables of a process

GET /api/1.0/{workspace}/project/{prj_uid}/grid/variables

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID

Result:

TypeDescription
arrayReturns an array with data of each variable

Example:

Response

 200 (OK)
Content-Type: application/json
[
   {
      "var_name": "GRD1",
      "var_label": "[ Grid ]",
      "var_type": "grid",
      "grid_uid": "14695166352fcef372d24e6059035575"
   },
   {
      "var_name": "GRD2",
      "var_label": "[ Grid ]",
      "var_type": "grid",
      "grid_uid": "97706235952b4a16cd27a24084424857"
   }
]

Get Variables in Grid: project/{prj_uid}/grid/{grid_uid}/variables

Get a list of the variables in a grid.

GET /api/1.0/{workspace}/project/{prj_uid}/grid/{grid_uid}/variables

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID
grid_uidStringGrid UID

Result:

TypeDescription
arrayReturns an array with data of each variable

Example:

Response

200 (OK)
Content-Type: application/json
[
   {
      "var_name": "FIELD1",
      "var_label": "Field1...",
      "var_type": "text"
   },
   {
      "var_name": "USER",
      "var_label": "User",
      "var_type": "dropdown"
   },
   {
      "var_name": "DESCRIPTION",
      "var_label": "Description...",
      "var_type": "textarea"
   }
]