Schema for REST API?

Endre Szalai August 25, 2017

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
Answer accepted
Warren
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 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

Endre Szalai August 25, 2017

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