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.
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:
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events