atlassian-python-api icon indicating copy to clipboard operation
atlassian-python-api copied to clipboard

[Jira Cloud] Get all projects methods rely on a deprecated endpoint

Open marinone94 opened this issue 2 years ago • 5 comments

Jira Cloud "Get all projects" methods are based on a deprecated endpoint (GET /rest/api/2/project).

Therefore, for Jira Cloud "Get all projects" methods, an endpoint migration is required. I could work on it, but I would like feedback from the maintainers first.

marinone94 avatar Oct 24 '23 03:10 marinone94

@marinone94 sure, please do it. I appreciate for your help!

only one thing for on-prem Jira DC and dying Server, we need to have /rest/api/2/project.

could you think about that please

gonchik avatar Oct 24 '23 07:10 gonchik

Sure, I will consider that.

marinone94 avatar Oct 24 '23 10:10 marinone94

@gonchik I see in CONTRIBUTING.rst that Jira Cloud is supposedly built on v3: https://developer.atlassian.com/cloud/jira/platform/rest/v3/

However, in the whole jira.py method v3 is never mentioned in any docstring, nor does it seem the methods follow it. Should I add in the CONTRIBUTING file which parts use v3 and which don't?

Also, how would you like to handle when people use v2 when they are supposed to use v3? For example, when you fetch the project with the deprecated endpoint, you will get an empty response and not an error from the API. I suggest raising an Exception in the client. Do you agree?

marinone94 avatar Oct 25 '23 19:10 marinone94

Edit: there is a not-deprecated way in v2. I used that instead in the PR

marinone94 avatar Oct 26 '23 13:10 marinone94

Hi @marinone94 , I am not a Python expert, but I found that the code in this PR is not working as expected for large project lists... would you mind taking a look at my issue? https://github.com/atlassian-api/atlassian-python-api/issues/1310

Thanks!

ebaschiera avatar Jan 22 '24 16:01 ebaschiera