GET /rest/api/3/filter/search

Hi,
I would retrieve all my filters by using GET /rest/api/3/filter/search but I receive as status response : 404 Not found. Then someone can help me please ?

Welcome to the Developer Community, @mtoure!

So far, running a quick test, /rest/api/3/filter/search works fine via CLI, Postman, and browser. The only scenario I can think of that will return a 404 is if you’re targeting a non-existent instance. How are you testing this REST API?

Cheers,
Ian

Thanks @iragudo !

The problem is all my other request work fine. I’am testing this API via Postman by using https://developer.smart-trade.net/jira/rest/api/latest/filter/search . I’am also testing https://developer.smart-trade.net/jira/rest/api/3/filter/search but it doesn’t work.

Your instance url looks like it is not a Jira cloud instance. By any chance are you running on a server deployment and not on cloud? If so, that explains the 404 since that REST API is not available in Jira server REST API.

@iragudo then why my other requests work fine as for example https://developer.smart-trade.net/jira/rest/api/latest/filter and https://developer.smart-trade.net/jira/rest/api/latest/filter/{id}/permission respectively to create filter and add share permission to a filter.

The two REST APIs you mentioned exist in server land as well. Kindly see the links below.

If this is POST then Create filter.

If GET then Get share permissions. If POST then Add share permissions.

Also, can you check the deploymentType by calling https://developer.smart-trade.net/jira/rest/api/latest/serverInfo so that we can verify if you are running on server or cloud?

Thanks.
Ian

@iragudo it’s true am running on jira server as showing here :
{
“baseUrl”: “https://developer.smart-trade.net/jira”,
“version”: “7.13.0”,
“versionNumbers”: [
7,
13,
0
],
“deploymentType”: “Server”,
“buildNumber”: 713000,
“buildDate”: “2018-11-28T00:00:00.000+0000”,
“serverTime”: “2019-05-24T10:02:27.454+0000”,
“scmInfo”: “fbf406879436de2f3fb1cfa09c7fa556fb79615a”,
“serverTitle”: “Smart Trade JIRA”
}

So how can I retrieve all my user’s filters from the jira server, please ?

Thanks,

Thanks for clearing that out. In server, unfortunately, there’s no way via REST API. There’s an existing feature suggestion though (see JRASERVER-69347), you can track the progress from there and vote for it.

Thanks @iragudo it’s a pleasure to discuss with you.

1 Like

Are there plans to implement this REST request on Jira Server\DataCenter?

On one hand - there is a quite old change request, which wasn’t implemented so far:
https://jira.atlassian.com/browse/JRASERVER-36045
On other hand - the support for certain server-related features get stopped by end of February 2024 (so it seems that server itself is “not interesting” anymore and switch to cloud-solution being focused :frowning: ) .

I assume - there will not be way around except iterate over Filters-Manager search-results pages (getting only 20 filter- names/IDs per page) and then for each filter-id make a separated REST API requests to get further details, i.e.:

// Getting Nth page of filters search-result:
https://YOUR_SERVER/secure/ManageFilters.jspa?filterView=search&Search=Search&sortAscending=true&sortColumn=name&pagingOffset=N

// For each filter ID (contained in link to certain filter at the results-page) get more details via REST API:
https://YOUR_SERVER/rest/api/2/filter/YOUR_FILTER_ID