Overview:
Once logged on, you can get a list of filters available to the current user. FogBugz has three kinds of filters.
- Built-in filters are always present, and include “My Cases” and sometimes the main Inbox if FogBugz is used to read mail.
- Users can save their own private filters.
- Administrators can share filters which will be available to all users.
Audience:
Customer Facing Information.
Step-By-Step Guide:
- To list the filters, send cmd=listFilters For example:
http://www.example.com/api.asp?cmd=listFilters&token=24dsg34lok43un23
The result:
<response>
<filters>
<filter type="builtin" sFilter="ez349">My Cases</filter>
<filter type="saved" sFilter="304">Cases I should have closed months ago</filter>
<filter type="shared" sFilter="98" status="current">Customer Service Top 10</filter>
</filters>
</response>
- To change the current filter (pass in the sFilter attribute from the listFilters cmd): cmd=setCurrentFilter&sFilter=402.
The result is purposefully empty.
<response></response>
Notes: type is “builtin”, “saved”, or “shared”. FogBugz users will probably expect to see the three types of filters grouped as they are in FogBugz itself. The list of filters is already in the same order that users are used to seeing it in the FogBugz user interface and should be preserved.
sFilter is an opaque string that can be passed back to cmd=setCurrentFilter. The meaning is internal to FogBugz.
Zero or one of the filters may have the status=”current” attribute indicating that this is the user’s current filter. (If none of these filters has status=”current”, the user is probably looking at an ad-hoc filter which hasn’t been saved.) Currently the built-in filters won’t be listed as “current” even if you are currently looking at one.
See also the full XML API documentation.