- style
List saved filters
The following endpoint can be used to retrieve an array of saved filters saved by current user or are shared by other staff.
GET [/:object_type]/filters
Where object_type
describe the object type you wish to get the saved filters for. We currently support the following object types:
Parameters
Table of allowed parameters.
_page | unsigned int | The page of the list to display. For example, 5 will display the fifth page. Each page contains 10 resources. |
---|---|---|
_limit | unsigned int | The maximum number of resources to return. Default is 10 and maximum is 50. |
_offset | unsigned int | The position in the list of resources to return from. For example, if you had 20 resources and requested an offset of 10. Resources 10 to 19 would be returned. Offset cannot be used in conjunction with _page . |
_fields | partial string | Allows you to specify optional fields and linked objects to include in the response. |
_filters | partial string | Allows you to filter contacts. For more information on available filters, please see the filter action. |
Filtering
You can filter the returned list using the _filters
parameter.
Name | Example | Description |
---|---|---|
id(<values>) | id(1,2,4) | |
shared(<values>) | shared(yes) | e.g yes, no |
staff(<values>) | staff(1, 5, 7) | |
object(<value>) | object(company, contact) | e.g, company, contact, affiliation, prospect, issue, milestone, activity, contract, issue, job, quote, staff, task |
NEW <field_name>_greater_than(<value>), <field_name>_less_than(<value>), <field_name>_greater_than_or_equal(<value>), <field_name>_less_than_or_equal(<value>)
| _filters=id_greater_than(5) | Available fields: id |
Using the _not
suffix (e.g, id_not
) on standard in filters will return results not in.
Handling the response
Below is a table of available response fields and objects that are returned within the response object of the returned object. The optional fields and objects can be requested in the _fields
parameter; see included examples. Underlined values are default.
id | unsigned int | The saved filter id. |
---|---|---|
title | string | The title for saved fitler |
object_type | string | The object type for saved filters, e.g. companies, contacts, etc. |
staff_id | unsigned int | The staff id who created the filter. |
shared | string | 'yes' or 'no' indicates whether this filter is a private or a shared filter. |
staff | object | The staff object data. |
Sample Response
GET /issues/filters.json?_fields=staff(email),object_type&_page=0&_filters=shared(yes)
{ "meta": { "status": "ok", "more_info": "https://affinitylive.jira.com/wiki/display/APIS/Status+Codes#ok", "message": "Everything executed as expected." }, "response": { "filters": [ { "object_type": "issue", "staff": { "email": "eamonn@sample.com", "firstname": "Eamonn", "id": "88", "surname": "Bell" }, "title": "Submitted Issues", "id": "27" }, { "id": "29", "object_type": "issue", "title": "Open Issues", "staff": { "surname": "Higgins", "id": "110", "firstname": "Christine", "email": "christine@sample.com" } }, { "object_type": "issue", "staff": { "surname": "Cowling", "id": "122", "email": "hugh@sample.com", "firstname": "Hugh" }, "title": "Recent Issues", "id": "46" }, { "title": "Current Issues", "staff": { "email": "mahlon@sample.com", "firstname": "Mahlon", "id": "1023", "surname": "Duke" }, "object_type": "issue", "id": "67" }, { "id": "70", "staff": { "surname": "Russell", "id": "1017", "firstname": "Alison", "email": "alison@sample.com" }, "title": "Open *Starts", "object_type": "issue" } ] } }