Filtering
All API GET requests support OData options for filtering, ordering, getting top N items and skipping top M items. All the options can be combined.
Filter
To filter a list of items a parameter $filter must be supplied in the request.
Simple filter
/workitems?$filter=name eq 'Story'
/workitems?$filter=name eq 'Story' and Status eq 'Not Done'
Filter using a function
/workitems?$filter=startswith(Name, 'API')
/workitems?$filter=endswith(Name, 'API')
/workitems?$filter=substringof('API', Name)
Find items created at a specific date
/workitems?$filter=createdAt eq DateTime'2013-10-10'
Read more about OData filtering options.
Order By
To order a list of items a parameter $orderby must be supplied in the request
Example
/workitems?$orderby=createdAt asc
/workitems?$orderby=createdAt desc
/workitems?$orderby=name asc,createdAt desc
Top and Skip
To get the top N items a parameter $top must be supplied in the request. The following example will return the top 20 items from the whole list of items.
Example
/workitems?$top=20
To skip the top N items a parameter $skip must be supplied in the request. The following example will skip the top 10 items.
Example
/workitems?$skip=20
Top and skip parameters can be used to implement custom paging.