Enable or Disable a Task Template
Enable or disable a task template by its code.
Endpoint Information
Section titled “Endpoint Information”- Name: Enable or disable a task template by code
- Description: Enables or disables the task template identified by its code.
- Method:
POST - Path:
/remoteApi/switchTaskModelStatus - Login required: No
- Permission required: Yes
Notice: Only available in v1.3.3 and later.
Notes:
- Disabling a task template deletes all of its tasks that have not started.
- After enabling the template, you must issue the task again for it to take effect.
Request Parameters
Section titled “Request Parameters”| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
| taskCode | String | Yes | 2108818424886538240 | Task-template code |
| isEnable | Integer | Yes | 0 | Enabled status: 0 disabled, 1 enabled |
Example:
{ "taskCode": "2108818424886538240", "isEnable": 0}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 |
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 |