TrackRecordPro API Documentation TrackRecordPro

REST API Documentation

Supported HTTP Verbs

Each API call is accessed via HTTP, by making a GET, POST, PUT or DELETE HTTP query.

The various HTTP verbs have the following effects:

HTTP VERBEffectAllows FiltersFilters Mandatory
GETRetrieves one or more records from the databaseYesNo
POSTUpdates one or more existing records in the databaseYesYes
PUTCreates one or more new records in the databaseNoNo
DELETEDeletes one or more records in the databaseYesYes

Query Parameters and Searching

For the GET, POST and DELETE verbs above, the system will allow the operation to be carried out on one or more records (or in the case of the GET verb all records). The end of the URL you send can contain a filter, which can be used to restrict the rows the query relates to as shown below.

Each filter must be set as a pair, where the field name comes first, followed by a comparison operator and then the value. Valid comparison operators are:

Comparison OperatorAction
=Equal to
>Greater than
<Less than
!Not equal to
~Wildcard match
+Greater than or equal to
-Less than or equal to

Here are some examples of complete queries:

GET /3.0/assets/id>1...will retrieve only the asset who's ID is greater than 1.
GET /3.0/assets/next_check<2017-10-26...will retrieve only the assets which are due before the 26th October 2017.
GET /3.0/assets/next_check=2017-10-26/location.description=Location+1...will retrieve only the assets which are due on 26th October 2017 and are currently located at Location 1.
DELETE /3.0/assets/id=2...will delete the asset who's ID is 2.
DELETE /3.0/assets/location.description~Closed...will delete all assets where the location contains the word "Closed"
DELETE 3/0/assets...will throw an error, as DELETE and POST cannot operate on all records and must contain a filter

Field Format

The following search field types are supported:

SyntaxActionExamples
fieldname=valueSearch within the immediate fields of the current record typeid=1
first_name=Craig
childrecord.fieldname=valueSearch within the fields of a child recordparentcompany.name=CoMech+Metrology+Ltd
asset.id=61
dynamicfield.fields.morefields.evenmore=valueSearch within a "dynamic" field for values, as deep as the stored data permits. "dynamic" fields are stored as JSON and so can hold any amount of data within reason.styles.header.size.pixels=300
data.myfield=30