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
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 Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,826 views 12 18
Join discussion

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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot