Some advanced user may need from time to time to extract data from their Docxpresso instance databases in order to further process this data or simply to store it in their own data storage platforms.

In order to simplify this process Docxpresso offers both predefined services, that will be enumerated below, as well as custom services that may be directly created from the Docxpresso backoffice interface (of course, all these services are properly securized by HMAC to avoid unauthorized access).

In both cases the Docxpresso response is provided in (padded) JSON format in order to simplify its parsing, proccessing and storing.

In order to simplify the usage of the predefined services Docxpresso offers an SDK written in PHP that allows, with just a couple of line of code, to retrieve the required data. These predefined services include the retrieval of:

  • template categories,

  • documents by cateory,

  • full template repository tree structure,

  • documents and associated data (single template and bulk),

  • usage statistics,

  • and user list

among others as well as the possibility to make remote calls to the Docxpresso end user interface from remote web servers allowing the full integration of Docxpresso with a thir party web app.

Although these predefined services aim to cover all standard needs it may well happen that there is the need to retrive data in a way not previously foreseen by our UX engineers and developers so Docxpresso offer the possibility to define your own custom services.

There are two ways to do so:

  • By constructing directly a SQL query that will be run on your Docxpresso instance or

  • By building a query to the database from a JSON with all the required data:

    • Table to be queried

    • Query filters

    • Sorting criteria

    • Maximum number of results

For example in order to retrieve all templates that incude in its description a given Word one just needs to create a custom RESTService named, for example, “documentsByDescription” with the following JSON:

{

"resource" : "templates",

"select": ["id","name"],

"where" : [

{"field" : "description", "operand" : "LIKE"}

],

"orderBy" : {"field" : "created", "type" : "ASC"}

}

And call the following URL (where we ommit the HMAC security params):

https://[path to your docxpresso instance]/RESTservices/custom/documentsByDescription?description=%search%

where you shoud use the path to your Docxpresso instance and replace the search term by the one you want ato actually search for.