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 votes
Accepted answer
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
Community showcase
Published Nov 27, 2018 in Portfolio for Jira

Introducing a new planning experience in Portfolio for Jira (Server/DC)

In the past, Portfolio for Jira required a high degree of detail–foresight that was unrealistic for many businesses to   have–in   order to produce a reliable long-term roadmap. We're tur...

2,316 views 12 19
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