Case Scheduler Endpoints
The current methods implemented for the case scheduler resources in the ProcessMaker API designer are listed below:
- Case Scheduler Endpoints
- Case Scheduler Resources
- 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}
Case Scheduler Resources
Name | Description | Type | Value |
---|---|---|---|
sch_uid | Case scheduler UID | String | String with the case scheduler UID |
sch_option | Option where the period of time when the case will be active can be configured. | 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 | The case scheduler will trigger every number of days set here. | Integer | Integer |
sch_week_days | Weekdays | Integer | 1.Monday 2.Tuesday 3.Wednesday 4.Thursday 5.Friday 6.Saturday 7.Sunday The days of the week separated by a 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 items of data separated by pipeline. The first item of data: 1.First 2.Second 3.Third 4.Fourth 5.Last. The second item of data:d 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 when the case scheduler will 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
Gets the 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 containing information about the case schedulers.
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}
Gets 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
Creates a new Case Scheduler.
Permission:
- Users must have the PM_FACTORY permission assigned to their role to perform this action.
Structure:
POST /api/1.0/{workspace}/project/{prj_uid}/case-scheduler
Parameters:
-
Name Type Description workspace String Workspace name prj_uid String Project UID
Required Fields:
-
Name Type Description sch_option Number The period of time the case scheduler will be activated in the case can be set with this option. 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 be 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 when the case scheduler will 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 containing information about 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}
Updates a Case Scheduler.
Permission:
- Users must have the PM_FACTORY permission assigned to their role to perform this action.
Structure:
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 The period of time the case scheduler will be activated in the case can be set with this option. 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 be 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 when the case scheduler will 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 containing new information about the case scheduler.
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}
Deletes a Case Scheduler.
Permission:
- Users must have the PM_FACTORY permission assigned to their role to perform this action.
Structure:
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