Create a Task Template
Create a task template with robot, map, point, and scheduling settings.
Endpoint Information
Section titled “Endpoint Information”- Name: Create a task template
- Description: Creates and saves a task template without issuing a task.
- Method:
POST - Path:
remoteApi/onlySaveTaskModel - Login required: No
- Permission required: Yes
Request Parameters
Section titled “Request Parameters”Basic Parameters
Section titled “Basic Parameters”-
taskName·String· RequiredTask name
Example:Infrared inspection task -
patrolType·String· OptionalInspection type:
1routine,2special,3focused,4custom
Example:1 -
executeType·Integer· OptionalExecution type:
1immediate,2scheduled,3recurring,4interval-based
Example:1 -
pointCodes·String· RequiredComma-separated inspection-point codes
Example:a001_1,a001_2 -
priority·Integer· OptionalPriority:
1lowest,2,3,4highest -
endAction·String· RequiredAction after completion:
1return to charge automatically,2remain in place
Example:1 -
deviceLevel·Integer· OptionalDevice level:
0area,1bay,2primary device,3point,4component
Example:3 -
isEnable·String· OptionalWhether enabled:
0no,1yes
Example:1
Scheduled Execution
Section titled “Scheduled Execution”-
fixedStartTime·String· OptionalScheduled start time, used when
executeType=2. Format:yyyy-MM-dd HH:mm:ss
Recurring Execution
Section titled “Recurring Execution”-
cycleMonth·String· OptionalMonths in a recurring schedule, separated by commas
Example:1,2,5 -
cycleWeek·String· OptionalWeekdays in a recurring schedule, separated by commas
Example:1,3,5 -
cycleExecuteTime·String· OptionalTime of day for recurring execution (
HH:mm:ss) -
cycleStartTime·String· OptionalStart of the recurrence period (
yyyy-MM-dd HH:mm:ss) -
cycleEndTime·String· OptionalEnd of the recurrence period (
yyyy-MM-dd HH:mm:ss)
Interval Execution
Section titled “Interval Execution”-
intervalNumber·Integer· OptionalNumber of interval units
Example:2 -
intervalType·Integer· OptionalInterval unit:
1hours,2days,3minutes
Example:1 -
intervalExecuteTime·String· OptionalTime of day for interval execution (
HH:mm:ss) -
intervalStartTime·String· OptionalStart of the interval schedule (
yyyy-MM-dd HH:mm:ss) -
intervalEndTime·String· OptionalEnd of the interval schedule (
yyyy-MM-dd HH:mm:ss)
Blackout Periods
Section titled “Blackout Periods”-
invalidStartTime·String· OptionalStart of the blackout period (
yyyy-MM-dd HH:mm:ss) -
invalidEndTime·String· OptionalEnd of the blackout period (
yyyy-MM-dd HH:mm:ss) -
invalidDailyStartTime·String· OptionalStart of the daily blackout period (
HH:mm:ss) -
invalidDailyEndTime·String· OptionalEnd of the daily blackout period (
HH:mm:ss)
Request Examples
Section titled “Request Examples”When a parameter is empty, do not include it in the string used to calculate sign.
Routine inspection
Section titled “Routine inspection”{ "taskName": "zz_Routine Inspection 1", "patrolType": "1", "executeType": null, "pointCodes": "a001_16,a001_20", "priority": "1", "endAction": "1", "deviceLevel": "3", "isEnable": "1", "fixedStartTime": "", "cycleMonth": "", "cycleWeek": "", "cycleStartTime": "", "cycleEndTime": "", "intervalNumber": null, "intervalType": null, "intervalStartTime": "", "intervalEndTime": "", "invalidStartTime": "", "invalidEndTime": "", "invalidDailyStartTime": "", "invalidDailyEndTime": ""}Scheduled inspection
Section titled “Scheduled inspection”{ "taskName": "zz_Routine Inspection - Scheduled", "patrolType": "1", "executeType": 2, "pointCodes": "a001_16", "priority": "1", "endAction": "1", "deviceLevel": "3", "isEnable": "1", "fixedStartTime": "2025-12-02 16:00:00", "cycleMonth": "", "cycleWeek": "", "cycleStartTime": "", "cycleEndTime": "", "intervalNumber": null, "intervalType": null, "intervalStartTime": "", "intervalEndTime": "", "invalidStartTime": "2026-01-01 00:00:00", "invalidEndTime": "2026-01-02 23:59:59", "invalidDailyStartTime": "", "invalidDailyEndTime": ""}Recurring inspection
Section titled “Recurring inspection”{ "taskName": "zz_Periodic", "patrolType": "1", "executeType": 3, "pointCodes": "a001_16", "priority": "1", "endAction": "1", "deviceLevel": "3", "isEnable": "1", "fixedStartTime": "", "cycleMonth": "12,1", "cycleWeek": "2,3,4", "cycleExecuteTime": "16:00:27", "cycleStartTime": "2025-12-01 00:00:00", "cycleEndTime": "2026-01-03 00:00:00", "intervalNumber": null, "intervalType": null, "intervalStartTime": "", "intervalEndTime": "", "invalidStartTime": "2025-12-04 00:00:00", "invalidEndTime": "2026-01-05 23:59:59", "invalidDailyStartTime": "", "invalidDailyEndTime": ""}Interval-based inspection
Section titled “Interval-based inspection”{ "taskName": "zz_Interval", "patrolType": "1", "executeType": 4, "pointCodes": "a001_16,a001_17,a001_20", "priority": "1", "endAction": "1", "deviceLevel": "3", "isEnable": "1", "fixedStartTime": "", "cycleMonth": "", "cycleWeek": "", "cycleStartTime": "", "cycleEndTime": "", "intervalNumber": "2", "intervalType": 1, "intervalExecuteTime": "16:27:59", "intervalStartTime": "2025-12-01 00:00:00", "intervalEndTime": "2026-01-03 00:00:00", "invalidStartTime": "2025-12-04 00:00:00", "invalidEndTime": "2026-01-06 23:59:59", "invalidDailyStartTime": "19:30:16", "invalidDailyEndTime": "23:28:25"}Response
Section titled “Response”| Field | Type | Example | Description |
|---|---|---|---|
| code | Integer | 200 | Status code |
| success | Boolean | true | Whether the request succeeded |
| msg | String | success | Response message |
Response Example
Section titled “Response Example”{ "success": true, "code": 200, "msg": "Operation succeeded", "data": null}Error Codes
Section titled “Error Codes”| Code | Description |
|---|---|
| 400 | Invalid parameters |
| 401 | Unauthorized |
| 403 | Access denied |
| 404 | Resource not found |
| 500 | Internal server error |