Description of the HTML export format of the GET Export Report API.
The html
format writes a complete HTML document to the
HTTP response body. This format extends the
HTML Table format
and decorates the result <table>
with
HTML <body>
and <html>
tags to
make the result valid HTML.
Additionally, the HTML Format titles the HTML with the <report>
name
and includes CSS style and
<div>
elements for basic formatting.
Format Parameter:
html
Response Content-Type:
text/html
Status Code:
200
HTML format responses without error are valid HTML5 documents.
The HTML result <table>
is identical to that returned
by the HTML Table format
except the addition of a style class
attribute.
The exact format of the document may vary slightly between Pull Reports™ releases,
but a reference example is provided below.
<!DOCTYPE html> <html> <head> <title>Student Report</title> <link rel='stylesheet' href='/mycontext/assets/pullreports.min.css'></link> </head> <body> <div class="container-fluid"> <h1>Student Report</h1> <table class="table table-striped table-bordered"> <caption> <aside>From 1 to 2 of 2</aside> <h5 class="filters-title">Filters</h5> <ul> <li>Table: <em>Student</em>, Column: <em>First Name</em> like 'J%'</li> <li>Table: <em>Student</em>, Column: <em>Last Name</em> = 'Hernandez'</li> </ul> <h5 class='subqueries-title'>Subqueries</h5> <ul> <li>Table: <em>Student</em>: Rows are restricted to those students within your school.</li> </ul> </caption> <thead> <tr> <th data-tablepath="/student" colspan="3">Student</th> </tr> <tr> <th data-tablePath="/student" data-columnId="id">Student ID</th> <th data-tablePath="/student" data-columnId="fname">First Name</th> <th data-tablePath="/student" data-columnId="lname">Last Name</th> </tr> </thead> <tbody> <tr> <td>177</td> <td>Joe</td> <td><a href="/some/url/177">Hernadez</a></td> </tr> <tr> <td>213</td> <td>Julia</td> <td><a href="/some/url/213">Hernadez</a></td> </tr> </tbody> </table> </div> </body> </html>
Status Code:
400
and 500
HTML format responses with error have the same structure as Error responses from the HTML Table format with the addition of valid HTML decoration.
<!DOCTYPE html> <html> <head> <link rel='stylesheet' href='/[context]/assets/pullreports.min.css'></link> </head> <body> <ul class="error"> <li>The filter "/student@id & 173" does not match filter grammar. The "Operator" definition is missing or unparseable.</li> </ul> </body> </html>
See the administration chapter for information on how to decorate the exported HTML with additional HTML elements such as a custom header and footer.