Fooling around with fixx 1.9 api
As the release of fixx 1.9 is drawing closer, I thought I’d jot down my thoughts about the new filtering capabilities of changes made to the api and some pointers on how you can leverage it using filters.
Fixx 1.9 has seen a revamp of a lot of the UI, a general polish that tidies up a lot of loose ends left from 1.8.* that we’ve been keen to get in for some time now. I’m loving the UI tweaks and have had a lot to do with some of these improvements but the big thing thats been getting me all excited is the inclusion of filters in the API.
As of 1.9 it is now possible to request issues using filters, something that, for the past few month has caused a headache for me and my work on a set of tools to accompany fixx notibly a time tracking tool and a PM tool to aid issue and release management.
So what can the new filters in 1.9 do that they couldn’t in 1.8.*?
Well for a start, in order to get all issues for a project the usual route would have been
<yourfixxdomain>/api/projects/<projectid>/issues
which was ok but didnt filter those issues. If you had a thousand closed issues for this project you’d have a thousand issues returned, something I felt was always a little anal!
Another example, getting issues assigned to a user
<yourfixxdomain>/api/users/<userid>/issues
again, does the job but still returns ALL issues assigned to that user.
So what makes the new filtering functionality cool for 1.9?
well, the two queries above can now be represented as follows:
<yourfixxdomain>/api/issues?qProjectId=<projectid>
and
<yourfixxdomain>/api/issues?qAssignedTo=<userid>
and of course they can be combined to form
<yourfixxdomain>/api/issues?qAssignedTo=<userid>&ProjectId=<projectid>
Another good example is my PM tool that runs comparisons against changes to issues. before filtering I had to pull back ALL issues from fixx every time i ran a comparison which became both a memory and processing hog. Now i can break down my requests into chunks based on project, area, user and resolution as follows
<yourfixxdomain>/api/issues?qAssignedTo=<userid>&qProject=<projectid>&qResolution=<resid>&qArea=<areaid>
With multiple threads making small requests, my PM tool now runs smoother and feels like its more responsive almost providing a live feed of changes made to fixx.
One final thing… …for those who have already tinkered with the filtering, you probably have a good idea of how to construct a filter using the querystring parameters.. ..for those who havent tinkered, heres a quick list of the filter parameters you can use:
- qPriority=<priorityid>
- qCreatedBy = <userid>
- qAssignedTo = <userid>
- qStatus = Open | Closed | Resolved | All
- qResolvedBy = <userid>
- qAssignedTo = <userid>
- qProject = <projectid>
Note : The following query parameters are reliant on a valid project id. If you pass in a project id and one of the types below is not within the project specified theres a good chance you’ll get no results returned
- qType = <typeid>
- qFixFor = <versionid>
- qAffected = <versionid>
- qResolution = <resolutionid>
OK.. ..thats about it. I’m going to spend some time tinkering with this and possibly provide some tutorials on how to optimise your’e filter requests and some good practices for using filters. When I get some more time I’ll also start to publish information about my companion tools.
