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

This widget could not be displayed.
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
Posted yesterday in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

76 views 0 1
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