Schema for REST API?

I am wondering if is there any schema for the REST API (json)? Or any detailed documentation on the fields?

When fetching data for an issue, I can see fields with a primitive type value, or fields with an object value. How is it decided if a field has a primitive value or an object value? Is this project specific or globally the same?

For example summary has a primitive type, while type has not. Is this global? Can we trust that it is the same on every Jira server?

 

1 answer

1 accepted

0 vote
Warren Levy Community Champion Aug 25, 2017

To answer your later questions first, the type is not project specific and it is global i.e. what you get on one server / instance will be the same as any other.

As to your first question, I have seen a schema of sorts, but can't remember where it is. Your easiest way is to run a query (but limit it to 1 issue i.e. pass in a parameter of jql=key=XXX-123) and don't specify which fields to return. View the returned json in a json formatter and you can then build up a list of what types there are and how to reference them

Thanks for the reply!

My problem with the trial and error kind of schema is that I have seen the same type name with a primitive type for one issue and with an object value for another issue. This got me actually on the hunt for the schema, because now I am unsure what I can expect :S

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Thursday in Jira

5 ways you can make the most of Jira Software and Bitbucket Cloud

As part of the Bitbucket product team I'm always interested in better understanding what kind of impact the use of our tools have on the way you work. In a recent study we conducted of software devel...

64 views 0 5
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you