Task
Get Task List
This API retrieves a list of tasks with their relevant information, including task name, location ID, camera ID, camera RTSP, task status, task scheduler, and the task events (using IDs).
Endpoint: GET /tasks
Parameters:
Parameter | Decritpion | Type | Require |
---|---|---|---|
offset | Offset for pagination. (default 0) | integer | No |
limit | Limit the number of results per page. (default 100) | integer | No |
location_id | Filter tasks by location ID. (default all) | integer | No |
camera_id | Filter tasks by camera ID. (default all) | integer | No |
Example Request:
Response:s
Response Fields:
Field | Description | Type |
---|---|---|
id | The unique identifier for the task. | integer |
name | The name of the task. | string |
scheduler | The task scheduler configuration (24/7, daily, weekly). | string |
events | An array of event IDs related to this task. | array |
location_id | The ID of the location where the task is taking place. | integer |
camera_id | The ID of the camera used for the task. | integer |
camera_rtsp | The RTSP URL of the camera. | string |
status | The status of the task: | string |
Get Task Detail
This API retrieves detailed information about a specific task, including the task name, location ID, camera ID, camera RTSP, task status, task scheduler, events, confidence threshold, and object size filter.
Endpoint: GET /tasks/:task_id
Parameters:
Parameter | Description | Type | Require |
---|---|---|---|
task_id | The unique identifier for the task. | integer | Required |
Example Request:
Example Response:
Response Fields:
Field | Description | Type |
---|---|---|
id | The unique identifier for the task. | integer |
name | The name of the task. | string |
scheduler | The task scheduler configuration (type, interval, start_time, end_time). | object |
events | An array of event objects related to the task. | array |
location_id | The ID of the location where the task is taking place. | integer |
camera_id | The ID of the camera used for the task. | integer |
camera_rtsp | The RTSP stream URL of the camera. | string |
confidence_threshold | The confidence threshold for each detected object. | object |
object_size_filter | The size filter for each detected object. | object |
status | The status of the task: | string |