Description of the XML export format of the GET Export Report API.
The xml
format writes XML to the HTTP response body.
Format Parameter:
xml
Response Content-Type:
application/xml
Response Content-Disposition:
The Content-Disposition
HTTP header is set to the value of the
<report>
name
attribute with the underscore character (_
)
substituted for any space, comma, or semicolon character plus the .xml
extension.
Status Code:
200
XML responses without error have this DTD structure:
<!ELEMENT results (meta,data)> <!-- meta: contains meta information about the results. --> <!ELEMENT meta (filters?,subqueries?,sorts?,columns,totalCount)> <!-- data: contains zero or more rows of data --> <!ELEMENT data (row*)> <!-- filters: (Optional) contains information about the filters applied to this export result if applicable. --> <!ELEMENT filters (filter+)> <!-- filter: Contains information about one filter applied to this export result. --> <!ELEMENT filter (source,readable)> <!-- source: String representation of the original filter or sort parameter. --> <!ELEMENT source (#PCDATA)> <!-- readable: Contains the readable filter String with Table and Column DisplayName's substituted for id's. --> <!ELEMENT readable (#PCDATA)> <!-- subqueries: (Optional) contains information about the subqueries applied to this export result. Only present if a <subquery>'s parent <table> is included within the export result and the <subquery> has a description. --> <!ELEMENT subqueries (subquery+)> <!-- subquery: meta information about subquery used to fill the export result --> <!ELEMENT subquery (tablePath,displayName,description)> <!-- sorts: (Optional) contains information about the sorts applied to this export result if applicable. --> <!ELEMENT sorts (sort+)> <!-- sort: Contains information about one sort term applied to this export result. --> <!ELEMENT sort (tablePath,columnId,source)> <!ATTLIST sort direction (asc|desc) #REQUIRED> <!-- columns: meta information about the columns of the export result. The order of child <column> elements matches the order of <v> elements in each <data> <row>. --> <!ELEMENT columns (column+)> <!-- column: meta information about one the columns of the export result. --> <!ELEMENT column (id,displayName,tablePath)> <!-- id: The id of the column --> <!ELEMENT id (#PCDATA)> <!-- tablePath: The table resource path --> <!ELEMENT tablePath (#PCDATA)> <!-- columnId: The column id --> <!ELEMENT columnId (#PCDATA)> <!-- displayName: The displayName of the column or table --> <!ELEMENT displayName (#PCDATA)> <!-- description: descriptive text --> <!ELEMENT description (#PCDATA)> <!-- totalCount: 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. --> <!ELEMENT totalCount (#PCDATA)> <!-- row: One row of results --> <!ELEMENT row (v+)> <!-- v: One "cell" of results. "v" means "value" --> <!ELEMENT v (#PCDATA)> <!-- attribute v:url: The url of the value as configured by the <column>'s <url_template> --> <!ATTLIST v url CDATA #IMPLIED>
<?xml version="1.0" encoding="UTF-8"?> <results> <meta> <filters> <filter> <source>/student@fname like 'J%'</source> <readable>'Student', 'First Name' like 'J%'</readable> </filter> <filter> <source>/student@lname = 'Hernadez'</source> <readable>'Student', 'Last Name' = 'Hernandez'</readable> </filter> </filters> <sorts> <sort direction="asc"> <tablePath>/student</tablePath> <columnId>lname</columnId> <source>/student@lname asc</source> </sort> <sort direction="asc"> <tablePath>/student</tablePath> <columnId>fname</columnId> <source>/student@fname asc</source> </sort> </sorts> <columns> <column> <id>id</id> <displayName>Student ID</displayName> <tablePath>/student</tablePath> </column> <column> <id>fname</id> <displayName>First Name</displayName> <tablePath>/student</tablePath> </column> <column> <id>lname</id> <displayName>Last Name</displayName> <tablePath>/student</tablePath> </column> </columns> <totalCount>2</totalCount> </meta> <data> <row> <v>177</v> <v>Joe</v> <v url="/some/url/177">Hernandez</v> </row> <row> <v>213</v> <v>Julia</v> <v url="/some/url/213">Hernandez</v> </row> </data> </results>
Status Code:
400
and 500
XML responses with error have this DTD structure:
<!DOCTYPE messages [ <!-- messages: The set of error messages --> <!ELEMENT messages (message+)> <!-- message: one error message --> <!ELEMENT message (#PCDATA)> ]>
<?xml version="1.0" encoding="UTF-8"?>
<messages>
<message>The filter "/student@id & 173" does not match filter grammar. The "Operator" definition is missing or unparseable.</message>
</messages>