Query Options & Operators
The V3 Smart Tech PaaS API provides a powerful filtering engine. You can apply complex criteria directly via URL query parameters using specific prefixes and system-level reserved keywords.
Comparison Operators
Use these prefixes before your value to perform range or inequality checks. These are primarily used for Numeric and DateTime fields.
| Prefix | Operator | Example |
|---|---|---|
gt: |
Greater Than (>) | ?id=gt:100 |
gte: |
Greater Than or Equal (>=) | ?create_time=gte:2025-01-01T00:00:00.000Z |
lt: |
Lesser Than (<) | ?id=lt:500 |
lte: |
Lesser Than or Equal (<=) | ?timestamp=lte:2025-07-08T23:59:59.999Z |
nte: |
Not Equal (<>) | ?status=nte:Inactive |
ornull: |
Include Nulls | ?description=ornull:gt:A (Value > A OR is NULL) |
String & List Operators
Advanced matching for text fields and multiple-value selections.
| Prefix | Operator | Description |
|---|---|---|
like: |
Pattern Match | Supports * as a wildcard. Example: ?asset_name=like:Bin* |
ntlike: |
Not Like | Excludes patterns. Example: ?asset_name=ntlike:Test* |
in: |
In List | Comma-separated values (Max 100). Example: ?status=in:Active,Pending |
ntin: |
Not In List | Excludes values (Max 100). Example: ?id=ntin:1,2,3 |
Implicit Wildcards
If a parameter value contains a * character but no prefix, the system automatically treats it as a LIKE query.
Null Checks
To check if a field is empty or populated, use these exact keywords as the parameter value.
| Keyword | Description | Example |
|---|---|---|
isnull |
Field is NULL | ?description=isnull |
isntnull |
Field is NOT NULL | ?asset_location_name=isntnull |
Geography Operators
Specialized operators for geography data types (GPS coordinates).
| Prefix | Syntax | Description |
|---|---|---|
near: |
near:distance:long,lat |
Finds records within distance (meters) of a point. |
inside: |
inside:long,lat |
Checks if a point is inside a polygon/geofence. |
Pagination Parameters
Control the volume and offset of the returned data set.
| Parameter | Default | Description |
|---|---|---|
$page |
1 | The page number to retrieve (Range: 1-100). |
$fetch |
Metadata Default | Number of records per page. Cannot exceed the system maximum. |
Sorting
Order your results by one or more columns.
| Parameter | Syntax | Example |
|---|---|---|
$sort |
column:asc or column:desc |
?$sort=create_time:desc |
Projection & Distinct
Limit the fields returned or remove duplicate rows.
| Parameter | Description | Example |
|---|---|---|
$view |
Returns only the specified comma-separated columns. | ?$view=asset_name,timestamp |
$distinct |
Returns unique values for the specified columns. | ?$distinct=asset_type_name |
Aggregations
Perform calculations on the data set. Using these will automatically group by any non-aggregated columns in $view.
| Parameter | Function | Example |
|---|---|---|
$sum |
Total sum of a numeric column. | ?$sum=reading_value |
$avg |
Average value. | ?$avg=temperature |
$count |
Count of records. | ?$count=id |
$min / $max |
Minimum or Maximum value. | ?$max=timestamp |
Pivoting (Cross-Tab Reports)
Pivoting transforms unique values from one column into multiple new columns in the output, aggregating data from another column. This is ideal for creating matrix-style reports.
Syntax: $pivot[func]=aggregateColumn,pivotingColumn
The aggregateColumn is the data you want to calculate (e.g., sensor readings), and the pivotingColumn is the field whose values will become the new column headers (e.g., sensor types).
Available Pivot Operators
| Parameter | Function | Example |
|---|---|---|
$pivotsum |
Sum of values. | ?$pivotsum=reading,sensor_type |
$pivotavg |
Average of values. | ?$pivotavg=temperature,date |
$pivotcount |
Count of occurrences. | ?$pivotcount=id,status |
$pivotmax / $pivotmin |
Maximum or Minimum value. | ?$pivotmax=reading,asset_name |
Parameter Escaping
If a database column name starts with a $ or clashes with a reserved keyword, prefix the parameter name with a backslash (\) in the URL.