Overview
The following Designer endpoints are available in the ProcessMaker REST API 1.0:
- Overview
- Activities endpoints
- Get activity:
GET project/{prj_uid}/activity/{act_uid}
- Update activity:
PUT project/{prj_uid}/activity/{act_uid}
- Delete activity:
DELETE project/{prj_uid}/activity/{act_uid}
- Get Starting Tasks:
GET project/{prj_uid}/starting-tasks
- Assignee endpoints
- Get Assignees to Task:
GET /project/{prj_uid}/activity/{act_uid}/assignee
- Get Page of Assignees to Task:
GET /project/{prj_uid}/activity/{act_uid}/assignee/paged
- Get Available Assignees for Task:
GET /project/{prj_uid}/activity/{act_uid}/available-assignee
- Get Page of Available Assignees for Task:
GET /project/{prj_uid}/activity/{act_uid}/available-assignee/paged
- Get Assignee to Task:
GET /project/{prj_uid}/activity/{act_uid}/assignee/{aas_uid}
- Get All Users Assigned to Task:
GET /project/{prj_uid}/activity/{act_uid}/assignee/all
- Assign to Task:
POST /project/{prj_uid}/activity/{act_uid}/assignee
- Remove Assignee from Task:
DELETE /project/{prj_uid}/activity/{act_uid}/assignee/{aas_uid}
- Ad hoc assignee endpoints
- Get ad hoc Assignees for Task:
GET /project/{prj_uid}/activity/{act_uid}/adhoc-assignee
- Get Page of Ad Hoc Assignees to Task:
GET /project/{prj_uid}/activity/{act_uid}/adhoc-available-assignee/paged
- Get Available Ad hoc Assignees for Task:
GET /project/{prj_uid}/activity/{act_uid}/adhoc-available-assignee
- Get Page of Available Ad Hoc Assignees for Task:
GET /project/{prj_uid}/activity/{act_uid}/adhoc-available-assignee/paged
- Get ad hoc Assignee to Task:
GET /project/{prj_uid}/activity/{act_uid}/adhoc-assignee/{ada_uid}
- Get all ad hoc Users for Task:
GET /project/{prj_uid}/activity/{act_uid}/adhoc-assignee/all
- Ad hoc Assign to Task:
POST /project/{prj_uid}/activity/{act_uid}/adhoc-assignee
- Remove ad hoc Assignee from Task:
DELETE /project/{prj_uid}/activity/{act_uid}/adhoc-assignee/{ada_uid}
- Step endpoints
- Get Steps for Task:
GET /project/{prj_uid}/activity/{act_uid}/steps
- Get Available Steps for Task:
GET /project/{prj_uid}/activity/{act_uid}/available-steps
- Get Step for Activity:
GET /project/{prj_uid}/activity/{act_uid}/step/{step_uid}
- Assign Step to Task:
POST /project/{prj_uid}/activity/{act_uid}/step
- Update Step for Activity:
PUT /project/{prj_uid}/activity/{act_uid}/step/{step_uid}
- Unassign Step from Task:
DELETE /project/{prj_uid}/activity/{act_uid}/step/{step_uid}
- Get Triggers for Step:
GET /project/{prj_uid}/activity/{act_uid}/step/{step_uid}/triggers
- Get Available Triggers for Step:
GET /project/{prj_uid}/activity/{act_uid}/step/{step_uid}/available-triggers/{type}
- Get Trigger for Step:
GET /project/{prj_uid}/activity/{act_uid}/step/{step_uid}/trigger/{tri_uid}/{type}
- Assign Trigger to Step:
POST /project/{prj_uid}/activity/{act_uid}/step/{step_uid}/trigger
- Update Trigger Assignment:
PUT /project/{prj_uid}/activity/{act_uid}/step/{step_uid}/trigger/{tri_uid}
- Unassign Trigger from Step:
DELETE /project/{prj_uid}/activity/{act_uid}/step/{step_uid}/trigger/{tri_uid}/{type}
- Get Triggers for Task:
GET /project/{prj_uid}/activity/{act_uid}/step/triggers
- Available Triggers for Activity:
GET /project/{prj_uid}/activity/{act_uid}/step/available-triggers/{type}
- Get Trigger for Activity:
GET /project/{prj_uid}/activity/{act_uid}/step/trigger/{tri_uid}/{type}
- Assign Trigger to Task:
POST /project/{prj_uid}/activity/{act_uid}/step/trigger
- Update Trigger:
PUT /project/{prj_uid}/activity/{act_uid}/step/trigger/{tri_uid}
- Unassign Trigger:
DELETE /project/{prj_uid}/activity/{act_uid}/step/trigger/{tri_uid}/{type}
- Output Document endpoints
- Get Output Documents List:
GET project/{prj_uid}/output-documents
- Get Output Document:
GET project/{prj_uid}/output-document/{out_doc_uid}
- Create Output Document:
POST project/{prj_uid}/output-document
- Update Output Document:
PUT project/{prj_uid}/output-document/{out_doc_uid}
- Delete Output Document:
DELETE project/{prj_uid}/output-document/{out_doc_uid}
- Input Document endpoints
- Get Input Documents List:
GET project/{prj_uid}/input-documents
- Get Input Document:
GET project/{prj_uid}/input-document/{inp_doc_uid}
- Create Input Document:
POST project/{prj_uid}/input-document
- Update Input Document:
PUT project/{prj_uid}/input-document/{inp_doc_uid}
- Delete Input Document:
DELETE project/{prj_uid}/input-document/{inp_doc_uid}
- Trigger endpoints
- Get Triggers List:
GET project/{prj_uid}/triggers
- Get Trigger
GET project/{prj_uid}/trigger/{tri_uid}
- Create Trigger:
POST project/{prj_uid}/trigger
- Update Trigger:
PUT project/{prj_uid}/trigger/{tri_uid}
- Delete Trigger:
DELETE project/{prj_uid}/trigger/{tri_uid}
- DynaForm endpoints
- Get DynaForm List:
GET project/{prj_uid}/dynaforms
- Get DynaForm:
GET project/{prj_uid}/dynaform/{dyn_uid}
- Get Field List in Grid:
GET project/{prj_uid}/dynaform/{dyn_uid}/grid/{grd_name}/field-definitions
- Get Field in Grid:
GET project/{prj_uid}/dynaform/{dyn_uid}/grid/{grd_name}/field-definition/{fld_id}
- Create DynaForm:
POST project/{prj_uid}/dynaform
- Create DynaForm from Copy/Import:
POST project/{prj_uid}/dynaform
- Create DynaForm from PM Table:
project/{prj_uid}/dynaform
- Update DynaForm:
PUT project/{prj_uid}/dynaform/{dyn_uid}
- Delete DynaForm:
DELETE project/{prj_uid}/dynaform/{dyn_uid}
- Process Supervisor endpoints
- Get Process Supervisors List:
GET project/{prj_uid}/process-supervisors
- Get Process Supervisor:
GET project/{prj_uid}/process-supervisor/{pu_uid}
- Available users/groups to assign as process supervisors:
GET project/{prj_uid}/available-process-supervisors
- Available groups to assign as process supervisors:
GET project/{prj_uid}/available-process-supervisors?obj_type=group
- Available users to assign as Process Supervisors:
GET project/{prj_uid}/available-process-supervisors?obj_type=user
- Get DynaForms assigned to process supervisors:
GET project/{prj_uid}/process-supervisor/dynaforms
- Get DynaForm assigned to process supervisors:
GET project/{prj_uid}/process-supervisor/dynaform/{pud_uid}
- Available DynaForms to assign to Process Supervisors:
GET project/{prj_uid}/process-supervisor/available-dynaforms
- Get Input Documents assigned to Process Supervisors:
GET project/{prj_uid}/process-supervisor/input-documents
- Available Input Documents to assign to Process Supervisors:
GET project/{prj_uid}/process-supervisor/available-input-documents
- Get Input Document assigned to Process Supervisors:
GET project/{prj_uid}/process-supervisor/input-documents/{pui_uid}
- Assign a user/group as process supervisor:
POST project/{prj_uid}/process-supervisor
- Assign DynaForm to Process Supervisors:
POST project/{prj_uid}/process-supervisor/dynaform
- Assign Input Document to Process Supervisor:
POST project/{prj_uid}/process-supervisor/input-document
- Remove user/group from Process Supervisors:
DELETE project/{prj_uid}/process-supervisor/{pu_uid}
- Remove DynaForm from Process Supervisors:
DELETE project/{prj_uid}/process-supervisor/dynaform/{pud_uid}
- Remove Input Document from Process Supervisors:
DELETE project/{prj_uid}/process-supervisor/input-document/{pui_uid}
- Update DynaForm assigned to the Process Supervisors:
PUT project/{prj_uid}/process-supervisor/dynaform/{pu_uid}
- Update Input Document assigned to Process Supervisors:
PUT project/{prj_uid}/process-supervisor/input-document/{pu_uid}
- Database Connections
- Get Database Connections List:
GET project/{prj_uid}/database-connections
- Get Database Connection:
GET project/{prj_uid}/database-connection/{dbs_uid}
- Create Database Connection:
POST project/{prj_uid}/database-connection
- Test Database Connection:
POST project/{prj_uid}/database-connection/test
- Update Database Connection:
PUT project/{prj_uid}/database-connection/{dbs_uid}
- Delete Database Connection:
DELETE project/{prj_uid}/database-connection/{dbs_uid}
- Case Scheduler endpoints
- Get Case Schedulers List:
GET project/{prj_uid}/case-schedulers
- Get Case Scheduler:
GET project/{prj_uid}/case-scheduler/{sch_uid}
- Create Case Scheduler:
POST project/{prj_uid}/case-scheduler
- Update Case Scheduler:
PUT project/{prj_uid}/case-scheduler/{sch_uid}
- Delete Case Scheduler:
DELETE project/{prj_uid}/case-scheduler/{sch_uid}
- Process Permission endpoints
- Get Process Permissions List:
GET project/{prj_uid}/process-permissions
- Get Process Permission:
GET project/{prj_uid}/process-permission/{op_uid}
- Create Process Permission:
POST project/{prj_uid}/process-permission
- Update Process Permission:
PUT project/{prj_uid}/process-permission/{op_uid}
- Delete Process Permission:
DELETE project/{prj_uid}/process-permission/{op_uid}
- Web Entry
- Get Web Entries List:
GET project/{prj_uid}/web-entries
- Get Web Entry:
GET project/{prj_uid}/web-entry/{we_uid}
- Create Web Entry:
POST project/{prj_uid}/web-entry
- Create Web Entry with HTML page:
POST project/{prj_uid}/web-entry
- Update Web Entry:
PUT project/{prj_uid}/web-entry/{we_uid}
- Delete Web Entry:
DELETE project/{prj_uid}/web-entry/{we_uid}
- Case Tracker
- Get Case Tracker Properties:
GET project/{prj_uid}/case-tracker/property
- Update Case Tracker:
PUT project/{prj_uid}/case-tracker/property
- Case Tracker Objects List:
GET project/{prj_uid}/case-tracker/objects
- Available Case Tracker objects:
GET project/{prj_uid}/case-tracker/available-objects
- Get Case Tracker Object:
GET project/{prj_uid}/case-tracker/object/{cto_uid}
- Assign Case Tracker Object:
POST project/{prj_uid}/case-tracker/object
- Update Case Tracker Object:
PUT project/{prj_uid}/case-tracker/object/{cto_uid}
- Delete Case Tracker Object:
DELETE project/{prj_uid}/case-tracker/object/{cto_uid}
- Process File Manager endpoints
- Get Files List:
GET project/{prj_uid}/file-manager?path={path}
- Create file:
POST project/{prj_uid}/file-manager
- Report Table
- Get Report Tables List:
GET project/{prj_uid}/report-tables
- Get Report Table:
GET project/{prj_uid}/report-table/{rep_uid
- Populate Report Table:
GET project/{prj_uid}/report-table/{rep_uid}/populate
- Get Report Table Data:
GET project/{prj_uid}/report-table/{rep_uid}/data
- Create Report Table:
POST project/{prj_uid}/report-table
- Update Report Table:
PUT project/{prj_uid}/report-table/{rep_uid}
- Delete Report Table:
DELETE project/{prj_uid}/report-table/{rep_uid}
- Project endpoints
- Get Projects List:
GET project
- Get Project Definition:
GET project/{uid}
- Create Project:
POST project
- Update Project:
PUT project project/{uid}
- Delete Project:
DELETE project/{uid}
- Create BPMN Project:
POST project/generate-bpmn
- Event endpoints
- Get Events List:
GET project/{prj_uid}/events
- Get Event Messages:
GET project/{prj_uid}/events?filter=message
- Get Event Condition:
GET project/{prj_uid}/events?filter=conditional
- Get Multiple Events List:
GET project/{prj_uid}/events?filter=multiple
- Get Event:
GET project/{prj_uid}/event/{evn_uid}
- Create Event:
POST project/{prj_uid}/event
- Update Event:
PUT project/{prj_uid}/event/{evn_uid}
- Delete Event:
DELETE project/{prj_uid}/event/{evn_uid}
- Export Project
- Import Project
- Case Task
- Process endpoints
- Process Variables endpoints
- Get Variables List:
GET project/{prj_uid}/process-variables
- Get Process Variable:
GET project/{prj_uid}/process-variable/{var_uid}
- Create Process Variable:
POST project/{prj_uid}/process-variable
- Update Process Variable:
PUT project/{prj_uid}/process-varable/{var_uid}
- Delete Process Variable:
DELETE project/{prj_uid}/process-variable/{var_uid}
- Execute Query:
POST project/{prj_uid}/process-variable/{var_name}/execute-query
- Query Options in Control:
POST project/{prj_uid}/process-variable/{var_name}/execute-query-suggest
- Variables
Activities endpoints
The following REST endpoints are available to manage activities. Note that "activities" are either tasks or subprocesses.
- Get activity:
GET project/{prj_uid}/activity/{act_uid}
- Update activity:
PUT project/{prj_uid}/activity/{act_uid}
- 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:
-
Name Description Example workspace Workspace name http://www.example.com/api/1.0/workflow/project/84233230756cbb13a780d37064601378/activity/27487747556cbb168597107027360480 prj_uid Unique ID of the project/process. http://www.example.com/api/1.0/workflow/project/84233230756cbb13a780d37064601378/activity/27487747556cbb168597107027360480 act_uid Unique 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:
Element | Description |
---|---|
{ | |
"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:
$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:
-
Name Description Example workspace Workspace name http://www.example.com/api/1.0/workflow/project/84233230756cbb13a780d37064601378/activity/27487747556cbb168597107027360480 prj_uid Unique ID of the project UID http://www.example.com/api/1.0/workflow/project/84233230756cbb13a780d37064601378/activity/27487747556cbb168597107027360480 act_uid Unique ID of the activity (step or subprocess) http://www.example.com/api/1.0/workflow/project/84233230756cbb13a780d37064601378/activity/27487747556cbb168597107027360480
PUT Parameters:
-
Element Description { 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 to0
."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 intas_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 thetas_def_message
property. If set to"html"
, then the body of the email notification is defined by a template file which is set in thetas_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 settas_duration
, but if set to "TRUE", thentas_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:
$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:
-
Name Description Example workspace Workspace name http://www.example.com/api/1.0/workflow/project/84233230756cbb13a780d37064601378/activity/27487747556cbb168597107027360480 prj_uid Unique ID of the project UID http://www.example.com/api/1.0/workflow/project/84233230756cbb13a780d37064601378/activity/27487747556cbb168597107027360480 act_uid Unique 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:
$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:
-
Name Description Example workspace Workspace name http://www.example.com/api/1.0/workflow/project/84233230756cbb13a780d37064601378/starting-tasks prj_uid Unique 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:
[
{
"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:
$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:
- Get Assignees to Task:
GET /project/{prj_uid}/activity/{act_uid}/assignee
- Get Page of Assignees to Task:
GET /project/{prj_uid}/activity/{act_uid}/assignee/paged
- Get Available Assignees for Task:
GET /project/{prj_uid}/activity/{act_uid}/available-assignee
- Get Page of Available Assignees for Task:
GET /project/{prj_uid}/activity/{act_uid}/available-assignee/paged
- Get an Assignee to Task:
GET /project/{prj_uid}/activity/{act_uid}/assignee/{aas_uid}
- Get All Users assigned to Task:
GET /project/{prj_uid}/activity/{act_uid}/assignee/all
- Assign to Task:
POST /project/{prj_uid}/activity/{act_uid}/assignee
- 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:
-
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 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 " %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:Element Description [ 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
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:
$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 " %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
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:
$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 " %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
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:
$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 " %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
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:
$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
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:
$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 " %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
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
{
"aas_uid": "977d1339862ae390ad134e2745a3fdbd",
"aas_type": "user"
}
Response
PHP Example:
$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
PHP Example:
$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:
- Get ad hoc Assignees for Task:
GET /project/{prj_uid}/activity/{act_uid}/adhoc-assignee
- Get Page of Ad Hoc Assignees to Task:
GET /project/{prj_uid}/activity/{act_uid}/adhoc-available-assignee/paged
- Get Available ad hoc Assignees for Task:
GET /project/{prj_uid}/activity/{act_uid}/available-adhoc-assignee
- Get Page of Available Ad Hoc Assignees for Task:
GET /project/{prj_uid}/activity/{act_uid}/adhoc-available-assignee/paged
- Get single ad hoc Assignee to Task:
GET /project/{prj_uid}/activity/{act_uid}/adhoc-assignee/{ada_uid}
- Get all ad hoc Users for Task:
GET /project/{prj_uid}/activity/{act_uid}/adhoc-assignee/all
- Ad hoc Assign to Task:
POST /project/{prj_uid}/activity/{act_uid}/adhoc-assignee
- 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:
-
Name Description Example workspace Workspace name which is workflow
by default.https://example.com/api/1.0/workflow/project/276544696573f9457cd0983094962709/activity/679814870573f92e6509f59003354333/adhoc-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/adhoc-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 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 " %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:Element Description [ 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
[
{
"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:
-
Name Description Example workspace Workspace name which is workflow
by default.https://example.com/api/1.0/workflow/project/276544696573f9457cd0983094962709/activity/679814870573f92e6509f59003354333/adhoc-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/adhoc-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/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 " %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:Element Description { 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
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:
$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:
-
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/adhoc-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/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 " %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:Element Description [ 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
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:
-
Name Description Example workspace Workspace name which is workflow
by default.https://example.com/api/1.0/workflow/project/276544696573f9457cd0983094962709/activity/679814870573f92e6509f59003354333/adhoc-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/adhoc-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/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 " %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:Element Description { 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
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:
$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:
-
Name Description Example workspace Workspace name, which is workflow
by default.https://example.com/api/1.0/workflow/project/276544696573f9457cd0983094962709/activity/679814870573f92e6509f59003354333/adhoc-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/adhoc-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/adhoc-assignee/11609821854ca4355344560009542371 ass_uid Unique 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:Element Description { 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
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:
-
Name Description Example workspace Workspace name which is workflow
by default.https://example.com/api/1.0/workflow/project/276544696573f9457cd0983094962709/activity/679814870573f92e6509f59003354333/adhoc-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/adhoc-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/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 " %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:Element Description [ 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
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:
-
Name Description Example workspace Workspace name, which is workflow
by default.https://example.com/api/1.0/workflow/project/276544696573f9457cd0983094962709/activity/679814870573f92e6509f59003354333/adhoc-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/adhoc-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/adhoc-assignee
POST Parameters:
-
Element Description { "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
{
"ada_uid": "977d1339862ae390ad134e2745a3fdbd",
"ada_type": "user"
}
Response
PHP Example:
$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:
-
Name Description Example workspace Workspace name, which is workflow
by default.https://example.com/api/1.0/workflow/project/276544696573f9457cd0983094962709/activity/679814870573f92e6509f59003354333/adhoc-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/adhoc-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/adhoc-assignee/11609821854ca4355344560009542371 ass_uid Unique 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
PHP Example:
$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:
- List steps assigned to a task
- List available steps to assign to a task
- Get a single step assigned to a task
- Assign a step to a activity
- Update a step assignment of an activity
- Unassigned a step from an activity
- List triggers assigned to a step
- List available triggers to assign to a step
- Get a single trigger assigned to a step
- Assign a trigger to a step
- Update a trigger assignment of a step
- Remove a trigger assignment of a step
Step endpoints - Assign Task (A special case of a step that has no UID)
- List assigned triggers
- List available triggers to be assigned
- Get single triggers assigned
- Get single triggers
- Update a trigger assigned
- Remove an assigned trigger
Step resources:
Name | Description | Type | Value |
---|---|---|---|
step_uid | Step UID | String | "9541049475298f190420f51086854718" (String of 32 characters) |
step_type_obj | Step type | String | "DYNAFORM" or "INPUT_DOCUMENT" or "OUTPUT_DOCUMENT" (unique values) |
step_uid_obj | Object UID | String | "9541049475298f190420f51086854718" (String of 32 characters) |
step_condition | Step condition, it will only display if it accomplishes TRUE | String | "@@YEAR == 2013" (Alphanumeric string) |
step_position | Position that specifies the deployment step, it starts on 1 | Integer | 1,2,..... |
step_mode | Display mode of the step | String | "EDIT", "VIEW" (unique values) |
obj_title | Object title | String | "Title…" (Alphanumeric string) |
obj_description | Description of the object | String | “Description…” (Alphanumeric string) |
obj_uid | Object UID | String | "9541049475298f190420f51086854718" (String of 32 characters) |
obj_title | Object title | String | "Title…" (alphanumeric string) |
obj_description | Object description | String | "Description…" (alphanumeric string) |
obj_type | Step type | String | "DYNAFORM" or "INPUT_DOCUMENT" or "OUTPUT_DOCUMENT" (unique values) |
tri_uid | Trigger UID | String | "287964159526013c6c64bb1071946215" (String of 32 characters) |
tri_title | Trigger title | String | "Title…" (Alphanumeric string) |
tri_description | Trigger description | String | "Description…" (Alphanumeric string) |
st_type | Type of trigger execution | String | "BEFORE_ASSIGNMENT", "BEFORE_ROUTING", "AFTER_ROUTING" (unique values) |
st_condition | Trigger condition, the trigger will only be executed if the condition accomplishes true | String | "@@YEAR == 2013" (Alphanumeric string) |
st_position | Position that specifies the order of execution of the trigger, it starts on 1 | Integer | String |
tri_type | Trigger type | String | "SCRIPT" (unique value) |
tri_webbot | Trigger code | String | "$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:
-
Name Description Example workspace Workspace name https://example.com/api/1.0/workflow/project/113406514573f91fdd453d7080353209/activity/748962028577d84795d55b3012565154/steps prj_uid Unique 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_uid Unique 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:
-
Element Description [ 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 is2
, 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
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.
$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:
-
Name Description Example workspace Workspace name https://example.com/api/1.0/workflow/project/113406514573f91fdd453d7080353209/activity/748962028577d84795d55b3012565154/steps prj_uid Unique 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_uid Unique 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:
-
Element Description [ 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
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:
$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:
-
Name Description Example workspace Workspace name https://example.com/api/1.0/workflow/project/113406514573f91fdd453d7080353209/activity/748962028577d84795d55b3012565154/step/28191616657869600330ad8022614695 prj_uid Unique 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_uid Unique 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_uid Unique ID of step. https://example.com/api/1.0/workflow/project/113406514573f91fdd453d7080353209/activity/748962028577d84795d55b3012565154/step/28191616657869600330ad8022614695
Result:
-
Element Description { 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 is2
, 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
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:
-
Name Description Example workspace Workspace name https://example.com/api/1.0/workflow/project/113406514573f91fdd453d7080353209/activity/748962028577d84795d55b3012565154/step prj_uid Unique 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_uid Unique 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 parameter Description { "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 tofalse
, 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 consideredtrue
."step_position": 1, Optional. The step position, where the first step in the task is 1
, the second is2
, 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
{
"step_type_obj": "DYNAFORM",
"step_uid_obj": "761754168526157a5878337086391024",
"step_mode": "EDIT"
}
Response
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:
$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:
-
Name Description Example workspace Workspace name https://example.com/api/1.0/workflow/project/113406514573f91fdd453d7080353209/activity/748962028577d84795d55b3012565154/step/28191616657869600330ad8022614695 prj_uid Unique 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_uid Unique 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_uid Unique ID of step. https://example.com/api/1.0/workflow/project/113406514573f91fdd453d7080353209/activity/748962028577d84795d55b3012565154/step/28191616657869600330ad8022614695
PUT Parameters:
-
Parameter Description { "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 thestep_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 tofalse
, 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 consideredtrue
."step_position": 1, Optional. The step position, where the first step in the task is 1
, the second is2
, 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
{
"step_type_obj": "DYNAFORM",
"step_uid_obj": "761754168526157a5878337086391024",
"step_condition": "",
"step_position": 1,
"step_mode": "EDIT"
}
Response
PHP Example:
Move a step to the beginning of a task and add a condition to the task:
$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:
-
Name Description Example workspace Workspace name https://example.com/api/1.0/workflow/project/113406514573f91fdd453d7080353209/activity/748962028577d84795d55b3012565154/step/28191616657869600330ad8022614695 prj_uid Unique 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_uid Unique 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_uid Unique 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
PHP Example:
Assign a DynaForm as the last step in the task:
$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:
-
Name Description Example workspace Workspace name https://example.com/api/1.0/workflow/project/113406514573f91fdd453d7080353209/activity/748962028577d84795d55b3012565154/step/28191616657869600330ad8022614695/triggers prj_uid Unique 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_uid Unique 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_uid Unique 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:Element Description [ 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
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:
$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:
-
Name Description Example workspace Workspace name https://example.com/api/1.0/workflow/project/113406514573f91fdd453d7080353209/activity/748962028577d84795d55b3012565154/step/28191616657869600330ad8022614695/available-triggers/before prj_uid Unique 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_uid Unique 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_uid Unique ID of step. https://example.com/api/1.0/workflow/project/113406514573f91fdd453d7080353209/activity/748962028577d84795d55b3012565154/step/28191616657869600330ad8022614695/available-triggers/before step_uid Unique ID of step. https://example.com/api/1.0/workflow/project/113406514573f91fdd453d7080353209/activity/748962028577d84795d55b3012565154/step/28191616657869600330ad8022614695/available-triggers/before type When 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:
-
Element Description [ 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
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.
$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:
-
Name Description Example workspace Workspace name https://example.com/api/1.0/workflow/project/113406514573f91fdd453d7080353209/activity/748962028577d84795d55b3012565154/step/28191616657869600330ad8022614695/trigger/451169569578965bd2a5513008268885/before prj_uid Unique 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_uid Unique 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_uid Unique ID of step. https://example.com/api/1.0/workflow/project/113406514573f91fdd453d7080353209/activity/748962028577d84795d55b3012565154/step/28191616657869600330ad8022614695/trigger/451169569578965bd2a5513008268885/before tri_uid Unique ID of the trigger. https://example.com/api/1.0/workflow/project/113406514573f91fdd453d7080353209/activity/748962028577d84795d55b3012565154/step/28191616657869600330ad8022614695/trigger/451169569578965bd2a5513008268885/before type When the trigger is executed, which can be either before
orafter
the step.https://example.com/api/1.0/workflow/project/113406514573f91fdd453d7080353209/activity/748962028577d84795d55b3012565154/step/28191616657869600330ad8022614695/trigger/451169569578965bd2a5513008268885/before
Result:
-
Element Description { 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 tofalse
."st_position": 2 The execution order of the trigger, where the first trigger to execute is 1
, the second is2
, etc. There is separate counting for "BEFORE" and "AFTER" triggers.} End trigger object.
Example:
Response
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:
$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:
-
Name Description Example workspace Workspace name /api/1.0/workflow/project/113406514573f91fdd453d7080353209/activity/748962028577d84795d55b3012565154/step/28191616657869600330ad8022614695/trigger prj_uid Unique 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_uid Unique 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_uid Unique ID of step. /api/1.0/workflow/project/113406514573f91fdd453d7080353209/activity/748962028577d84795d55b3012565154/step/28191616657869600330ad8022614695/trigger
POST fields:
-
Element Description { 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 tofalse
."st_position": 2 The execution order of the trigger, where the first trigger to execute is 1
, the second is2
, 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
{
"tri_uid": "502389187526013d4304108061369115",
"st_type": "BEFORE",
"st_condition": "@@APPROVED == 'Y'",
"st_position": 2
}
Response
PHP example:
$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:
-
Name Description Example workspace Workspace name /api/1.0/workflow/project/113406514573f91fdd453d7080353209/activity/748962028577d84795d55b3012565154/step/28191616657869600330ad8022614695/trigger/550289117529f8ba2705074055790637 prj_uid Unique 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_uid Unique 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_uid Unique ID of step. /api/1.0/workflow/project/113406514573f91fdd453d7080353209/activity/748962028577d84795d55b3012565154/step/28191616657869600330ad8022614695/trigger/550289117529f8ba2705074055790637 tri_uid Unique ID of the trigger. /api/1.0/workflow/project/113406514573f91fdd453d7080353209/activity/748962028577d84795d55b3012565154/step/28191616657869600330ad8022614695/trigger/550289117529f8ba2705074055790637
PUT fields:
-
Element Description { 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 tofalse
."st_position": 2 Optional. The execution order of the trigger, where the first trigger to execute is 1
, the second is2
, 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
{
"st_type": "BEFORE",
"st_condition": "@@APPROVED == 'XY'",
"st_position": 2
}
Response
PHP example:
$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:
-
Name Description Example workspace Workspace name /api/1.0/workflow/project/113406514573f91fdd453d7080353209/activity/748962028577d84795d55b3012565154/step/28191616657869600330ad8022614695/trigger/550289117529f8ba2705074055790637/before prj_uid Unique 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_uid Unique 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_uid Unique ID of step. /api/1.0/workflow/project/113406514573f91fdd453d7080353209/activity/748962028577d84795d55b3012565154/step/28191616657869600330ad8022614695/trigger/550289117529f8ba2705074055790637/before tri_uid Unique ID of the trigger. /api/1.0/workflow/project/113406514573f91fdd453d7080353209/activity/748962028577d84795d55b3012565154/step/28191616657869600330ad8022614695/trigger/550289117529f8ba2705074055790637/before type Set to before
orafter
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
PHP example:
$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:
-
Name Description Example workspace Workspace name https://example.com/api/1.0/workflow/project/113406514573f91fdd453d7080353209/activity/748962028577d84795d55b3012565154/step/triggers prj_uid Unique 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_uid Unique 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:
-
Type Description array Returns an object array with data of each trigger
Example:
Response
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:
-
Name Type Description workspace String Workspace name prj_uid String Project UID act_uid String Activity UID type String Trigger Type
Result:
-
Type Description array Returns an object array with data of each trigger available for the step (according the execution type)
Example:
Response
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:
-
Name Type Description workspace String Workspace name prj_uid String Project UID act_uid String Task UID tri_uid String Trigger UID type String Type of trigger execution (before-assignment, before-routing, after-routing)
Result:
-
Type Description object Return an object with data of the trigger
Example:
Response
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:
-
Name Type Description workspace String Workspace name prj_uid String Project UID act_uid String Activity 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 tofalse
."st_position": 2 The execution order of the trigger, where the first trigger to execute is 1
, the second is2
, 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 empty No return
Example:
Request
{
"tri_uid": "6120910645852c920eba7d9069690137",
"st_type": "BEFORE_ASSIGNMENT",
"st_condition": "@@APPROVED == 'Y'",
"st_position": 1
}
Response
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:
-
Name Type Description workspace String Workspace name prj_uid String Project UID act_uid String Activity UID tri_uid String Trigger UID
PUT fields:
-
Element Description { 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 tofalse
."st_position": 2 Optional. The execution order of the trigger, where the first trigger to execute is 1
, the second is2
, 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 empty No return
Example:
Request
{
"st_type": "BEFORE_ASSIGNMENT",
"st_condition": "@@APPROVED == 'N'",
"st_position": 2
}
Response
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:
-
Name Description Example workspace Workspace name /api/1.0/workflow/project/113406514573f91fdd453d7080353209/activity/748962028577d84795d55b3012565154/step/trigger/6120910645852c920eba7d9069690137/before-routing prj_uid Unique 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_uid Unique 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_uid Unique ID of the trigger. /api/1.0/workflow/project/113406514573f91fdd453d7080353209/activity/748962028577d84795d55b3012565154/step/trigger/6120910645852c920eba7d9069690137/before-routing type Set to before-assignment
,before-routing
orafter-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:
-
Type Description empty No return
Example:
Response
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:
Name | Description | Type | Value |
---|---|---|---|
out_doc_uid | Output document UID | String | String with the output document UID |
out_doc_title | Document title | String | String with the document title |
out_doc_description | Document description | String | String with the document description |
out_doc_filename | Generated document file name | String | String with the generated file name |
out_doc_template | Document shape or template | String | String with the document template |
out_doc_report_generator | Document generator | String | Library converter used to render the document, valid values are: TCPDF, HTML2PDF |
out_doc_landscape | Document orientation | Integer | Valid values: 0 = portrait, 1 = landscape |
out_doc_media | Document size | String | Max length 10 characters |
out_doc_left_margin | Left margin | Integer | Integer number |
out_doc_right_margin | Right margin | Integer | Integer number |
out_doc_top_margin | Upper margin | Integer | Integer number |
out_doc_bottom_margin | Bottom margin | Integer | Integer number |
out_doc_generate | Type of generated document | String | Valid values are: PDF, WORD or BOTH |
out_doc_type | Document type (HTML) | String | String of 32 characters |
out_doc_current_revision | Current document version | Integer | Integer number |
out_doc_field_mapping | Field mapping | String | String |
out_doc_versioning | Document version | Integer | Integer number |
out_doc_destination_path | Document path | String | String |
out_doc_tags | Document tag | String | String |
out_doc_pdf_security_enabled | Password security enabling for PDF documents | Integer | Valid values are:0 disabled and 1 password security enabled |
out_doc_pdf_security_open_password | Password used to open the document | String | String |
out_doc_pdf_security_owner_password | Password of the document owner | String | String |
out_doc_pdf_security_permission | Permissions of the document | String | Valid 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:
-
Name Type Description workspace String Workspace name prj_uid String Project UID
Result:
-
Type Description array Returns an array of output document objects
Example:
Response
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:
-
Name Type Description workspace String Workspace name prj_uid String Project UID out_doc_uid String Output document UID
Result:
-
Type Description object Returns an output document object
Example:
Response
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:
-
Name Type Description workspace String Workspace name prj_uid String Project UID
Required Fields:
-
Name Type Description out_doc_title String Document title out_doc_description String Document description out_doc_filename String Generated document filename
Optional Fields:
-
Name Type Description out_doc_template String Document template or shape out_doc_report_generator String Document generator. It can be TCPDF or HTML2PDF out_doc_landscape Integer Document orientation (0=portrait and 1=landscape) out_doc_media String Document size out_doc_left_margin Integer Left margin out_doc_right_margin Integer Right margin out_doc_top_margin Integer Upper margin out_doc_bottom_margin Integer Bottom margin out_doc_generate String Type of generated document (PDF, WORD or BOTH) out_doc_type String Document type (HTML) out_doc_versioning String Document version out_doc_destination_path String Document path out_doc_tags String Document tag out_doc_pdf_security_enabled Integer Password security enabling for pdf documents (0= does not exist and 1 = exists) out_doc_pdf_security_open_password String Password used to open the document out_doc_pdf_security_owner_password String Password for the document owner out_doc_pdf_security_permission String Document permissions
Result:
-
Type Description object Returns the new output document object
Example:
Request
{
"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
{
"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:
-
Name Type Description workspace String Workspace name prj_uid String Project UID out_doc_uid String Output document UID
Required Fields:
-
Name Type Description out_doc_title String Document title out_doc_description String Document description out_doc_filename String Document filename when it is generated
Optional Fields:
-
Name Type Description out_doc_report_generator String Document generator. It can be TCPDF or HTML2PDF out_doc_landscape Integer Document orientation (0=portrait and 1=landscape) out_doc_media String Document size out_doc_left_margin Integer Left margin out_doc_right_margin Integer Right margin out_doc_top_margin Integer Upper margin out_doc_bottom_margin Integer Bottom margin out_doc_generate String Generated document type (PDF, WORD or BOTH) out_doc_type String Document type (HTML) out_doc_versioning String Document version out_doc_destination_path String Document path out_doc_tags String Document tag out_doc_pdf_security_enabled String Password security enabling for PDF documents (0 = does not exist, 1= exists) out_doc_pdf_security_open_password String Password used to open the document out_doc_pdf_security_owner_password String Password for the document owner out_doc_pdf_security_permission String Document permissions
Result:
-
Type Description empty No return
Example:
Request
{
"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
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:
-
Name Type Description workspace String Workspace name prj_uid String Project UID out_doc_uid String Output document UID
Result:
-
Type Description empty No return
Example:
Response
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:
Name | Description | Type | Value |
---|---|---|---|
inp_doc_uid | Input Document UID | String | “9541049475298f190420f51086854718” (string of 32 characters) |
inp_doc_title | Input document title | String | "Title" |
inp_doc_description | Input document description | String | "Description" |
inp_doc_form_needed | Document type | String | "VIRTUAL", "REAL", "VREAL" (unique values) |
inp_doc_original | Document format | String | "ORIGINAL", "COPY", "COPYLEGAL", (unique values) Default: "COPY" |
inp_doc_published | Type of access | String | "PRIVATE" (unique values) Default: "PRIVATE" |
inp_doc_versioning | Enable versioning control | Integer | 0, 1 (unique values) Default: 0 |
inp_doc_destination_path | Destination Path | String | "/my/path/" |
inp_doc_tags | Tags | String | "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:
-
Name Type Description workspace String Workspace name prj_uid String Project UID
Result:
-
Type Description array Returns an array of objects with each input document
Example:
Response
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:
-
Name Type Description workspace String Workspace name prj_uid String Project UID inp_doc_uid String Input document UID
Result:
-
Type Description object Returns an object with the input document data
Example:
Response
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:
-
Name Type Description workspace String Workspace name prj_uid String Project UID
Required Fields:
-
Name Type Description inp_doc_title String Document Title
Optional Fields:
-
Name Type Description inp_doc_description String Input Document description inp_doc_form_needed String Document type inp_doc_original String Document format inp_doc_published String Type of access inp_doc_versioning Integer Type of access inp_doc_destination_path String Destination Path inp_doc_tags String Tags
Result:
-
Type Description object Returns an object with the new Input Document information, and the "inp_doc_uid" attribute
Example:
Request
{
"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
{
"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}
-
Name Type Description workspace String Workspace name prj_uid String Project UID inp_doc_uid String The input document UID
Optional Fields:
-
Name Type Description inp_doc_title String Title inp_doc_description String Input document description inp_doc_form_needed String Document type inp_doc_original String Document format inp_doc_published String Type of access inp_doc_versioning Integer Version control enabling inp_doc_destination_path String Destination Path inp_doc_tags String Tags
Result:
-
Type Description empty No return
Example:
Request
{
"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
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:
-
Name Type Description workspace String Workspace name prj_uid String Project UID inp_doc_uid String Input document UID
Result:
-
Type Description empty No return
Example:
Response
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_uid | Trigger UID | String | String |
tri_title | Trigger name | String | "Trigger name" (string) |
tri_description | Trigger description | String | "Trigger Description" (Alphanumeric String) |
tri_webbot | Trigger code | String | "die('The End.');" (php code) |
tri_param | Initial parameters of the trigger | String | "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:
-
Name Type Description workspace String Workspace name prj_uid String Project UID
Result:
-
Type Description array Returns an array of objects with the existent triggers
Example:
Response
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:
-
Name Type Description workspace String Workspace name prj_uid String Project UID tri_uid String Trigger UID
Result:
-
Type Description array Returns a trigger object
Example:
Response
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:
-
Name Type Description workspace String Workspace name prj_uid String Project UID
Required Fields:
-
Name Type Description tri_title String Trigger name
Optional Fields:
-
Name Type Description tri_description String Trigger description tri_webbot String Trigger code tri_param String Initial parameters of the trigger
Result:
-
Type Description object Returns the created trigger object
Example:
Request
{
"tri_title": "Trigger #1",
"tri_description": "Trigger #1 - Desc",
"tri_type": "SCRIPT",
"tri_webbot": "",
"tri_param": "PRIVATE"
}
Response
{
"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:
-
Name Type Description workspace String Workspace name prj_uid String Project UID tri_uid String Trigger UID
Optional Fields:
-
Name Type Description tri_title String Trigger title tri_description String Trigger description tri_webbot String Trigger code tri_param String Initial parameters of the trigger
Result:
-
Type Description empty No return
Example:
Request
{
"tri_title": "Trigger #1",
"tri_description": "Trigger #1 - Desc (modified)",
"tri_type": "SCRIPT",
"tri_webbot": "",
"tri_param": "PRIVATE"
}
Response
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:
-
Name Type Description workspace String Workspace name prj_uid String Project UID tri_uid String Trigger UID
Result:
-
Type Description empty No return
Example:
Response
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
4.
Update a dynaform in a project
5.
Delete a dynaform of a project
Dynaform resources:
Name | Description | Type | Value |
---|---|---|---|
dyn_uid | Dynaform UID | String | "9541049475298f190420f51086854718" (string of 32 characters) |
dyn_title | Dynaform title | String | "Title…" |
dyn_description | Dynaform description | String | "Description…" |
dyn_type | Dynaform type | String | "xmlform", "grid" (unique values) |
dyn_content | Dynaform content | String | String with the content. |
dyn_version | Dynaform version | Integer | 1. Old version. 2. New version |
copy_import ** | Dynaform data to copy/import | Object | Object with the following attributes: prj_uid and dyn_uid |
copy_import . prj_uid ** | Process UID | String | "7389179125176dac806d205065699622" (string of 32 characters) |
copy_import . dyn_uid ** | Dynaform UID to Copy / Import | String | "77941473952b49c65a01a80041727578" (string of 32 characters) |
pmtable ** | PMTable data | Object | Object with the following attributes: tab_uid and fields |
pmtable . tab_uid ** | PMTable UID | String | "72249773552b84ded1d8aa4036518645" (string of 32 characters) |
pmtable . fields ** | Define the primary key field to register the PMTable | Object | Object array with the following attributes: fld_name and pro_variable |
pmtable . fields . fld_name ** | Field which is PMTable primary field | String | "ID" |
pmtable . fields . pro_variable ** | Variable name whose value will be stored in the primary key field | String | "@#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:
-
Name Type Description workspace String Workspace name prj_uid String Project UID
Result:
-
Type Description array Returns an array of dynaforms objects
Example:
Response
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:
-
Name Type Description workspace String Workspace name prj_uid String Project UID dyn_uid String Dynaform UID
Result:
-
Type Description object Returns an object with the dynaform data
Example:
Response
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:
-
Name Type Description Example workspace String Workspace name. http://example.com/api/1.0/workflow/project/798659366573140bc117490080056441/dynaform/406442383573140df944390011262710/grid/clientList/field-definitions prj_uid String Unique 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_uid String Unique 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_name String The 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:
-
Name Type Description Example workspace String Workspace name. http://example.com/api/1.0/workflow/project/798659366573140bc117490080056441/dynaform/406442383573140df944390011262710/grid/clientList/field-definition/address prj_uid String Unique 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_uid String Unique 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_name String The 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_id String The 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:
-
Name Type Description workspace String Workspace name prj_uid String Project UID
Required Fields:
-
Name Type Description dyn_title String Dynaform title dyn_type String Dynaform type, which is always "xmlform". dyn_version Integer Dynaform version which is 1
for a classic Dynaform based on XML or2
for a responsive Dynaform based on JSON.
Optional Fields:
-
Name Type Description dyn_description String Dynaform description dyn_content String The 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:
-
Type Description object Returns 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 thedyn_title
anddyn_description
were specified, then they will be inserted in the Dynaform's code, replacing the original title and description.
Example:
Request
{
"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
{
"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:
$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:
-
Name Type Description workspace String Workspace name prj_uid String Project UID
Required Fields:
-
Name Type Description dyn_title String Dynaform title dyn_version Integer Dynaform version copy_import String Dynaform data to Copy/Import copy_import . prj_uid String Project UID copy_import . dyn_uid String Dynaform UID
Optional Fields:
-
Name Type Description dyn_description String Dynaform description dyn_content String Dynaform content
Result:
-
Type Description object Returns an object with the dynaform information and the attribute "dyn_uid"
Example:
Request
{
"dyn_title": "My DynaForm1",
"dyn_description": "My DynaForm1 DESCRIPTION",
"dyn_type": "xmlform",
"copy_import":
{
"prj_uid": "7389179125176dac806d205065699622",
"dyn_uid": "77941473952b49c65a01a80041727578"
}
}
Response
{
"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:
-
Name Type Description workspace String Workspace name prj_uid String Project UID
Required Fields:
-
Name Type Description dyn_title String Dynaform title dyn_version Integer Dynaform version pmtable object PM Table data pmtable . tab_uid String PMTable UID pmtable . fields object Definition of the primary key to register in the PM Table
Optional Fields:
-
Name Type Description dyn_description String Dynaform description dyn_content String Dynaform content
Result:
-
Type Description object Returns an object with the dynaform information and the attribute "dyn_uid"
Example:
Request
{
"dyn_title": "My DynaForm1",
"dyn_description": "My DynaForm1 DESCRIPTION",
"dyn_type": "xmlform",
"pmtable":
{
"tab_uid": "72249773552b84ded1d8aa4036518645",
"fields": [
{
"fld_name": "ID",
"pro_variable": "@#APPLICATION"
}
]
}
}
Response
{
"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:
-
Name Type Description workspace String Workspace name prj_uid String Project UID dyn_uid String Dynaform UID
Optional Fields:
-
Name Type Description dyn_title String Dynaform title dynaform_description String Dynaform description dyn_type String Dynaform type dyn_version Integer Dynaform version dyn_content String Dynaform content
Result:
-
Type Description empty No return
Example:
Request
{
"dyn_title": "My DynaForm1…",
"dyn_description": "My DynaForm1 DESCRIPTION…",
"dyn_type": "xmlform"
}
Response
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:
-
Name Type Description workspace String Workspace name prj_uid String Project UID dyn_uid String Dynaform UID
Result:
-
Type Description empty No return
Example:
Response
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:
Name | Description | Type | Value |
---|---|---|---|
pu_uid | UID of the relation with users or groups | String | String Alphanumeric |
pu_type | User type | String | Alphanumeric string: "Supervisor" or "Group_supervisor" |
usr_uid | User UID | String | Alphanumeric string |
usr_username | Username | String | Alphabetic string |
usr_firstname | User first name | String | Alphabetic string |
usr_lastname | User lastname | String | Alphanumeric string |
usr_email | User email | String | Alphanumeric string |
grp_uid | Group UID | String | Alphanumeric string |
grp_name | Group name | String | Alphanumeric string |
obj_type | Type | String | Alphabetic string "user" or "group" |
pud_uid | UID that connects the relation with the dynaform | String | Alphanumeric string |
pud_position | Dynaform position | Number | Numeric Value |
dyn_uid | Dynaform UID | String | Alphanumeric string |
dyn_title | Dynaform name | String | Alphanumeric string |
pui_uid | UID of the relation with the input document | String | Alphanumeric string |
pui_position | Input document position | Number | Numeric Value |
inp_doc_uid | Input document UID | String | Alphanumeric string |
inp_doc__title | Input document title | String | Alphanumeric 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:
-
Name Type Description workspace String Workspace name prj_uid String Project UID
Result:
-
Type Description array Returns an array of users and groups assigned as process supervisors
Example:
Response
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:
-
Name Type Description workspace String Workspace name prj_uid String Process UID pu_uid String UID that connects the relation with the Dynaform
Result:
-
Type Description object Returns an object of the specified process supervisor
Example:
Response
{
"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:
-
Name Type Description workspace String Workspace name prj_uid String Project UID
Result:
-
Type Description array Returns an array of available users and groups objects
Example:
Response
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:
-
Name Type Description workspace String Workspace name prj_uid String Project UID
Optional Parameters:
-
Name Type Description obj_type String Alphabetic string user or group
Result:
-
Type Description array Returns an array of groups objects
Example:
Response
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:
-
Name Type Description workspace String Workspace name prj_uid String Project UID
Optional Parameters:
-
Name Type Description obj_type String Alphabetic string user or group
Result:
-
Type Description array Returns an array with one-level data
Example:
Response
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:
-
Name Type Description workspace String Workspace name prj_uid String Project UID
Result:
-
Type Description array Returns an array of objects with the dynaforms data
Example:
Response
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:
-
Name Type Description workspace String Workspace name prj_uid String Project UID pud_uid String UID that connects the relation with the Dynaform
Result:
-
Type Description object Returns an object with the dynaform data
Example:
Response
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:
-
Name Type Description workspace String Workspace name prj_uid String Project UID
Result:
-
Type Description array Returns an array of objects with the dynaform data
Example:
Response
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:
-
Name Type Description workspace String Workspace name prj_uid String Project UID
Result:
-
Type Description array Returns an array of objects with the input documents data
Example:
Response
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:
-
Name Type Description workspace String Workspace name prj_uid String Project UID
Result:
-
Type Description array Returns an array of objects with the available input documents data
Example:
Response
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:
-
Name Type Description workspace String Workspace name prj_uid String Project UID pui_uid String UID of the relation with the input document
Result:
-
Type Description object Returns an object with the input document data
Example:
Response
{
"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:
-
Name Type Description workspace String Workspace name prj_uid String Project UID
Required Fields:
-
Name Type Description pu_type String Specifies whether it is a user (pu_type = SUPERVISOR) or group (pu_type = GROUP_SUPERVISOR) usr_uid / grp_uid String User UID / Group UID
Optional Fields:
-
Name Type Description usr_username String Username usr_firstname String User firstname usr_lastname String User lastname usr_email String User email grp_name String Group name obj_type String Alphabetic string user or group
Result:
-
Type Description object Returns an object with data of the relation user/group - supervisor
Example:
Request
{
"pu_type": "SUPERVISOR",
"usr_uid": "70798526351ed3cf988be33081236564",
}
Response
{
"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:
-
Name Type Description workspace String Workspace name prj_uid String Project UID
Required Fields:
-
Name Type Description dyn_uid String Dynaform UID
Optional Fields:
-
Name Type Description pud_position String Position
Result:
-
Type Description object Returns an object with the information of the relation with the dynaform
Example:
Request
{
"pud_position": "1",
"dyn_uid": "766433290522e23c7941be3033545453",
}
Response
{
"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:
-
Name Type Description workspace String Workspace name prj_uid String Project UID
Required Fields:
-
Name Type Description inp_doc_uid String Input Document UID
Optional Fields:
-
Name Type Description pui_position String Position
Result:
-
Type Description object Returns an object with information of the relation with the input document
Example:
Request
{
"pui_position": "1",
"input_doc_uid": "766433290522e23c7941be3033545453",
}
Response
{
"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:
-
Name Type Description workspace String Workspace name prj_uid String Project UID pu_uid String Relation UID with the user or group
Result:
-
Type Description empty No return
Example:
Response
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:
-
Name Type Description workspace String Workspace name prj_uid String Project UID pu_uid String Relation UID with the dynaform
Result:
-
Type Description empty No return
Example:
Response
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:
-
Name Type Description workspace String Workspace name prj_uid String Project UID pu_uid String Relation UID with the input document
Result:
-
Type Description empty No return
Example:
Response
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:
-
Name Type Description workspace String Workspace name prj_uid String Project UID pu_uid String Relation UID with the dynaform
Optional Fields:
-
Name Type Description pud_position String Dynaform position
Result:
-
Type Description object Returns an object with the new information of the relation with the dynaform
Example:
Request
{
"pud_position": ”1”
}
Response
{
"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:
-
Name Type Description workspace String Workspace name prj_uid String Project UID pu_uid String Relation UID
Optional Fields:
-
Name Type Description pui_position String Input document position
Result:
-
Type Description object Returns an object
Example:
Request
{
"pud_position": ”1”
}
Response
{
"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_uid | Database connection UID | String | String with the database connection UID |
dbs_type | Database type | String | "mysql" (String verified with the DB engine type) |
dbs_server | Address of the database server | String | “192.168.11.4” (String) |
dbs_database_name | Database name | String | "mydatabase" (Alphanumeric string) |
dbs_username | Username in database server | String | "root" (Alphanumeric string) |
dbs_port | Database server port | String | "3306" (Numeric) |
dbs_encode | Database encoding | String | "utf8" (Alphanumeric string) |
dbs_password | Database 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_description | Description of the connection to the database | String | "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:
-
Name Type Description workspace String Workspace name prj_uid String Project UID
Result:
-
Type Description array Returns an array of database connection objects
Example:
Response
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:
-
Name Type Description workspace String Workspace name prj_uid String Process UID dbs_uid String Database UID
Result:
-
Type Description object Returns an object with the database connection data
Example:
Response
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:
-
Name Type Description workspace String Workspace name prj_uid String Project UID
Required Fields:
-
Name Type Description dbs_type String Database type dbs_server String Address of the database server dbs_database_name String Database name dbs_port Integer Database server port dbs_encode String Encoding Database
Optional Fields:
-
Name Type Description db_username String Database username dbs_password String User password of the database server (This field is checked by type Database "dbs_type") dbs_description String Description of the database connection
Result:
-
Type Description object Returns an object with information of the new database connection
Example:
Request
{
"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:
-
Name Type Description workspace String Workspace name prj_uid String Project UID
Required Fields:
-
Name Type Description dbs_type String Database type dbs_server String Address of the database server dbs_database_name String Database name dbs_port Integer Database server port dbs_encode String Encoding Database
Optional Fields:
-
Name Type Description db_username String Database username dbs_password String User password of the database server (This field is checked by type Database "dbs_type") dbs_description String Description of the database connection
Result:
-
Type Description array Returns an array of objects with the connection information
Example:
Request
{
"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
[
{
"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:
-
Name Type Description workspace String Workspace name prj_uid String Project UID dbs_uid String Database connection UID
Required Fields:
-
Name Type Description dbs_type String Database type dbs_server String Address of the database server dbs_database_name String Database name dbs_port Integer Database server port dbs_encode String Encoding Database
Optional Fields:
-
Name Type Description db_username String Database username dbs_password String User password of the database server (This field is checked by type Database "dbs_type") dbs_description String Description of the database connection
Result:
-
Type Description empty No return
Example:
Request
{
"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
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:
-
Name Type Description workspace String Workspace name prj_uid String Project UID dbs_uid String Relation UID
Result:
-
Type Description empty No return
Example:
Response
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:
Name | Description | Type | Value |
---|---|---|---|
sch_uid | Case scheduler UID | String | String with the case scheduler UID |
sch_option | Option of the period in which the case will be active | Number | 1. Daily 2. Weekly 3. Monthly 4. One time only 5. Every |
sch_name | Case scheduler name | String | String |
sch_del_user_name | Username | String | String |
sch_del_user_pass | User password | String | String |
tas_uid | Task UID | String | Alphanumeric string |
sch_start_time | Start time of the task | Date | HH: MM. |
sch_start_date | Start date of the task | Date | YYYY-mm-dd. |
sch_every_days | Specific number of every how many days the case scheduler will trigger | Integer | Integer |
sch_week_days | Weekdays | Integer | 1.Monday 2.Tuesday 3.Wednesday 4.Thursday 5.Friday 6.Saturday 7.Sunday separated by pipeline. E.g. 1|2|3 |
sch_start_day | Initial option | Integer | 1. Day of month or 2. The day. |
sch_start_day_opt_1 | Day of the month | Integer | 1 to 31. |
sch_start_day_opt_2 | Compound data | String | Two 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_months | Months | Integer | E.g. Separated by pipeline 1|2|3 |
sch_end_date | End date of the task | Date | YYYY-mm-dd. |
sch_repeat_every | Hours for the case scheduler to be repeated | Date | HH. MM. |
sch_repeat_until | Repeat until | String | String |
sch_repeat_stop_if_running | Stop when | String | String |
case_sh_plugin_uid | Plugin UID | String | String |
sch_time_next_run | Next execution date | Date | YYYY-mm-dd HH:MM:SS. |
sch_last_run_time | Last execution date | String | YYYY-mm-dd HH:MM:SS. |
sch_state | Current status | String | String |
sch_last_state | Previous status | String | String |
usr_uid | Currently logged user | String | String |
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:
-
Name Type Description workspace String Workspace name prj_uid String Project UID
Result:
-
Type Description array Returns an array of objects with the case schedulers information
Example:
Response
[
{
"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:
-
Name Type Description workspace String Workspace name prj_uid String Project UID sch_uid String Case scheduler UID
Result:
-
Type Description object Returns a case scheduler object
Example:
Response
{
"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:
-
Name Type Description workspace String Workspace name prj_uid String Project UID
Required Fields:
-
Name Type Description sch_option Number Option of the period the case scheduler will be activated in the case sch_start_time (Mandatory when sch_option=1,2,3, or 4) Date Task start time sch_start_date (Mandatory when sch_option=1,2,3, or 4) Date Task start date sch_week_days (Mandatory when sch_option=2) Integer Days of the week (1-7, they may go separated by a pipeline) sch_start_day (Mandatory when sch_option=3) Integer Days of the week (1. Day of the month, 2. The day) sch_start_day_opt_1 (Mandatory when sch_start_day=1) Integer Days of the month (1-30) sch_start_day_opt_2 (Mandatory when sch_start_day=2) Integer Compound data. (Check their definitions in the main table) sch_months (Mandatory when sch_option=3) Integer Months sch_end_date (Mandatory when sch_option=1,2 or 3) Date End date of the task sch_repeat_every (Mandatory when sch_option=5) Date Hours for the case scheduler to be repeated sch_name String Case scheduler name sch_del_user_name String Case scheduler username tas_uid String Task UID
Optional Fields:
-
Name Type Description sch_del_user_pass String Case scheduler password sch_repeat_until String Repeat until sch_repeat_stop_if_running Integer Stop when case_sh_plugin_uid String Plugin UID sch_state String Current status sch_last_state String Previous status
Result:
-
Type Description object Returns an object with data of the new case scheduler
Example:
Request
{
"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
{
"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:
-
Name Type Description workspace String Workspace name prj_uid String Project UID sch_uid String Case scheduler UID
Required Fields:
-
Name Type Description sch_option Number Option of the period the case scheduler will be activated in the case sch_name String Case scheduler name sch_del_user_name String Case scheduler username tas_uid String Task UID sch_state String Case scheduler status sch_start_time (Mandatory when sch_option=1,2,3, or 4) Date Task start time sch_start_date (Mandatory when sch_option=1,2,3, or 4) Date Task start date sch_week_days (Mandatory when sch_option=2) Integer Days of the week (1-7, they may go separated by a pipeline) sch_start_day (Mandatory when sch_option=3) Integer Days of the week (1. Day of the month, 2. The day) sch_start_day_opt_1 (Mandatory when sch_start_day=1) Integer Days of the month (1-30) sch_start_day_opt_2 (Mandatory when sch_start_day=2) Integer Compound data. (View their definitions in the main table) sch_months (Mandatory when sch_option=3) Integer Months sch_end_date (Mandatory when sch_option=1,2 or 3) Date End date of the task sch_repeat_every (Mandatory when sch_option=5) Date Hours for the case scheduler to be repeated
Optional Fields:
-
Name Type Description sch_del_user_pass String Case scheduler password sch_repeat_until String Repeat until sch_repeat_stop_if_running Integer Stop when case_sh_plugin_uid String Plugin UID sch_last_state String Previous status
Result:
-
Type Description object Returns an object with the case scheduler new information
Example:
Request
{
"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
{
"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:
-
Name Type Description workspace String Workspace name prj_uid String Project UID sch_uid String Case scheduler UID
Result:
-
Type Description empty No return
Example:
Response
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:
Name | Description | Type | Value |
---|---|---|---|
op_uid | Process permission UID | String | "h3kj231..." (String) |
usr_uid | User or group which will get the permission (value depends on "Op_user_relation") | String | "h3kj231..." (user or group UID) |
op_user_relation | Value 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_status | The case status which will get the permission | String | "ALL" or "DRAFT" or "TO_DO" or "PAUSED" or "COMPLETED" or (unique values) |
op_participate | Value 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_type | Value for the type of object of the permission | String | "ANY" or "DYNAFORM" OR "INPUT" "OUTPUT" "CASES_NOTES" "MSGS_HISTORY" (unique values) |
op_action | Type of action of the assigned permission | String | "BLOCK" or "VIEW" or "DELETE" (unique values) |
tas_uid | Value of the objective task UID of the permission. | String | "h3kj231..." (task UID) |
op_task_source | Value of the origin task UID of the permission. | String | "h3kj231..." (task UID) |
dynaforms | Value 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) |
inputs | Value of the input permission UID (Only takes into account that field when the value of "op_obj_type" is "INPUT") | Integer | "h3kj321..." (Input UID) |
outputs | Value 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:
-
Name Type Description workspace String Workspace name prj_uid String Project UID
Result:
-
Type Description array Returns an array of the process permissions objects
Example:
Response
[
{
"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:
-
Name Type Description workspace String Workspace name prj_uid String Project UID op_uid String Process Permission UID
Result:
-
Type Description object Returns an object of the process permission
Example:
Response
[
"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:
-
Name Type Description workspace String Workspace name prj_uid String Project UID
Required Fields:
-
Name Type Description op_user_relation String Determines if the permission is assigned to a user or to a group 1 = user, 2 = group usr_uid String User or group that will have the permission. It depends on op_user_relation op_action String Type of action assigned in the permission op_case_status String The case status which will get permission op_participate String 0 = Not participated, 1 = Participated op_obj_type String Value for the object type of permission
Optional Fields:
-
Name Type Description tas_uid String Task value UID, permission target op_task_source String Task value UID, permission source dynaforms String Dynaform value UID of the permission (Only takes account the field when the value of "It op_obj_type" is "DYNAFORM" inputs Integer Value of the ID of the input Permission (Only takes into account that field when the value of "op_obj_type" is "INPUT") outputs Integer The output value of the ID Permission (Only takes into account that field when the value of "op_obj_type" is "OUTPUT")
Result:
-
Type Description object Returns an object with the information of the new permission
Example:
Request
{
"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
[
"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:
-
Name Type Description workspace String Workspace name prj_uid String Project UID op_uid String Process-permissions UID
Required Fields:
-
Name Type Description usr_uid String op_user_relation op_user_relation String 1 = user, 2 = group op_action String Type of action assigned in the permission op_case_status String The state of the case which will get permission op_participate String 0 = Not participated, 1 = Participated op_obj_type String Value for the object type of permission op_action String Type of action assigned in the permission
Optional Fields:
-
Name Type Description tas_uid String Task value UID, permission target op_task_source String Task value UID, permission source dynaforms String Dynaform value UID of the permission (Only takes account the field when the value of "It op_obj_type" is "DYNAFORM" inputs Integer Value of the ID of the input Permission (Only takes into account that field when the value of "op_obj_type" is "INPUT") outputs Integer The output value of the ID Permission (Only takes into account that field when the value of "op_obj_type" is "OUTPUT")
Result:
-
Type Description empty No return
Example:
Response
{
"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:
-
Name Type Description workspace String Workspace name prj_uid String Project UID op_uid String Process-permissions UID
Result:
-
Type Description empty No return
Example:
Response
Web Entry
The following are the methods currently implemented for the web entry of the designer in the ProcessMaker API.
3.
Create new web entry
3.1.
Using the method: PHP pages with web Services
3.2.
Using the method: Single HTML
Web Entry:
Name | Description | Type | Value |
---|---|---|---|
we_uid | Web entry UID | String | "9541049475298f190420f51086854718" (String of 32 characters) |
tas_uid | Task UID | String | "9541049475298f190420f51086854718" (String of 32 characters) |
dyn_uid | Dynaform UID | String | "9541049475298f190420f51086854718" (String of 32 characters) |
usr_uid | User UID | String | "9541049475298f190420f51086854718" (String of 32 characters) |
we_title | Title | String | "My dynaform" |
we_description | Description | String | "Description" |
we_method | Creation method | String | "WS", "HTML" (unique values) |
we_input_document_access | Input Document Access | Integer | 0, 1 (unique values) 0: Restricted to process permissions 1: No Restriction |
we_data | Data | String | "9541049475298f190420f51086854718" (String of 32 characters) |
we_create_usr_uid | UID of the user who created the process. | String | "9541049475298f190420f51086854718" (String of 32 characters) |
we_update_usr_uid | UID of the user who updated the registry. | String | "9541049475298f190420f51086854718" (String of 32 characters) |
we_create_date | Creation date (According to setting in "Global Date Format"). | Datetime | “2012-10-22 14:51:11” |
we_update_date | Update 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:
-
Name Type Description workspace String Workspace name. prj_uid String Project UID
Result:
-
Type Description array Returns an array of objects with data of each web entry.
Example:
Response
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:
-
Name Type Description workspace String Workspace name. prj_uid String Project UID we_uid String Web entry UID
Result:
-
Type Description object Returns an object with data of the Web Entry
Example:
Response
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:
-
Name Type Description workspace String Workspace name. prj_uid String Project UID
Required Fields:
-
Name Type Description tas_uid String Task UID dyn_uid String Dynaform UID usr_uid String User UID we_title String Title we_method String Creation method = "WS" we_input_document_access String Input document access
Optional Fields:
-
Name Type Description we_description String Description we_data String Data
Result:
-
Type Description object Returns an object with data of the web entry plus the "we_uid" attribute.
Example:
Request
{
"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
{
"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:
-
Name Type Description workspace String Workspace name. prj_uid String Project UID
Required Fields:
-
Name Type Description tas_uid String Task UID dyn_uid String Dynaform UID we_title String Title we_method String Creation method = "HTML" we_input_document_access String Input document access
Optional Fields:
-
Name Type Description usr_uid String User UID we_description String Description we_data String Data
Result:
-
Type Description object Returns an object with data of the web entry plus the "we_uid" attribute.
Example:
Request
{
"tas_uid": "821603509526eae5e100ac2043080803",
"dyn_uid": "2820662365261577c336381090786467",
"we_title": "My DynaForm 2",
"we_description": "Description...",
"we_method": "HTML",
"we_input_document_access": 1
}
Response
{
"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:
-
Name Type Description workspace String Workspace name. prj_uid String Project UID we_uid String Web entry UID
Optional Fields:
-
Name Type Description tas_uid String Task UID dyn_uid String Dynaform UID usr_uid String User UID we_title String Title we_description String Description we_method String Creation method we_input_document_access String Input document access we_data String Data
Result:
-
Type Description empty No return
Example:
Request
{
"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
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:
-
Name Type Description workspace String Workspace name. prj_uid String Project UID we_uid String Web entry UID
Result:
-
Type Description empty No return
Example:
Response
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:
Name | Description | Type | Value |
---|---|---|---|
map_type | Map type | String | "NONE", "PROCESSMAP", "STAGES" (unique values) |
routing_history | Routing history | Integer | 0,1 (unique values) |
messages_history | Messages history | Integer | 0,1 (unique values) |
cto_uid | Case tracker object UID | String | "9541049475298f190420f51086854718” (String of the 32 characters) |
cto_type_obj* | Object type | String | "DYNAFORM", "INPUT_DOCUMENT", "OUTPUT_DOCUMENT" (unique values) |
cto_uid_obj* | Object UID | String | "9541049475298f190420f51086854718” (String of the 32 characters) |
cto_condition | Case tracker object condition, the object is only available if the condition accomplishes true | String | "@@YEAR==2014" |
cto_position | Position that specifies the order of deployment, it starts on 1 | Integer | 1,2... |
obj_uid | Object UID | String | "9541049475298f190420f51086854718” (String of the 32 characters) |
obj_title | Object title | String | "Title..." |
obj_description | Object description | String | "Description..." |
obj_type | Object type | String | "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:
-
Name Type Description workspace String Workspace name prj_uid String Project UID
Result:
-
Type Description array Returns an array of objects with data of the Case Tracker
Example:
Response
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:
-
Name Type Description workspace String Workspace name prj_uid String Project UID
Optional Fields:
-
Name Type Description map_type String Map type routing_history Integer Routing history messages_history Integer Messages history
Result:
-
Type Description empty No return
Example:
Request
{
"map_type": "NONE",
"routing_history": 0,
"message_history": 0
}
Response
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:
-
Name Type Description workspace String Workspace name prj_uid String Project UID
Result:
-
Type Description array Returns an object array with data of each Case Tracker Object of the project
Example:
Response
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:
-
Name Type Description workspace String Workspace name prj_uid String Project UID
Result:
-
Type Description array Returns an object array with data of each Object available for the project
Example:
Response
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:
-
Name Type Description workspace String Workspace name prj_uid String Project UID cto_uid String Case tracker object UID
Result:
-
Type Description object Returns an object with the Case Tracker Object data
Example:
Response
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:
-
Name Type Description workspace String Workspace name prj_uid String Project UID
Optional Fields:
-
Name Type Description cto_type_obj String If sent cto_type_obj it is necessary to send cto_uid_obj cto_uid_obj String If sent cto_uid_obj it is necessary to send cto_type_obj cto_condition String Case tracker condition cto_position String Position that specifies the order of deployment, it starts on 1 obj_uid String Object UID obj_title String Object title obj_description String Object description obj_type String Object type
Result:
-
Type Description object Returns an object with the Case Tracker Object data, plus "cto_uid"
Example:
Request
{
"cto_type_obj": "OUTPUT_DOCUMENT",
"cto_uid_obj": "61792009652aa1529305888088498275",
"cto_condition": "",
"cto_position": 5
}
Response
{
"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:
-
Name Type Description workspace String Workspace name prj_uid String Project UID cto_uid String Case tracker object UID
Optional Fields:
-
Name Type Description cto_type_obj String If sent cto_type_obj it is necessary to send cto_uid_obj cto_uid_obj String If sent cto_uid_obj it is necessary to send cto_type_obj cto_condition String Case tracker condition cto_position String Position that specifies the order of deployment, it starts on 1 obj_uid String Object UID obj_title String Object title obj_description String Object description obj_type String Object type
Result:
-
Type Description empty No return
Example:
Request
{
"cto_type_obj": "OUTPUT_DOCUMENT",
"cto_uid_obj": "61792009652aa1529305888088498275",
"cto_condition": "@@YEAR == 2014",
"cto_position": 5
}
Response
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:
-
Name Type Description workspace String Workspace name prj_uid String Project UID cto_uid String Case tracker object UID
Result:
-
Type Description empty No return
Example:
Response
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
6.
Delete a document of a file
Process File Manager resources:
-
Name Description Type Value prj_uid Project UID String String of 32 characters prf_uid File UID String String of 32 characters prf_path Path name String "public/.../..." or "templates/.../..." path Path name String "public/.../..." or "templates/.../..." prf_filename File name String String content File content String String usr_uid UID of the user who created the document String String prg_update_usr_uid UID of the user who updated the document String String prf_type Registry type String String. It could be a file or folder prf_editable Indicates if the registry is editable String String prf_create_date Document creation date Date Date prf_update_date Document update date Date Date prf_content Document content String String
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:
-
Name Type Description workspace String Workspace name prj_uid String Project UID
Optional Parameter:
-
Name Type Description path String File path
Result:
-
Type Description array Returns an array of objects with information of the files
Example:
Response
// 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:
-
Name Type Description workspace String Workspace name prj_uid String Project UID
Required Fields:
-
Name Type Description prf_path String Path name prf_filename String File name content String File content
Result:
-
Type Description object Returns an object with information of the new file
Example:
Request
{
"prf_filename": "file.html",
"prf_path": "public/carpeta_1",
"prf_content": "document content"
}
Response
{
"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:
-
Name Type Description workspace String Workspace name prj_uid String Project UID prf_uid String File UID
Required Fields:
-
Name Type Description content String File content
Result:
-
Type Description object Returns an object with information of the file
Example:
Request
{
"prf_content": "modify content"
}
Response
{
"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:
-
Name Type Description workspace String Workspace name prj_uid String Project UID prf_uid String File UID
Result:
-
Type Description empty No return
Example:
Response
5. Download document
- GET /api/1.0/{workspace}/{prj_uid}/file-manager/{prf_uid}/download
Function:
(doGetProcessFilesManagerDownload)
Parameters:
-
Name Type Description workspace String Workspace name prj_uid String Project UID prf_uid String File UID
Result:
-
Type Description empty No return
Example:
Response
6. Delete a document of a file
- DELETE /api/1.0/{workspace}/project/{prj_uid}/file-manager/{prf_uid}
Function:
(doDeleteProcessFilesManager)
Parameters:
-
Name Type Description workspace String Workspace name prj_uid String Project UID prf_uid String File UID
Result:
-
Type Description empty No return
Example:
Response
7. Delete a file in the project
- DELETE /api/1.0/{workspace}/project/{prj_uid}/file-manager/folder?path={path}
Function:
(doDeleteFolderProcessFilesManager)
Parameters:
-
Name Type Description workspace String Workspace name prj_uid String Project UID
Optional Parameter:
-
Name Type Description path String File path
Result:
-
Type Description empty No return
Example:
Response
8. List a single file
- GET /api/1.0/{workspace}/project/{prj_uid}/file-manager/{prf_uid}
Function:
(doGetProcessFileManager)
Parameters:
-
Name Type Description workspace String Workspace name prj_uid String Project UID prf_uid String File UID
Result:
-
Type Description object Returns an object
Example:
Response
{
"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:
Name | Description | Type | Value |
---|---|---|---|
rep_uid | Report table UID | String | String |
rep_tab_name | Report table name | String | "name" or "pmt_NAME" (Text string) |
rep_tab_dsc | Report table description | String | "Description of Report Table" (Text String) |
rep_tab_connection | Connection for the report table, possible values are: "workflow", "rp" and Database connections | String | "workflow" or "h348fd..." (Text String) |
rep_tab_type | Report table type, possible values are: "NORMAL" or "GRID" | String | "NORMAL" ("NORMAL" and "GRID") (unique allowed values) |
rep_tab_grid | Base grid UID on which the report table will be generated | Integer | "tr8945m..." (String of 32 characters) |
fields | Array of the report table columns | Array | Check the next fields |
Field Variables | |||
fld_dyn | Field name known in a dynaform | String | "Accepted" (Text String) |
fld_name | Field name for the table creation in mysql | String | "Accepted" (Text String) |
fld_label | Label name of the field for the GUI in PM | String | "Accepted" (Text String) |
fld_type | Field 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_size | Field size in mysql | Integer | "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:
-
Name Type Description workspace String Workspace name prj_uid String Project UID
Result:
-
Type Description array Returns an array of report table objects
Example:
Response
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:
-
Name Type Description workspace String Workspace name prj_uid String Project UID rep_uid String Report table UID
Result:
-
Type Description object Returns a report table object
Example:
Response
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:
-
Name Type Description workspace String Workspace name prj_uid String Project UID rep_uid String Report table UID
Result:
-
Type Description empty No return
Example:
Response
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:
-
Name Type Description workspace String Workspace name prj_uid String Project UID rep_uid String Report table UID
Result:
-
Type Description object Returns an object with data of the report table
Example:
Response
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:
-
Name Type Description workspace String Workspace name prj_uid String Project UID
Required Fields:
-
Name Type Description rep_tab_name String Report table name rep_tab_dsc String Report table description rep_tab_connection String Report table connection, possible values: "workflow", "rp" and database connection rep_tab_type String Report table type, possible values: "NORMAL" or "GRID" fields Array Columns of the report table. Check their variables in the main table.
Optional Fields:
-
Name Type Description rep_tab_grid String Base grid UID in which the report table was generated
Result:
-
Type Description object Returns an object with data of the new repot table
Example:
Request
[
{
"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
{
"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:
-
Name Type Description workspace String Workspace name prj_uid String Project UID rep_uid String Report table UID
Required Fields:
-
Name Type Description fields Array Columns of the report table. Check their variables in the main table.
Optional Fields:
-
Name Type Description rep_tab_dsc String Report table description
Result:
-
Type Description empty No return
Example:
Request
"rep_tab_dsc" : "table description",
"fields" : [
{
"fld_name" : "CAMPO",
"fld_label" : "CAMPITO",
"fld_type" : "VARCHAR",
"fld_size" : 200
}
]
}
Response
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:
-
Name Type Description workspace String Workspace name prj_uid String Project UID rep_uid String Report table UID
Result:
-
Type Description empty No return
Example:
Response
Project endpoints
The following are the methods currently implemented for project resources in the designer end point of the ProcessMaker API.
2.
Get the definition of a project activity
Project resources:
Name | Description | Type | Value |
---|---|---|---|
*prj_uid | Project UID | String | “1598d2h3…”(String of 32 characters) |
*prj_name | Project name or title | String | “Name” (Alphanumeric string) |
*prj_description | Project description | String | “Description” (Alphanumeric string) |
prj_target_namespace | This attribute specifies the namespace associated with the definition and continues the conversion for the XML | String | “String” (Alphanumeric string)
|
prj_expresion_language | This attribute identifies the formal language | String | “temp.html” (Valid template) |
prj_type_language | This attribute identifies the type of system the elements used in the language | String | “String” (Alphanumeric string) |
prj_exporter | This attribute identifies the tool the BPMN model file is exporting | String | “String” (Alphanumeric string) |
prj_exporter_version | This attribute identifies the tool version the BPMN model file is exporting | String | “String” (Alphanumeric string) |
prj_create_date | Project creation date | DateTime | “2015-01-01 12:00:00”(Datetime string) |
prj_update_date | Project update date | DateTime | “2015-01-01 12:00:00” (Datetime string) |
prj_author | Project author UID | String | |
prj_author_version | Value of the version of the project author | String | “String” (Alphanumeric string) |
prj_original_source | Original code of the project | String | “String” (Alphanumeric string) |
*diagrams | Diagram array |
Diagram Fields:
Name | Description | Type | Value |
---|---|---|---|
*dia_uid | Diagram UID | String | “1598d2h3…”(String of 32 characters) |
*activities | Activities array | Array | |
*events | Events array | Array | |
*gateways | Gateways array | Array |
|
*flows | Flows array | Array | |
*artifacts | Artifacts array | Array |
Activity Fields:
Name | Description | Type | Value |
---|---|---|---|
*act_uid | Activity UID | String | “1598d2h3…”(String of 32 characters) |
*act_name | Activity name | String | “Name”(Alphanumeric string) |
*act_type | Activity type | String | “TASK” or “SUB_PROCESS” (Unique values) |
act_is_for_compensation | Shows the activity | Integer | 1 (Numeric value) |
act_start_quantity | Quantity of required tokens for the activity to be available | Integer | 1 (Numeric value) |
act_completion_quantity | Quantity of required tokens for the activity to be completed | Integer | 1 (Numeric value) |
act_task_type | Type of the activity taks | String | “String” (Alphanumeric string) |
act_implementation | Activity implementation | String | “String” (Alphanumeric string) |
act_instantiate | Activity instance | Integer | 1 (Numeric string) |
act_script_type | Script type associated to the activity | String | "String" (Alphanumeric string) |
act_script | Script associated to the activity | String | "String" (Alphanumeric string) |
act_loop_type | Loop type of the activity | String | "String" (Alphanumeric string) |
act_test_before | Value to decide when the loop condition will be evaluated | Integer | 1 (Numeric value) |
act_loop_maximum | Maximum number of iteration for loop | Integer | 1 (Numeric Value) |
act_loop_condition | Loop condition | String | "String" (Alphanumeric string) |
act_loop_cardinality | Number of cases to be generated with the loop | Integer | 1 (Numeric value) |
act_loop_behavior | Defines if and when an event is released with the loop | String | "String" (Alphanumeric string) |
act_is_adhoc | Verifies if the activity allows ad hoc transfer | Integer | 1 (Numeric value) |
act_is_collapsed | Verifies if the task can collapse | Integer | 1 (Numeric value) |
act_completion_condition | Condition for the activity to finish | String | "String" (Alphanumeric string) |
act_ordering | Set the order type in the activity | String | "String" (Alphanumeric string) |
act_cancel_remaining_instances | This attribute is only used if the request is parallel. Determines if it executes cases, it cancels when the act_completion_condition is true | Integer | 1 (Numeric value) |
act_protocol | Activity protocol | String | "String" (Alphanumeric string) |
act_method | Activity method | String | "String" (Alphanumeric string) |
act_is_global | Value that specifies if the activity is global | Integer | 1 (Numeric value) |
act_referer | Activity reference | String | "String" (Alphanumeric string) |
act_default_flow | Flow that the activity uses by default | String | "String" (Alphanumeric string) |
act_master_diagram | Activity master diagram | String | "String" (Alphanumeric string) |
*bou_x | X-Coordinate of the element | Integer | 348 (Numeric value) |
*bou_y | Y-Coordinate of the element | Integer | 348 (Numeric value) |
*bou_width | Element width | Integer | 40(Numeric value) |
*bou_height | Element height | Integer | 28 (Numeric value) |
bou_container | Class of the element container | String | “bpmnDiagram”(Alphanumeric string) |
Event Fields:
Name | Description | Type | Value |
---|---|---|---|
*evn_uid | Event UID | String | “1598d2h3…”(String of 32 characters) |
*evn_name | Event name | String | "name" (Alphanumeric string) |
*evn_type | Event type | String | “START” or “END”(Unique values) |
*evn_marker | Event marker type | String | “EMPTY” or “TIMER” o “MESSAGE” (Unique values)
|
evn_is_interrupting | Value for the event to interrupt the case | Integer | 1 (Numeric value) |
evn_cancel_activity | Value for the event to cancel the activity | Integer | 1 (Numeric value) |
evn_activity_ref | Reference that has with activity | String | "String" (Alphanumeric string) |
evn_wait_for_completion | Value that specifies the wait to complete a case | Integer | 1 (Numeric value) |
evn_error_name | Error name that may occur in the event | String | "String" (Alphanumeric string) |
evn_error_code | Error code that may occur in the event | String | "String" (Alphanumeric string) |
evn_escalation_name | Event escalation name | String | "String" (Alphanumeric string) |
evn_escalation_code | Event escalation code | String | "String" (Alphanumeric string) |
evn_message | Event message | String | "String" (Alphanumeric string) |
evn_operation_name | Event operation name | String | "String" (Alphanumeric string) |
evn_operation_implementation_ref | Event operation reference | String | "String" (Alphanumeric string) |
evn_time_date | Initial event time date | String | "String" (Alphanumeric string) |
evn_time_cycle | Event time cycle | String | "String" (Alphanumeric string) |
evn_time_duration | Event time duration | String | “String” (Alphanumeric string) |
evn_behavior | Event behaviour | String | "String" (Alphanumeric string) |
*bou_x | X-Coordinate of the element | Integer | 348 (Numeric Value) |
*bou_y | Y-Coordinate of the element | Integer | 348 (Numeric Value) |
*bou_width | Element width | Integer | 40 (Numeric Value) |
*bou_height | Element height | Integer | 28 (Numeric Value) |
bou_container | Class of the element container | String | “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:
Name | Description | Type | Value |
---|---|---|---|
*gat_uid | Gateway UID | String | “1598d2h3…”(String of 32 characters) |
*gat_name | Gateway name | String | “String” (Alphanumeric string) |
*gat_type | Gateway Type | String | “EXCLUSIVE” or “INCLUSIVE” or “PARALLEL” or “COMPLEX” (Unique values) |
*gat_direction | Gateway direction | String | “DIVERGING” or “CONVERGING” (Unique values)
|
gat_instantiate | Gateway instance | Integer | 1 (Numeric value) |
gat_event_gateway_type | Event gateway type | String | “String” (Alphanumeric string) |
gat_activation_count | Express the entrance doors in the gateways activation | Integer | 1 (Numeric value) |
gat_waiting_for_start | Express if the flow will recieve a count during its execution | Integer | 1 (Numeric value) |
gat_default_flow | Indicates the gateway default flow | String | “String” (Alphanumeric string) |
*bou_x | X-Coordinate of the element | Integer | 348 (Numeric value) |
*bou_y | Y-Coordinate of the element | Integer | 348 (Numeric value) |
*bou_width | Element width | Integer | 40 (Numeric value) |
*bou_height | Element height | Integer | 28 (Numeric value) |
bou_container | Class of the element container | String | “bpmnDiagram” (Alphanumeric string) |
Artifact Fields:
Name | Description | Type | Value |
---|---|---|---|
*art_uid | Artifact UID | String | “1598d2h3…”(String of 32 characters) |
*art_type | Artifact type | String | “TEXT_ANNOTATION” or “VERTICAL_LINE” or “HORIZONTAL_LINE” (Unique values) |
*art_name | Activity name | String | “Name” (Alphanumeric string) |
art_category_ref | Reference of the artifact category | String | “String” (Alphanumeric string) |
*bou_x | X-Coordinate of the element | Integer | 348 (Numeric value) |
*bou_y | Y-Coordinate of the element | Integer | 348 (Numeric value) |
*bou_width | Element widht | Integer | 40 (Numeric value) |
*bou_height | Element height | Integer | 28 (Numeric value) |
bou_container | Class of the element container | String | “bpmnDiagram” (Alphanumeric string) |
Flow Fields:
Name | Description | Type | Value |
---|---|---|---|
*flo_uid | Flow UID | String | “1598d2h3…”(String of 32 characters) |
*flo_type | Flow type | String | “SEQUENCE” (Unique value) |
*flo_name | Flow name | String | “Name” (Alphanumeric string) |
*flo_element_origin | Relation of the origin element flow | String | “String” (Alphanumeric string) |
*flo_element_origin_type | Type of the origin element flow | String | “String” (Alphanumeric string) |
*flo_element_dest | Relation of the destiny element flow | String | “String” (Alphanumeric string) |
*flo_element_dest_type | Type of the destiny element flow | String | “String” (Alphanumeric string) |
flo_is_inmidiate | Value to determine if the flow is inmediate | Integer | 1 (Numeric value) |
*flo_condition | Flow condition | String | “String” (Alphanumeric string) |
*flo_x1 | X-Coordinate of the origin element | Integer | 348 (Numeric value) |
*flo_y1 | Y-Coordinate of the origin element | Integer | 348 (Numeric value) |
*flo_x2 | X-Coordinate of the final element | Integer | 40 (Numeric value) |
*flo_y2 | Y-Coordinate of the final element | Integer | 28 (Numeric value) |
*flo_state | Point array where the flow generates an angle | Array |
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:
-
Name Type Description workspace String Workspace name
Result:
-
Type Description array Returns an array of objects
Example:
Response
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:
-
Name Type Description workspace String Workspace name prj_uid String Project UID
Result:
-
Type Description array Returns an array of objects
Example:
Response
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,