REST api GET issues with custom_field of 'keyword' = 'value'

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
lroder
Posts: 1
Joined: 27 Feb 2020, 13:24

REST api GET issues with custom_field of 'keyword' = 'value'

Post by lroder »

I would like to use the REST API to retrieve all issues created by a given user that contain a specific value in a custom field. I have examined the database and can see a way to create a fairly straightforward query that could be used to construct the response data -- something like:

SELECT b.summary, b.date_submitted, cf.name, cfs.value FROM mantis_bug_mantis AS b
LEFT JOIN mantis_custom_field_string_mantis AS cfs
ON cfs.bug_id = b.id
LEFT JOIN mantis_custom_field_mantis AS cf
ON cf.id = cfs.field_id
WHERE cfs.value = 'the_value_I_am_filtering_on'

but it does not appear possible to generate a GET request to retrieve that set of issues.

I was hoping for something like:
https://tracker.eputt.net/api/rest/issu ... tring=yyyy

Any recommendations as to how I might be able to achieve this using the REST API?

I suppose we could extend the API, but I'd really rather not customize it since that would create issues for us should we wish to upgrade in the future.

An alternate solution is to create some sort of 'middle man' on the back end that receives a request from our front end code, hits the REST API to retrieve all issues created by the user in question, strips out all issues that do not contain the custom field value we are looking for, and returns the matching subset -- less than ideal, particularly as we scale....

Thanks!
Post Reply