Searching for keyword via REST API

General discussion of Mantis.

Moderators: Developer, Contributor

Post Reply
hjk321
Posts: 1
Joined: 17 Mar 2025, 15:58

Searching for keyword via REST API

Post by hjk321 »

I've built a simple program that integrates our MantisBT instance with a communication platform our team uses. I have a search function that is meant to return a list of up to 10 issues that match the keywords. This is possible from within the website, but seemingly not within the REST API.

My current workaround was to do this

Code: Select all

/api/rest/issues?page=1&page_size=1000
Which is basically just to request a lot of data and do the search myself. However you can probably tell this is not a great solution. I really want to be able to do the search server-side, which I know it's capable with using the filter system.

The closest existing API call appears to be

Code: Select all

/api/rest/issues?filter_id=1&page_size=10&page=1&project_id=1
But the problem is that it only takes existing filters, I can't define my own on the fly with the user's search query. Every api call is either GET or DELETE, so it seems creating filters is impossible.

Has anyone had success implementing this? This seems like a really basic usecase to be missing from the API like this.
dregad
Developer
Posts: 94
Joined: 26 Jul 2010, 14:24

Re: Searching for keyword via REST API

Post by dregad »

We currently lack the ability to both So at the moment I'm afraid there is no way to achieve what you want.

Contributions via pull requests are welcome.
Post Reply