Hi,
I'm using Jira cloud trial version, Jira client library https://mvnrepository.com/artifact/com.atlassian.jira/jira-rest-java-client-api?repo=atlassian-public.
I generated token in my Jira cloud and authenticated successfully with java JiraRestClient:
JiraRestClient restClient = factory.createWithBasicHttpAuthentication("https://myname.atlassian.net", "username", generated_token);
ProjectRestClient projectClient = restClient.getProjectClient();
Promise<Iterable<BasicProject>> projectsResult = projectClient.getAllProjects();
Iterable<BasicProject> projects = projectsResult.claim();
I got empty list of the projects, but I created them and added my user to this projects. Also I added to my user all permissions.
The same code works fine on the server non trial version of Jira.
What I did wrong?
Thanks in advance!
Hi @maxtazov ,
On Jira Cloud, the old endpoint to get the list of projects was deprecated. Check out the Jira Cloud API documentation at "GET /rest/api/3/project" for details on the endpoint deprication.
As noted:
Deprecated, use Get projects paginated that supports search and pagination.
So you will want to look at the new endpoint that has extended search pagination capabilities here:
Regards,
Earl
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.