Description of the JSON export format of the GET Export Report API.
The json
format
returns a JSON array of arrays which are the denormalized values of the requested base table columns
joined to any descendant relationship columns.
See the jsontree
export format for a normalized return of JSON objects.
Format Parameter:
json
Response Content-Type:
application/json
Status Code:
200
JSON responses without error have this structure:
{ // meta: contains meta information about the results. "meta":{ // filters: (Optional) contains information about the filters applied to this // result set if applicable. "filters": [ {"source":string // String representation of the original filter parameter. ,"readable":string // Contains the readable filter String with Table and Column // DisplayName's substituted for id's. },... ] // subqueries: Array of subqueries applied to this export result. // Only non-empty if a <subquery>'s parent <table> is included // within the export result and the <subquery> has a description. "subqueries": [ {"tablePath":string // The table resource path to the <subquery> ,"displayName":string // The displayName of the <subquery> parent <table> ,"description":string },... ] // columns: meta information about the columns of the result set. The order // of child objects matches the order of array elements in each // "data" array. ,"columns": [ {"id":string // The id of the <column> ,"displayName":string // The displayName of the <column> ,"tablePath":string // The table resource path to the <column> } ... ] // sorts: Array of column sorts applied to this export result. Else the empty Array. ,"sorts":[{ "tablePath":string ,"columnId":string ,"direction":string ,"source":string // the value of the "sort" term. },...] // The total number of results to be returned based on the filter and columns // parameters. This can differ from the length of the data array // if the limit and offset parameters are specified. ,"totalCount":integer } // data: array of arrays representing the results // All values are coerced to a JavaScript type appropriate for their database type // (i.e. String, date, number). <column>s with a <url_template> are represented via // a JavaScript Object with attributes "url" and "value" ,"data": [ [value1, value2, {"url":string,"value":string},...] ,... ] }
{ "meta": { "filters":[ { "source":"/student@fname like 'J%'" ,"readable":"'Student', 'First Name' like 'J%'" } ,{ "source":"/student@lname = 'Hernadez'" ,"readable":"'Student', 'Last Name' = 'Hernandez'" } ] ,"columns":[ { "id":"id" ,"displayName":"Student ID" ,"tablePath":"/student" } ,{ "id":"fname" ,"displayName":"First Name" ,"tablePath":"/student" } ,{ "id":"lname" ,"displayName":"Last Name" ,"tablePath":"/student" } ] ,"totalCount":2 } ,"data":[ [ 177 ,"Joe" ,{"url":"/some/url/177","value":"Hernandez"} ] ,[ 213 ,"Julia" ,{"url":"/some/url/213","value":"Hernandez"} ] ] }
Status Code:
400
and 500
JSON responses with error have this structure:
{ // messages: array of message Strings. "messages":[ ... ] }
{ "messages":[ "The filter \"/student@id & 173\" does not match filter grammar. The \"Operator\" definition is missing or unparseable." ] }