Something has changed in the past day or so. When GET-ing a ticket from the Jira API, JSON is returned which contains "self" property that should point to a valid API URL for the ticket. The commonly used Jira Python library (and probably others) uses this URL to access/update the ticket. It trusts that the "self" URL is correct.
The API is returning a self URL like:
https://api.atlassian.com/rest/api/3/issue/123456
Which does not include the context path, it should be something like:
https://api.atlassian.com/ex/jira/aaaaaa-aaaaaa-aaaaaa-aaaaaa/rest/api/3/issue/123456
Hello @Matt S
I cannot replicate that. When I make a query to the v3 Get Issue endpoint, for a Jira Cloud instance, it returns the same self object that it always has, which is a URL to the issue in the domain:
"self": "https://<domain_name>.atlassian.net/rest/api/3/issue/<issue_id>"
exactly as per the documentation for that endpoint.
Hi David,
Using just curl on the command line, I've made a GET request to:
https://api.atlassian.com/ex/jira/04cae52b-048b-4f23-aebe-54cd1a912c80/rest/api/3/issue/45067/
And the self URL returned is:
https://api.atlassian.com/rest/api/3/issue/45067/45067
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Matt S
You didn't say which authentication method you are using. Querying against https://api.atlassian.com is only for OAuth 2.0 sessions. If using Basic auth, you just query against the URL for your cloud domain at https://<domain_name>.atlassian.net
Assuming you're talking about using OAuth2.0, I just did a test request using Postman via an OAuth 2.0 session to the same Get Issue endpoint as you've described:
As you can see, I get back a top level self object with a URL that doesn't contain the CloudID. However, you can see that other self objects in the response such as fields>issueType>self do contain the CloudID in the URL.
When I test a few other GET endpoints, such as Get Project, I get a response that contains a top level self object that does contain the CloudID in the URL:
So, the top level self objects in the responses definitely are not consistent!
Personally, I don't have logs of prior OAuth calls to the Get Issue endpoint to know whether or not the top level self object in the response previously did return the CloudID in the URL compared to now, so I can't comment any further.
I suggest that if you're 100% sure the Get Issue response has recently changed and the top level self path is now invalid, then you open a support request with Atlassian.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
PS. @Matt S
Someone else has reported a fault in this Developer forum thread where the self object suddenly changed for another API endpoint and is now being incorrectly returned.
Seems someone or something is making small changes to the REST API responses that are causing problems.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.