Querying Data

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.

http://servername/apiget.aspx?path=xpath&format=json

...where xpath is replaced with the XPath of the area in the database to query. In order to drilldown to child records, you can replace xpath with the Path value that is returned in each record, followed by a forward slash and a sub-record field name.

If a valid user 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.
 

There are also additional parameters that can be specified in the URL, which are described below:

mapping=oldfield,newfield,oldfield,newfield...

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.

fields=field1,field2,field3...

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.

links=true

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:
v4.2.0.956 (beta)
Up Since 2/29/2024 12:02:23 AM