TaskSearchService Resource
A set of services related to searching for tasks.
GET /v1/task/search
Search for tasks the requesting user has access to. The relation between each TaskSearchParameter is logical 'AND' and if multiple query parameters of the same type
are provided the relation between these are 'OR'.
The query parameters can be completely omitted and in this case all results the requesting user has access to are returned.
A maximum of 50 results will be returned. If more results are found, use offset to fetch the next results.
name | type | description | default | constraints | multivalued |
---|---|---|---|---|---|
auth-token | header | The authentication token. | no | ||
assignment-id | query | Any assignment id of interest. assignment-id and assignment-name are mutually exclusive. | long | yes | |
assignment-name | query | Any assignment name of interest. Can be a regular expression. | no | ||
assignment-type | query | Any AssignmentType of interest. | "arcos" or "area5" or "audio" or "blue_pirat" or "canrecorder" or "dlt" or "etas" or "ethernet_capture" or "file_fetcher" or "idc" or "ipemotionrt" or "lpd" or "mcdhub" or "mlog" or "mqtt" or "rp" or "shub" or "signal_reader" or "smart_eye" or "soh" or "swdl" or "video" | yes | |
offset | query | The offset to use for the query. | 0 | int | no |
order-by | query | The sort order for the query. | ASCENDING | "ASCENDING" or "DESCENDING" | no |
sort-by | query | The sort attribute for the query. | task-id | values: WCU_ID, TASK_ID, STATUS, ASSIGNMENT_TYPE, ASSIGNMENT_NAME, ASSIGNMENT_ID | no |
status | query | Default is [RUNNING, PENDING, ERROR, WARNING] | "ERROR" or "PENDING" or "RUNNING" or "STOPPED" or "STOP_PENDING" or "WARNING" | yes | |
task-id | query | Any taskID of interest. | int | yes | |
wcu-id | query | Any WCU ID of interest. | yes |
code | condition |
---|---|
400 | If both assignment-name and assignment-id are present. |
404 | If any provided assignment-id do not match an assignment. |
media type | data type | description |
---|---|---|
application/json | TaskSearchResult (JSON) |
Example
Request
GET /v1/task/search
Content-Type: */*
Accept: application/json
auth-token: ...
...
Response
HTTP/1.1 200 OK
Content-Type: application/json
{
"count" : 10,
"offset" : 0,
"limit" : 50,
"sortParameter" : "task-id",
"sortOrder" : "DESCENDING",
"results" : {
"taskID" : 1234,
"wcuID" : "04-1B-94-00-1D-2A",
"type" : "mcdhub",
"assignmentName" : "Trigger_test",
"taskCreatorID" : "user123",
"status" : {
"code" : 2,
"text" : "RUNNING"
},
"lastUploadDate" : "2024-03-14T09:31:06Z",
"creationDate" : "2024-03-12T11:31:06Z"
}
}