Skip to content

Create a Task Template

Create a task template with robot, map, point, and scheduling settings.

  • 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

  • taskName · String · Required

    Task name
    Example: Infrared inspection task

  • patrolType · String · Optional

    Inspection type: 1 routine, 2 special, 3 focused, 4 custom
    Example: 1

  • executeType · Integer · Optional

    Execution type: 1 immediate, 2 scheduled, 3 recurring, 4 interval-based
    Example: 1

  • pointCodes · String · Required

    Comma-separated inspection-point codes
    Example: a001_1,a001_2

  • priority · Integer · Optional

    Priority: 1 lowest, 2, 3, 4 highest

  • endAction · String · Required

    Action after completion: 1 return to charge automatically, 2 remain in place
    Example: 1

  • deviceLevel · Integer · Optional

    Device level: 0 area, 1 bay, 2 primary device, 3 point, 4 component
    Example: 3

  • isEnable · String · Optional

    Whether enabled: 0 no, 1 yes
    Example: 1

  • fixedStartTime · String · Optional

    Scheduled start time, used when executeType=2. Format: yyyy-MM-dd HH:mm:ss

  • cycleMonth · String · Optional

    Months in a recurring schedule, separated by commas
    Example: 1,2,5

  • cycleWeek · String · Optional

    Weekdays in a recurring schedule, separated by commas
    Example: 1,3,5

  • cycleExecuteTime · String · Optional

    Time of day for recurring execution (HH:mm:ss)

  • cycleStartTime · String · Optional

    Start of the recurrence period (yyyy-MM-dd HH:mm:ss)

  • cycleEndTime · String · Optional

    End of the recurrence period (yyyy-MM-dd HH:mm:ss)

  • intervalNumber · Integer · Optional

    Number of interval units
    Example: 2

  • intervalType · Integer · Optional

    Interval unit: 1 hours, 2 days, 3 minutes
    Example: 1

  • intervalExecuteTime · String · Optional

    Time of day for interval execution (HH:mm:ss)

  • intervalStartTime · String · Optional

    Start of the interval schedule (yyyy-MM-dd HH:mm:ss)

  • intervalEndTime · String · Optional

    End of the interval schedule (yyyy-MM-dd HH:mm:ss)

  • invalidStartTime · String · Optional

    Start of the blackout period (yyyy-MM-dd HH:mm:ss)

  • invalidEndTime · String · Optional

    End of the blackout period (yyyy-MM-dd HH:mm:ss)

  • invalidDailyStartTime · String · Optional

    Start of the daily blackout period (HH:mm:ss)

  • invalidDailyEndTime · String · Optional

    End of the daily blackout period (HH:mm:ss)

When a parameter is empty, do not include it in the string used to calculate sign.

{
"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": ""
}
{
"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": ""
}
{
"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": ""
}
{
"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"
}
FieldTypeExampleDescription
codeInteger200Status code
successBooleantrueWhether the request succeeded
msgStringsuccessResponse message
{
"success": true,
"code": 200,
"msg": "Operation succeeded",
"data": null
}
CodeDescription
400Invalid parameters
401Unauthorized
403Access denied
404Resource not found
500Internal server error