Get Single Filter
Retrieves a single filter by id, according to the Filter
interface in the engine.
Method
GET /filter/{id}
Parameters
Path Parameters
Name | Description |
---|---|
id | The id of the filter to be retrieved. |
Query Parameters
Name | Description |
---|---|
itemCount |
If set to true , each filter result will contain an itemCount property
with the number of items matched by the filter itself.
|
Result
A JSON object corresponding to the Filter
interface in the engine.
Its properties are as follows:
Name | Value | Description |
---|---|---|
id | String | The id of the filter. |
resourceType | String | The resource type of the filter, e.g., Task . |
name | String | The name of the filter. |
owner | String | The user id of the owner of the filter. |
query | Object | The save query of the filter as JSON object. |
properties | Object | The properties of the filter as JSON object. |
itemCount | Long |
The number of items matched by the filter itself. Note: Only exists if the query parameter
itemCount was set to true
|
Response Codes
Code | Media type | Description |
---|---|---|
200 | application/json | Request successful. |
403 | application/json | The authenticated user is unauthorized to read this filter. See the Introduction for the error response format. |
404 | application/json | Filter with given id does not exist. See the Introduction for the error response format. |
Example
Request
GET /filter/aFilterId
Response
Status 200.
{
"id": "9917d731-3cde-11e4-b704-f0def1e59da8",
"name": "Accounting Tasks",
"owner": null,
"properties": {
"color": "#3e4d2f",
"description": "Tasks assigned to group accounting",
"priority": 5
},
"query": {
"candidateGroup": "accounting"
},
"resourceType": "Task"
}
Request with ItemCount Enabled
GET /filter/aFilterId?itemCount=true
Response with ItemCount
Status 200.
{
"id": "9917d731-3cde-11e4-b704-f0def1e59da8",
"name": "Accounting Tasks",
"owner": null,
"properties": {
"color": "#3e4d2f",
"description": "Tasks assigned to group accounting",
"priority": 5
},
"query": {
"candidateGroup": "accounting"
},
"resourceType": "Task",
"itemCount": 23
}