Cloud API using "latest" wrong behavior

Mahmoud Mohammad El-Aziz May 13, 2019

For example: on add comment API :

Logically using latest should automatically use the latest API available which is 3 right?? or there is something I am missing here??

And thanks in advance.

 

1 answer

1 accepted

2 votes
Answer accepted
Stephen Sifers
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 22, 2019

Hello Mahmoud,

Thank you for reporting and finding this issue.

I took your findings and tested them again a cloud instance of Jira. I sound I was able to use API v2, v3 and Latest without issue. With this said, this may still be an issue (as the v3 API is still Beta) and there may be something within your call that is causing this error. Could you please send over the entire call you’re making against the endpoint along with the JSON payload you’re wanting to send. With this, we will attempt to retest and hopefully recreate the issue you’re seeing.

More on the v3 beta:

Note that version 3 of the Jira Cloud platform REST API is in beta. All the endpoints from the version 2 API are available, however they are under development and may change. The main change from version 2 is the introduction of the Atlassian Document Format for a number of resources (for example, issue, comment, worklog).

Source documentation: https://developer.atlassian.com/cloud/jira/platform/rest/v3/

We look forward to hearing back to help find where the issue is.

Regards,
Stephen Sifers

Mahmoud Mohammad El-Aziz May 23, 2019

Hi @Stephen Sifers,

Thanks for your response.

I am using OAuth 2.0 to authenticate as I said v2 and v3 both are working fine but the latest returning the following "OAuth 2.0 is not enabled for this method."  

using latest should refer to v3 of the API, is it right?

Best Regards.

Mahmoud Mohammad El-Aziz May 23, 2019

Hi @Stephen Sifers,

And here is my request:

URL: https://api.atlassian.com/ex/jira/xxx/rest/api/latest/issue/SDP-4/comment

Headers: 

  • Content-Type:application/json
  • Accept:application/json
  • Authorization: Bearer token.

Params:

{
"body": {
"type": "doc",
"version": 1,
"content": [{
"type": "paragraph",
"content": [{
"text": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque eget venenatis elit. Duis eu justo eget augue iaculis fermentum. Sed semper quam laoreet nisi egestas at posuere augue semper.",
"type": "text"
}]
}]
},
}

            

Stephen Sifers
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 23, 2019

Hello again Mahmoud,

Thank you for providing your response with the JSON payload you’re sending. I did found that the latest API is pointing to the current v2 API, this is due to the v3 API still being Beta and not fully released or the latest stable version available.

With this aside, your error is reporting that the latest API is refusing to honor OAuth authentication, and this looks to be a defect in the product. I would ask for an output error you’re seeing on your end. Once we have this I will open a bug request on your behalf for this.

Thanks for finding this issue and taking the time to report it!

Regards,
Stephen Sifers

Mahmoud Mohammad El-Aziz May 24, 2019

Hi @Stephen Sifers

Thanks so much for clearing things for me and I appreciate you creating the ticket on my behalf.

and here is my response :

{
"errorMessages": [
"OAuth 2.0 is not enabled for this method."
]
}

Best Regards. 

Stephen Sifers
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 24, 2019

Hello again,

We have created your bug request here: JRACLOUD-72126. You are set as the reporter so any updates will be sent to you.

Thanks again for reporting this issue and working with us to verify the problem.

Regards,
Stephen Sifers

Suggest an answer

Log in or Sign up to answer