Are you in the loop? Keep up with the latest by making sure you're subscribed to Community Announcements. Just click Watch and select Articles.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

JIRA Java API vs Rest API

I'm writing an app for internal use that needs to collect data from a Jira Server. Basically, it will crawl the Jira server, starting with Projects and recursing down into Issues looking for specific bits of data.

Everything I've read seems to indicate that the REST API is best suited for this. In fact, everything I've read about the Java API seems to indicate that it's intended for writing plugins for JIRA, intended to be installed on the server.

The one thing that bothers me, though, is that the architecture diagram for the Java API here: https://developer.atlassian.com/server/jira/platform/integrating-with-jira-server/ has a "Common Component" labelled "REST". Is there a way to use that common component in my Java projects? I'm about to go down a path of creating a bunch of Jackson annotated objects so that I can Java-fy the REST API. I would love to avoid doing that work if it's already been done.

Thanks,

Ed

1 answer

Suggest an answer

Log in or Sign up to answer
0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Jun 22, 2020

Correct, the Java API is internal, your code that uses that would be running inside a server.

REST is the external interface. It is provided by internal code though, so there's some commonality there.

Okay, so that's a "No" answer to my question? ie: ' [...] has a "Common Component" labelled "REST". Is there a way to use that common component in my Java projects?'

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Jun 30, 2020

Yes, you can use that common component if your projects are running in a context that draws in the Jira libraries that provide it.

But I think what you're looking for is the flat "no".  Common component in the docs you're reading means "common within the context of the Jira application".  So if you're not coding within Jira (and you've said you are not), then they're no use to you.

Hi

Is it a correct assumption that the Rest API is wider than Java API? I have my Jira plugin and there is some functionality that is only available via Rest. For example I don’t find a way to list all the Agile sprints for a project via Java API while it exists in the Rest

 

Ed

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Jul 05, 2020

Absolutely not.  The Java api can do anything in Jira that isn't prevented by the structure of the data.  The REST api is a limited set of calls that have been made available by Atlassian coding for them to be exposed.

TAGS
AUG Leaders

Atlassian Community Events