Filter

Overview

The filter parameter allows you to narrow the results that are included in the response to your request. If no filter parameters are specified, all artifacts are returned. If a filter parameter is specified, artifacts are only returned if the artifact matches the specified criteria. The filter parameters can be used individually, or combined to narrow results further.

Syntax

The filter parameter must be specified using the following syntax:

filter={artifact-id eq (‘1’ or ‘2’ or ‘3’);artifact-type eq (‘Actor’);artifact-HasComments eq ‘true’;property-'My prop' eq 1;property-my2prop eq (‘my name’ or ‘your name’)}

Method

The filter parameter must be submitted using the HTTP POST method.

To submit information using the HTTP POST method, you must add the following information to the request header to override the GET method.

X-HTTP-Method-Override: GET

Then, include your filter parameter in the request body.  For example:

filter={artifact-type eq (‘UI Mockup');

Parameters

Supported operators

The supported operators varies depending on the data that you want to query.  The table below outlines the supported operators for each type of data.

  Query Type

eq

(equal to)

eq

(equal to)

bi

(between inclusive ends)

gt

(greater than)

lt

(less than)

ge

(greater than or equal to)

le

(less than or equal to)

AND OR
artifact-id

yes

n/a yes n/a n/a n/a n/a n/a
artifact-type yes n/a yes n/a n/a n/a n/a n/a
artifact-HasComments yes n/a

n/a

n/a n/a n/a n/a n/a
artifact-HasAttachments yes n/a

n/a

n/a n/a n/a n/a n/a
property-<plain text> yes n/a yes n/a n/a n/a n/a n/a
property-<rich text> yes n/a n/a n/a n/a n/a n/a n/a
property-<number> yes n/a yes no no no no no
property-<date> yes n/a yes yes yes yes yes yes
property-<choice> yes Yes n/a n/a n/a n/a n/a n/a
property-<user> yes Yes n/a n/a n/a n/a n/a n/a
property-'Created On' no n/a n/a Yes Yes Yes Yes Yes
property-'Last Edited On' no n/a n/a Yes Yes Yes Yes Yes
property-'Created By' yes

n/a

n/a n/a n/a n/a n/a n/a
property-'Last Edited By' yes

n/a

n/a n/a n/a n/a n/a n/a

Tips and Important Notes

Examples

Retrieve all artifacts that have associated comments:

filter={artifact-HasComments eq (‘true’);}

Retrieve all artifacts of type 'Actor':

filter={artifact-type eq (‘Actor’);}

Retrieve all artifacts of either type 'Actor' or 'Use Case':

filter={artifact-type eq ('Use Case' or 'Actor');}

Retrieve all artifacts of type 'Textual Requirement' that have at least one attachment:

filter={artifact-type eq ('Textual Requirement'); artifact-HasAttachments eq ('true');}

Retrieve all artifacts where the Priority property of the artifact is set to 'High':

filter={property-priority eq ('High');}

Retrieve all artifacts where the Focus Group property of the artifact is equal to a group with an ID of 9 or 10:

filter={property-'Focus Group' eq ('g9' and 'u10')}

Retrieve all artifacts that were last edited between midnight on May 11th and midnight on May 14th inclusive:

filter={property-'Last Edited On' bi ('2013-05-11' and '2013-05-14')}

Retrieve all artifacts that were created after midnight on May 14th:

filter={property-'Created On' gt ('2013-05-14')}