Jira Cloud trial version REST API issue

maxtazov February 6, 2020

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!

 

 

 

1 answer

0 votes
Earl McCutcheon
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 7, 2020

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

Suggest an answer

Log in or Sign up to answer