JIRA 8.14 REST API http 405 error

Sergei Voitovich January 19, 2021

Hi here!

Dear members,

i would like to use  jira REST api for  in  my  work.    now i have a problem with /rest/api/2/filter   and cannot  solve it

as example i put curl command in the my  linux console and get the 405 http error

curl -D- -X GET -H "Authorization: Basic U2VyaXRvdmljaDoxcTJ3M0UkUiUx" -H "Content-Type: application/json" "https://xxxxxxxx/rest/api/2/filter"
HTTP/1.1 405
x-arequestid: 1241x21562x1
referrer-policy: strict-origin-when-cross-origin
x-xss-protection: 1; mode=block
x-content-type-options: nosniff
x-frame-options: SAMEORIGIN
content-security-policy: frame-ancestors 'self'
set-cookie: JSESSIONID=0FDC58F03AC35EFD325784386B04D6C4; Path=/; HttpOnly
x-seraph-loginreason: OK
set-cookie: atlassian.xsrf.token=BKZQ-QP4F-SH4L-NMIR_fdca92c072472a8ccc083214240118fd11321d43_lin; Path=/
x-asessionid: 1f1008x
x-ausername: ovich
allow: POST,OPTIONS
content-type: text/html;charset=UTF-8
content-length: 0
date: Tue, 19 Jan 2021 17:41:52 GMT

 

another requests are working fine

curl -D- -X GET -H "Authorization: Basic U2VZvaXRvdmljaDoxcTJ3M0UkUiUx" -H "Content-Type: application/json" "https://xxxxxxxxx/rest/api/2/project"
HTTP/1.1 200
x-arequestid: 1241x21557x1
referrer-policy: strict-origin-when-cross-origin
x-xss-protection: 1; mode=block
x-content-type-options: nosniff
x-frame-options: SAMEORIGIN
content-security-policy: frame-ancestors 'self'
set-cookie: JSESSIONID=A500806BDD396C0FF11B8E373616B098; Path=/; HttpOnly
x-seraph-loginreason: OK
set-cookie: atlassian.xsrf.token=BKZQ-QP4F-SH4L-NMIR_fdd879bed5da2f4b657407fb4b3156a931ce6b26_lin; Path=/
x-asessionid: i1bxh1
x-ausername: ovich
cache-control: no-cache, no-store, no-transform
content-type: application/json;charset=UTF-8
transfer-encoding: chunked
date: Tue, 19 Jan 2021 17:41:46 GMT

[{"expand":"description,lead,url,projectKeys","self":"https://jxxxxxxxx/rest/api/2/project/11700","id":"11700","key":"BIP","name":"BiP","avatarUrls":{"48x48":"https://xxxxxxx/secure/projectavatar?pid=11700&avatarId=13739","24x24":"https://jira.lifetech.by/secure/projectavatar?size=small&pid=11700&avatarId=137..................

 

--------------------

by  tutorial   i see  ---->

GET /rest/api/2/filter

Returns all filters. Deprecated, use Search for filters that supports search and pagination.

This operation can be accessed anonymously.

Permissions required: None, however, only the following filters are returned:

  • filters owned by the user.
  • filters shared with a group that the user is a member of.
  • filters shared with a private project that the user has Browse projects project permission for.
  • filters shared with a public project.
  • filters shared with the public.
  • --------

 i  have no idea to  fix  my problem

could you please help me with it, thank you 

1 answer

0 votes
Radek Dostál
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 19, 2021

Hi,

 

You've essentially answered your own question - the GET method of /rest/api/2/filter has been deprecated and does no longer exist on your version. (So getting a 405 Method not allowed would indicate it will not work with GET, but rather may accept POST.)

 

Now the Search for filters link you mention is for Cloud. I get 404 for that endpoint filter/search endpoint on Server so I would only assume it does not exist in Server.

 

Looking in the latest Server REST API doc, I do not see any such endpoint either: https://docs.atlassian.com/software/jira/docs/api/REST/8.14.1/

 

Chances are that this has just never been implemented for Server.

 

It depends what your aim is by using this, maybe there could be a different approach to get that.

 

Regards,

Radek

Sergei Voitovich January 19, 2021

thanks! 

Suggest an answer

Log in or Sign up to answer