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 VERB | Effect | Allows Filters | Filters Mandatory |
---|---|---|---|
GET | Retrieves one or more records from the database | Yes | No |
POST | Updates one or more existing records in the database | Yes | Yes |
PUT | Creates one or more new records in the database | No | No |
DELETE | Deletes one or more records in the database | Yes | Yes |
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 Operator | Action |
---|---|
= | 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:
Syntax | Action | Examples |
---|---|---|
fieldname=value | Search within the immediate fields of the current record type | id=1 first_name=Craig |
childrecord.fieldname=value | Search within the fields of a child record | parentcompany.name=CoMech+Metrology+Ltd asset.id=61 |
dynamicfield.fields.morefields.evenmore=value | Search 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 |