Any data in the database can be easily queried and the result returned in JSON format.
These requests will use HTTP GET and can easily be tested from within the browser by entering the command into the URL.
...where xpath is replaced with the XPath of the area in the database to query.
If a session has not been established, you should also specify USERNAME and PASSWORD parameters in the URL, both in capital letters, to specify the login name and the base64-encoded password, respectively.
Figure 90: Example of a JSON query
There are also additional parameters that can be specified in the URL, which are described below:
This parameter allows you to map field names. The oldfield refers to the field name returned from the server, and newfield refers to the field name you wish to see in the result. Any number of these can be supplied, comma separated.
This parameter allows you to specify which fields you wish to be returned. This can reduce network bandwidth and server performance, especially when requesting a lot of data. If this parameter is omitted all fields are requested.
This parameter tells the application to include child records and link fields as URL values in the returned data, in accordance with standard REST format.
You can also specify the parameter page and pagesize to retrieve specific rows / offsets. So if you just want the top 10, just put pagesize=10 and page=1.
For sorting you can specify a sort parameter, which is a comma separated list of fields to sort by. It uses ascending order by default, but you can prefix the field name with a minus sign to use reverse sorting.
Next Topic: Inserting Records
Up Since 3/4/2019 12:42:03 PM