HTTP 406 status code from /rest/api/3/resolution/search

It seems like /rest/api/3/resolution/ stopped working - it’s returning a HTTP 406 for me now after working for years. I found it was deprecated (but not removed?)

I tried using the newer API, /rest/api/3/resolution/search. It doesn’t work, also returns a 406.

Same here, this is a killer for us, preventing our services to work, so any way to resolve this would be greatly appreciated…

Welcome to the Atlassian developer community @steph, sorry that it’s under troubling circumstances.

@Mattlassian and @steph, I was able to hit both endpoints with no errors using curl and my API token. Can you say more about the HTTP request you are making? What’s the auth mechanism? And what headers are you sending? From the 406 Not Acceptable error response you both reported, I think you might be missing the Accept request header (or have an unrecognized value).

For reference, yes, getting resolutions via GET /rest/api/3/resolution was deprecated (but not yet removed) in Oct 2022 by CHANGE-767.

I’m using https://github.com/pycontribs/jira to interact with the API.

It turns out that the library has a typo in the “Accept” header but the Jira API never minded the typo until last week. The typo is here.

The “Accept” header is application/json,*.*;q=0.9 but should be application/json,*/*;q=0.9

@Mattlassian,

Glad you were able to track down the header bug. I had to stare at the difference for a while before I understood the . should be a /. I wonder if @steph is in the same boat. As you may (or may not) know, that contrib is not maintained by Atlassian so I hope you have reported the issue or contributed a PR on GitHub so future folks won’t suffer the same.

1 Like

Just found a new issue for it: Client incorrectly sends *.* for Accept header, instead of */* · Issue #1774 · pycontribs/jira · GitHub

1 Like

Hello, yes we created the issue for the Jira Python api.
For now we have this in our app when we create a Jira session, seems to do the trick and works for all endpoints.

jira = jira.JIRA(
    "https://some.jira.url",
    basic_auth=("user", "pass"),
    options={
        "headers": {
            "Accept": "application/json;q=1.0, */*;q=0.9"
        }
    }
)
resolutions = jira.resolutions()
1 Like

from today all create use python lib are failed, I use temp fix and success now. thanks @steph