Create the Word template

You can create the Word template with the embedded XML model in one go by using the GET action of the Reports API.

Tip: Before you start, make sure the OData queries are valid and the OData URI is accessible.

To create the Word template

  • Open the WorkZone Reports API in a 3rd party Web debugger tool.
  • Use the GET action of the Reports API and specify the URI of the Report JSON file that is to be used for the custom report as a parameter to the GET action. If the Word document template which name is specified in the FileName parameter of the Report JSON is located in the same folder, then WorkZone PDF injects the XML model into the template and returns it to the user. Otherwise a blank template is created.

If the Word document template specified in the Report JSON already exists in the same location as the Report JSON file, the XML model of the Word document template will be updated with the new XML model created by the Report JSON.

After the report template has been created, you can modify the Word document template to conform to whatever requirements you have for the report the Word template is to produce by placing content controls and ordinary text in the template.

Additional options

View the OData queries

You can view the OData queries used to generate the XML model in the Report JSON by using the Text/Plain parameter in the Accept header while making requests to the Reports API.

View the XML Model

You can view the XML model which is generated by the Report JSON by setting the Accept header to Application/XML value while making requests to the Reports API.