For the complete documentation index, see llms.txt. This page is also available as Markdown.

API Reference

Reference documentation for Ardexa's RESTful API

Regions

Ardexa runs clouds in several regions, each on its own subdomain. Send every request to the cloud your workgroup belongs to — app.ardexa.com or eur1.ardexa.com. A token issued by one region is not valid on another.

Authentication

Every endpoint here requires an Ardexa API token, sent as an Authorization: Bearer <token> header:

curl -H "Authorization: Bearer $ARDEXA_TOKEN" \
  "https://app.ardexa.com/api/v1/devices/my-workgroup"

When a request is refused

A 403 response carries a JSON body with a code and a message naming what was required:

Code
Meaning

workgroup_not_in_credential

The token does not cover that workgroup. Check the workgroup ID, and that you are calling the right region.

insufficient_permissions

The token covers the workgroup but lacks the permission this endpoint needs.

devgroup_restricted

The token is restricted to a different device group.

Devices

List the devices in a workgroup

get
/devices/{orgName}

Returns every device in the workgroup, each with its reported metadata and stored settings. A token restricted to a device group sees only that group's devices.

Use nameonly when all you need is a lookup of IDs to names, and compact=false to have each device's field definitions expanded rather than returned as references — see GET /devices/{orgName}/{device}. The expanded response is larger, since shared definitions are then repeated per scenario.

This is where a workgroup read gets expensive: every entry carries its device's whole meta document, and a single device's can be megabytes. Use meta to narrow it to the keys you read, or to drop it entirely.

Authorizations
AuthorizationstringRequired

An Ardexa API token, sent as Authorization: Bearer <token>.

Path parameters
orgNamestringRequired

Workgroup ID

Query parameters
devGroupstringOptional

Restrict the list to one device group, given as the group's _id from GET /orgs/{orgName}/device-groups. A value that is not a valid ID is rejected with 400. A token already restricted to a device group may only name its own group.

compactbooleanOptional

Set to false to have shared field definitions in each device's meta expanded in place, rather than returned as references. See the endpoint description.

Default: true
metastringOptional

Narrow, or drop, each device's meta document. Omit the parameter and the whole document is returned, as it always has been.

ValueEach device's meta
(parameter absent, or empty)The whole document
true, 1The whole document, said explicitly
false, 0Not returned — the meta key is absent
a,b,cOnly those top-level keys, each absent if the device has none

Any other value is read as a key list, and a repeated parameter (meta=a&meta=b) means the same as meta=a,b.

The saving is on the wire, not in the database: the metadata is already held in memory, so meta=false costs the same read and sends hundreds of bytes per device instead of megabytes.

nameonlybooleanOptional

Include this parameter (any value) to return only id and name for each device. It takes precedence over meta, which is then ignored.

Responses
200

The devices in the workgroup

application/json

The fields below are the ones useful to an integration; further internal fields may also be present. With nameonly, only id and name are returned.

idstringOptional

Device ID, used as the device path parameter elsewhere

namestringOptional
onlinebooleanOptional

Whether the device currently holds a connection to the cloud

metaobjectOptional

The device's last reported configuration, in the same shape as GET /devices/{orgName}/{device}. {} for a device that has never reported metadata, and null for one the cloud knows of but has no record for.

Absent entirely under meta=false; under a key list, an object holding only the keys asked for — {} for a device that has none of them, or none at all.

settingsobjectOptional

The device's stored settings, keyed by setting name

versionstringOptional

Agent version running on the device

platformstringOptional
osstringOptional
get/devices/{orgName}
GET /api/v1/devices/{orgName} HTTP/1.1
Host: app.ardexa.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
[
  {
    "id": "826d91ab-857e-4896-a877-224e387af6f0",
    "name": "4343 - HEM 593 R-Truck",
    "online": true,
    "settings": {
      "site": "Northern Depot"
    }
  }
]

Get a device's metadata

get
/devices/{orgName}/{device}

Returns a single device's identity, whether it is currently connected, and its latest reported metadata.

The identity fields are the same ones the workgroup list returns per device, so version — what the agent running on the device can do — no longer needs a whole-workgroup read. meta narrows or drops the metadata, which is the bulk of the response and can be megabytes.

The meta object is what the device last reported about how it collects data. It holds a list of scenarios per collection method:

Method
How the device collects

run

Runs a command on a schedule

tail

Watches a text file for new lines

watch

Detects changes to files

unix_socket

Listens for events on a socket

dynamic

Scenarios the device detected for itself

Every scenario names the table and source its readings go to, which is how you work out what to search for a given device.

Reading a scenario's fields

This endpoint returns field definitions exactly as the device stored them, so a scenario's fields may be any of:

  • an array of field definitions; or

  • a string naming a top-level property of meta holding an array shared by several scenarios; or

  • a string in table.source form, naming another scenario whose fields to reuse.

When fields is a string, resolve it against the meta property of that name, or against the scenario whose table and source match. To skip that work, call GET /devices/{orgName}?compact=false, which returns the same metadata with the references already expanded.

Authorizations
AuthorizationstringRequired

An Ardexa API token, sent as Authorization: Bearer <token>.

Path parameters
orgNamestringRequired

Workgroup ID

devicestringRequired

Device ID

Query parameters
metastringOptional

Narrow, or drop, the meta document. Omit the parameter and the whole document is returned, as it always has been.

Valuemeta in the response
(parameter absent, or empty)The whole document
true, 1The whole document, said explicitly
false, 0Not returned — the meta key is absent
a,b,cOnly those top-level keys, each absent if the device has none

Any other value is read as a key list, and a repeated parameter (meta=a&meta=b) means the same as meta=a,b.

meta=false is also the one value that succeeds for a device that has never reported metadata; see the 500 response.

Responses
200

Device metadata

application/json

The fields below are the ones useful to an integration; further internal fields may also be present.

_idstringOptional

Device ID. id holds the same value — the workgroup list spells it that way — so a caller may read either.

idstringOptional

Device ID, used as the device path parameter elsewhere

namestringOptional
onlinebooleanOptional

Whether the device currently holds a connection to the cloud

versionstringOptional

Agent version running on the device

platformstringOptional
osstringOptional
cwdstringOptional

The agent's working directory on the device

fallbackbooleanOptional

Whether the agent is running in fallback mode

fallbackErrorstringOptional

Why the agent fell back, when fallback is true

notAfterstring · date-timeOptional

When the device's certificate expires. A device whose certificate has expired cannot connect.

cedbooleanOptional

Whether this is a cloud-hosted device (CED)

infoobjectOptional

Further properties recorded for the device

metaobjectOptional

The device's last reported configuration. Scenario lists are keyed by collection method (run, watch, tail, unix_socket, dynamic).

Absent entirely under meta=false; under a key list, an object holding only the keys asked for — {} for a device that has none of them, or none at all.

get/devices/{orgName}/{device}
GET /api/v1/devices/{orgName}/{device} HTTP/1.1
Host: app.ardexa.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "_id": "text",
  "id": "text",
  "name": "text",
  "online": true,
  "version": "text",
  "platform": "text",
  "os": "text",
  "cwd": "text",
  "fallback": true,
  "fallbackError": "text",
  "notAfter": "2026-01-01T00:00:00.000Z",
  "ced": true,
  "info": {},
  "meta": {}
}

Get reporting status for one device

get
/devices/{orgName}/{device}/status

The same health summary as the workgroup-wide status endpoint, for a single device — when it was last online or offline, its clock drift, and any table and source combinations that have stopped arriving.

Authorizations
AuthorizationstringRequired

An Ardexa API token, sent as Authorization: Bearer <token>.

Path parameters
orgNamestringRequired

Workgroup ID

devicestringRequired

Device ID

Responses
200

Status for the device

application/json
onlinestringOptional

Timestamp the device last came online

offlinestringOptional

Timestamp the device last went offline

clockDiffstringOptional

Difference between the device's clock and the cloud's, in seconds. A large value means timestamps on that device's data may be wrong.

get/devices/{orgName}/{device}/status
GET /api/v1/devices/{orgName}/{device}/status HTTP/1.1
Host: app.ardexa.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "online": "text",
  "offline": "text",
  "clockDiff": "text",
  "missing": [
    {
      "table": "text",
      "source": "text",
      "date": "text"
    }
  ]
}

Get reporting status for all devices

get
/devices/{orgName}/device/status

Returns a health summary for every device in the workgroup, keyed by device ID — when each device was last online or offline, how far its clock has drifted, and which table and source combinations have stopped arriving.

Use this to check whether a device is still reporting before concluding that a search returned nothing because there is no data.

Authorizations
AuthorizationstringRequired

An Ardexa API token, sent as Authorization: Bearer <token>.

Path parameters
orgNamestringRequired

Workgroup ID

Responses
200

Status for each device, keyed by device ID. Empty object when there are no devices to report on.

application/json
get/devices/{orgName}/device/status
GET /api/v1/devices/{orgName}/device/status HTTP/1.1
Host: app.ardexa.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "ANY_ADDITIONAL_PROPERTY": {
    "online": "text",
    "offline": "text",
    "clockDiff": "text",
    "missing": [
      {
        "table": "text",
        "source": "text",
        "date": "text"
      }
    ]
  }
}

Get latest values for a specific device

get
/devices/{orgName}/{device}/latestValues

Retrieves the most recent data values for a specific device, optionally grouped by source or device. Supports filtering by source and specific fields. The search window defaults to the last 24 hours; supply startTime/endTime or days to look further back.

For every device in the workgroup at once use /devices/{orgName}/device/latestValues. For a single named stream, /devices/{orgName}/{device}/latest/{stream} is cheaper.

Authorizations
AuthorizationstringRequired

An Ardexa API token, sent as Authorization: Bearer <token>.

Path parameters
orgNamestringRequired

Workgroup ID

devicestringRequired

Device ID

Query parameters
tablestringRequired

Name of the data table to query

sourcestringOptional

Filter results by specific data source

fieldstringOptional

Filter to only include records where this field exists. Accepts a single field or a comma-separated list, in which case every listed field must exist.

nonZerobooleanOptional

Require each field named by field to be non-zero as well as present. Used for last-known-position lookups, where a zero coordinate means "no fix" rather than a location.

Default: false
fieldsOnlybooleanOptional

Return only the fields named by field (plus event_time) instead of the whole record. Requires field. Off by default, so existing callers keep receiving full records.

Default: false
groupBystring · enumOptional

How to group the results - by source or by device

Default: sourcePossible values:
startTimestring · date-timeOptional

Start of the search window (ISO 8601). Must be supplied together with endTime. Defaults to the start of the previous day.

endTimestring · date-timeOptional

End of the search window (ISO 8601). Must be supplied together with startTime.

daysnumberOptional

Look back this many days instead of supplying an explicit window. Ignored when startTime/endTime are given, and clamped to 400 days.

devicesstringOptional

Comma-separated device ids to narrow the query to, maximum 100. Always intersected with the caller's device group. Omit to include every device in scope.

limitintegerOptional

Maximum number of devices to return, capped at 10000 (the default).

Responses
200

Latest values retrieved successfully

application/json

When groupBy=source - object keyed by deviceId containing an object keyed by source name with the latest record. When groupBy=device - object keyed by deviceId with the latest record directly

Other propertiesobjectOptional
get/devices/{orgName}/{device}/latestValues
GET /api/v1/devices/{orgName}/{device}/latestValues?table=text HTTP/1.1
Host: app.ardexa.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "device1": {
    "source1": {
      "event_time": "2025-11-13T10:30:00Z",
      "temperature": 25.5,
      "humidity": 60
    },
    "source2": {
      "event_time": "2025-11-13T10:31:00Z",
      "voltage": 12.3
    }
  }
}

Get latest values for all devices in workgroup

get
/devices/{orgName}/device/latestValues

Retrieves the most recent data value per device (or per source) for all accessible devices, optionally grouped by source or device. Supports filtering by source and specific fields. The search window defaults to the last 24 hours; supply startTime/endTime or days to look further back, which is how a last-known value is resolved for devices that have been offline.

There are four ways to read a latest value; this one covers every device at once. For one device use /devices/{orgName}/{device}/latestValues, for one named stream use /devices/{orgName}/{device}/latest/{stream}, and for a fixed set of streams read straight from cache use /devices/{orgName}/device/cachedLatestValues.

Authorizations
AuthorizationstringRequired

An Ardexa API token, sent as Authorization: Bearer <token>.

Path parameters
orgNamestringRequired

Workgroup ID

Query parameters
tablestringRequired

Name of the data table to query

sourcestringOptional

Filter results by specific data source

fieldstringOptional

Filter to only include records where this field exists. Accepts a single field or a comma-separated list, in which case every listed field must exist.

nonZerobooleanOptional

Require each field named by field to be non-zero as well as present. Used for last-known-position lookups, where a zero coordinate means "no fix" rather than a location.

Default: false
fieldsOnlybooleanOptional

Return only the fields named by field (plus event_time) instead of the whole record. Requires field. Off by default, so existing callers keep receiving full records.

Default: false
groupBystring · enumOptional

How to group the results - by source or by device

Default: sourcePossible values:
startTimestring · date-timeOptional

Start of the search window (ISO 8601). Must be supplied together with endTime. Defaults to the start of the previous day.

endTimestring · date-timeOptional

End of the search window (ISO 8601). Must be supplied together with startTime.

daysnumberOptional

Look back this many days instead of supplying an explicit window. Ignored when startTime/endTime are given, and clamped to 400 days.

devicesstringOptional

Comma-separated device ids to narrow the query to, maximum 100. Always intersected with the caller's device group. Omit to include every device in scope.

limitintegerOptional

Maximum number of devices to return, capped at 10000 (the default).

Responses
200

Latest values retrieved successfully

application/json

When groupBy=source - object keyed by deviceId, each containing an object keyed by source name with the latest record. When groupBy=device - object keyed by deviceId with the latest record directly

Other propertiesobjectOptional
get/devices/{orgName}/device/latestValues
GET /api/v1/devices/{orgName}/device/latestValues?table=text HTTP/1.1
Host: app.ardexa.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "device1": {
    "source1": {
      "event_time": "2025-11-13T10:30:00Z",
      "temperature": 25.5,
      "humidity": 60
    },
    "source2": {
      "event_time": "2025-11-13T10:31:00Z",
      "voltage": 12.3
    }
  }
}

Get cached latest values for multiple device streams

post
/devices/{orgName}/device/cachedLatestValues

Retrieves the most recent cached data values for the device streams you name, read straight from the cache rather than queried. Supports filtering by device group membership.

Requires the latest-values addon. Without it every request is refused with 403 — use /devices/{orgName}/device/latestValues instead, which queries the data directly and needs no addon.

Authorizations
AuthorizationstringRequired

An Ardexa API token, sent as Authorization: Bearer <token>.

Path parameters
orgNamestringRequired

Workgroup ID

Body
Responses
200

Cached values retrieved successfully

application/json

Object keyed by deviceId, then by table, then by source, containing the requested field values

Other propertiesobjectOptional
post/devices/{orgName}/device/cachedLatestValues
POST /api/v1/devices/{orgName}/device/cachedLatestValues HTTP/1.1
Host: app.ardexa.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 220

{
  "streams": [
    {
      "deviceId": "device1",
      "table": "sensors",
      "source": "temp_sensor",
      "field": "temperature",
      "type": "decimal"
    },
    {
      "deviceId": "device1",
      "table": "sensors",
      "source": "humidity_sensor",
      "field": "humidity",
      "type": "integer"
    }
  ]
}
{
  "device1": {
    "sensors": {
      "temp_sensor": {
        "temperature": 25.5
      },
      "humidity_sensor": {
        "humidity": 60
      }
    }
  }
}

Get the latest record for one of a device's streams

get
/devices/{orgName}/{device}/latest/{stream}

Returns the single most recent record a device produced for one stream, identified by table and source. Use this when you want the current value for a known stream rather than a range of history — it is cheaper than a search, and is served from cache when the latest-values addon is enabled for the workgroup.

Find a device's table and source names in its metadata, at GET /devices/{orgName}/{device}.

For every value a device last reported, rather than one stream, use /devices/{orgName}/{device}/latestValues.

Authorizations
AuthorizationstringRequired

An Ardexa API token, sent as Authorization: Bearer <token>.

Path parameters
orgNamestringRequired

Workgroup ID

devicestringRequired

Device ID

streamstringRequired

The stream, written as table.source. A third part — table.source.field — narrows the result to records carrying that field, and is accepted only for CSV-type scenarios.

Example: Data_1s_Log.Data_1s_Log
Responses
200

The most recent record for the stream

application/json
objectOptional
get/devices/{orgName}/{device}/latest/{stream}
GET /api/v1/devices/{orgName}/{device}/latest/{stream} HTTP/1.1
Host: app.ardexa.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{}

Metadata

List a device's settings

get
/devices/{orgName}/{device}/settings

Returns every stored setting for one device. Device settings are values you set in the cloud — site name, location, asset references and similar — as distinct from the meta object on the device metadata endpoint, which is what the device itself reports.

Settings are also what device groups can be built from, so the keys present here determine how devices can be grouped and filtered.

Authorizations
AuthorizationstringRequired

An Ardexa API token, sent as Authorization: Bearer <token>.

Path parameters
orgNamestringRequired

Workgroup ID

devicestringRequired

Device ID

Responses
200

The device's settings

application/json
_idstringOptional
keystringOptional

The setting's name

valueanyOptional

The stored value. Type depends on the setting — a string, number, boolean, object or array.

deviceIdstringOptional

Present on device settings only

createdAtstring · date-timeOptional
updatedAtstring · date-timeOptional
get/devices/{orgName}/{device}/settings
GET /api/v1/devices/{orgName}/{device}/settings HTTP/1.1
Host: app.ardexa.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
[
  {
    "_id": "text",
    "key": "text",
    "value": null,
    "deviceId": "text",
    "createdAt": "2026-01-01T00:00:00.000Z",
    "updatedAt": "2026-01-01T00:00:00.000Z"
  }
]

Get one device setting

get
/devices/{orgName}/{device}/settings/{key}

Returns a single stored setting for a device, by key.

Authorizations
AuthorizationstringRequired

An Ardexa API token, sent as Authorization: Bearer <token>.

Path parameters
orgNamestringRequired

Workgroup ID

devicestringRequired

Device ID

keystringRequired

The setting's name

Responses
200

The setting

application/json
_idstringOptional
keystringOptional

The setting's name

valueanyOptional

The stored value. Type depends on the setting — a string, number, boolean, object or array.

deviceIdstringOptional

Present on device settings only

createdAtstring · date-timeOptional
updatedAtstring · date-timeOptional
get/devices/{orgName}/{device}/settings/{key}
GET /api/v1/devices/{orgName}/{device}/settings/{key} HTTP/1.1
Host: app.ardexa.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "_id": "text",
  "key": "text",
  "value": null,
  "deviceId": "text",
  "createdAt": "2026-01-01T00:00:00.000Z",
  "updatedAt": "2026-01-01T00:00:00.000Z"
}

List a workgroup's settings

get
/orgs/{orgName}/settings

Returns every stored setting for the workgroup — configuration that applies across all its devices, such as the CSV delimiter used for exports or the site definitions used for metering.

These are workgroup-wide, unlike the per-device settings at GET /devices/{orgName}/{device}/settings.

Authorizations
AuthorizationstringRequired

An Ardexa API token, sent as Authorization: Bearer <token>.

Path parameters
orgNamestringRequired

Workgroup ID

Responses
200

The workgroup's settings

application/json
_idstringOptional
keystringOptional

The setting's name

valueanyOptional

The stored value. Type depends on the setting — a string, number, boolean, object or array.

deviceIdstringOptional

Present on device settings only

createdAtstring · date-timeOptional
updatedAtstring · date-timeOptional
get/orgs/{orgName}/settings
GET /api/v1/orgs/{orgName}/settings HTTP/1.1
Host: app.ardexa.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
[
  {
    "_id": "text",
    "key": "text",
    "value": null,
    "deviceId": "text",
    "createdAt": "2026-01-01T00:00:00.000Z",
    "updatedAt": "2026-01-01T00:00:00.000Z"
  }
]

Get one workgroup setting

get
/orgs/{orgName}/settings/{key}

Returns a single workgroup setting, by key.

For a token restricted to a device group, the meterSites setting is narrowed to the sites whose devices all fall inside that group. Other settings are returned whole.

Authorizations
AuthorizationstringRequired

An Ardexa API token, sent as Authorization: Bearer <token>.

Path parameters
orgNamestringRequired

Workgroup ID

keystringRequired

The setting's name

Responses
200

The setting

application/json
_idstringOptional
keystringOptional

The setting's name

valueanyOptional

The stored value. Type depends on the setting — a string, number, boolean, object or array.

deviceIdstringOptional

Present on device settings only

createdAtstring · date-timeOptional
updatedAtstring · date-timeOptional
get/orgs/{orgName}/settings/{key}
GET /api/v1/orgs/{orgName}/settings/{key} HTTP/1.1
Host: app.ardexa.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "_id": "text",
  "key": "text",
  "value": null,
  "deviceId": "text",
  "createdAt": "2026-01-01T00:00:00.000Z",
  "updatedAt": "2026-01-01T00:00:00.000Z"
}

List device groups

get
/orgs/{orgName}/device-groups

Returns the workgroup's device groups. A device group is a named subset of devices; searches and device listings can be scoped to one.

Use the _id from this list as the devGroup parameter on GET /devices/{orgName}.

A token restricted to a device group sees only that one group.

Authorizations
AuthorizationstringRequired

An Ardexa API token, sent as Authorization: Bearer <token>.

Path parameters
orgNamestringRequired

Workgroup ID

Responses
200

The workgroup's device groups

application/json
_idstringOptional

Device group ID. Pass this as the devGroup parameter when listing devices.

namestringOptional
compositionstringOptional

How membership is decided — for example by an explicit device list, by a device setting (META), or by device and source (SRC).

valueanyOptional

The membership definition, whose shape depends on composition.

get/orgs/{orgName}/device-groups
GET /api/v1/orgs/{orgName}/device-groups HTTP/1.1
Host: app.ardexa.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
[
  {
    "_id": "text",
    "name": "text",
    "composition": "text",
    "value": null
  }
]

Get one device group

get
/orgs/{orgName}/device-groups/{devgroup}

Returns a single device group, including the definition of which devices belong to it.

Authorizations
AuthorizationstringRequired

An Ardexa API token, sent as Authorization: Bearer <token>.

Path parameters
orgNamestringRequired

Workgroup ID

devgroupstringRequired

Device group ID

Responses
200

The device group

application/json
_idstringOptional

Device group ID. Pass this as the devGroup parameter when listing devices.

namestringOptional
compositionstringOptional

How membership is decided — for example by an explicit device list, by a device setting (META), or by device and source (SRC).

valueanyOptional

The membership definition, whose shape depends on composition.

get/orgs/{orgName}/device-groups/{devgroup}
GET /api/v1/orgs/{orgName}/device-groups/{devgroup} HTTP/1.1
Host: app.ardexa.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "_id": "text",
  "name": "text",
  "composition": "text",
  "value": null
}

List the data tables in a workgroup

get
/tables/{orgName}

Returns the names of every table the workgroup has data in. Use these names as the table path parameter on the search endpoints.

audit_logs appears only for tokens with the Read audit logs permission; everyone else gets the list without it.

Authorizations
AuthorizationstringRequired

An Ardexa API token, sent as Authorization: Bearer <token>.

Path parameters
orgNamestringRequired

Workgroup ID

Responses
200

Table names

application/json
string[]OptionalExample: ["Data_1s_Log","daily_energy","status"]
get/tables/{orgName}
GET /api/v1/tables/{orgName} HTTP/1.1
Host: app.ardexa.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
[
  "Data_1s_Log",
  "daily_energy",
  "status"
]

Get a table's columns and record count

get
/tables/{orgName}/{table}

Describes one table: how many records it holds and what columns are available, with each column's data type and unit of measure. Call this before searching to discover which field names and date fields the table supports.

Reading the audit_logs table also needs the Read audit logs permission.

Units are resolved from the reporting devices' metadata. Where two devices report the same column with different units, the column also carries a conflict entry listing them.

Authorizations
AuthorizationstringRequired

An Ardexa API token, sent as Authorization: Bearer <token>.

Path parameters
orgNamestringRequired

Workgroup ID

tablestringRequired

Name of the table

Responses
200

Table information

application/json
countintegerOptional

Number of records in the table

typestringOptional
get/tables/{orgName}/{table}
GET /api/v1/tables/{orgName}/{table} HTTP/1.1
Host: app.ardexa.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "count": 1500000,
  "fields": {
    "event_time": {
      "type": "date"
    },
    "Power": {
      "type": "double",
      "units": "kW"
    }
  }
}

List the devices reporting to a table

get
/tables/{orgName}/{table}/devices

Returns the devices whose configuration sends data to this table, keyed by device ID, with each device's latest metadata. Use it to find which devices to filter on before searching.

A token restricted to a device group sees only that group's devices.

Authorizations
AuthorizationstringRequired

An Ardexa API token, sent as Authorization: Bearer <token>.

Path parameters
orgNamestringRequired

Workgroup ID

tablestringRequired

Name of the table

Responses
200

Devices reporting to the table, keyed by device ID

application/json
Other propertiesobjectOptional

The device's latest reported metadata, with each scenario's fields already expanded — unlike GET /devices/{orgName}/{device}, which returns them as the device stored them.

get/tables/{orgName}/{table}/devices
GET /api/v1/tables/{orgName}/{table}/devices HTTP/1.1
Host: app.ardexa.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "ANY_ADDITIONAL_PROPERTY": {}
}
get
/tables/{orgName}/{table}/search

Runs a query against one of the workgroup's data tables and returns the matching records. This is the primary endpoint for extracting data.

By default the oldest 50 records are returned. Ask for sort=-event_time when you want the most recent ones instead. Narrow the result with timeframe and filters, choose columns with fields, and page through large result sets with scroll.

Reading the audit_logs table also needs the Read audit logs permission.

If a search returns no records, /devices/{orgName}/device/status shows whether the devices are still reporting.

Retrieving more than 10,000 records

One request returns at most 10,000 records. To read more, add scroll and page through the result with /tables/{orgName}/{table}/search/scroll. A scroll has no total limit — it walks the whole result set however large it is.

rows sets the size of every scroll page, not just the first response. Send rows=10000 alongside scroll to keep the number of round trips down.

There is no offset, page or page-size parameter, and the response carries no next-page URL. scroll is the only way to page.

A search has no server-side time limit, so a broad query takes as long as it needs rather than timing out.

Timeframe expressions

timeframe is either a single expression — meaning "from then onward", with no upper bound — or a range written <start> until <end>. Either side accepts:

Form
Examples

ISO 8601 timestamp

2026-08-01, 2026-08-01T00:00:00Z, 2026-08-01 09:30:00

Keyword

now, today

Relative

7 days ago, three days ago, 6 months ago

Calendar edge

beginning of last month, end of yesterday, beginning of June 2026

Relative units are second, minute, hour, day, week, month and year, and the count may be spelled out up to thirty-one. Calendar periods are today, yesterday, this/last/next week, month or year, or a named month and year; start of also works in place of beginning of. Prefixing a relative expression with 0am anchors it to midnight of that day.

Authorizations
AuthorizationstringRequired

An Ardexa API token, sent as Authorization: Bearer <token>.

Path parameters
orgNamestringRequired

Workgroup ID

tablestringRequired

Name of the table to search. Use /tables/{orgName} to list the available tables.

Query parameters
timeframestringOptional

The period to search, for example "7 days ago" or "2026-08-01 until 2026-08-08". Omit to search all time. See the endpoint description for the full set of expressions.

Example: 7 days ago
filtersstring[]Optional

Filter conditions, each sent as a JSON object serialised to a string — not as nested query parameters. Repeat the parameter to apply several; they are combined with AND.

filters={"field":"Power","operator":">","value":0}

Each object is either a single condition (field, operator, value) or a group (operator of AND or OR, plus a nested filters array). Operators are >, >=, <, <=, =, !=, BETWEEN, NOT BETWEEN, LIKE, NOT LIKE, IN, NOT IN, EXISTS and IS MISSING. value is required for all except EXISTS and IS MISSING; use an array for IN, NOT IN, BETWEEN and NOT BETWEEN. On a date column, value accepts the same expressions as timeframe.

Example: {"field":"Power","operator":">","value":0}
fieldsstring[]Optional

Columns to return. Repeat the parameter for several. Omit to return every column. Maximum 2000 fields per query.

sortstring[]Optional

Columns to sort by. A bare name sorts ascending; prefix it with - to sort descending.

The default is event_time ascending — that is, oldest records first. To get the most recent records, ask for -event_time. Sorting on a column the table does not have is rejected (ser905).

Default: ["event_time"]
rowsinteger · max: 10000Optional

Number of records to return. Maximum 10000; use scroll for more.

With scroll, this sets the size of every page, not just the first response.

Default: 50
scrollbooleanOptional

Include this parameter (any value) to open a scroll context for paging through more records than rows allows. The response then carries a scroll_id. Cannot be combined with aggs.

A scroll has no total record limit; only the per-page rows cap applies.

aggsstring[]Optional

Aggregations to compute instead of returning raw records, each sent as a JSON object serialised to a string. Repeat for several. Cannot be combined with scroll.

aggs={"field":"Power","type":"avg"}

Each object needs a type — stats, extended_stats, sum, avg, date_histogram, histogram, top_hits or range — and a field (or fields for several). Add groupBy to break the result down by other columns, interval for the histogram types, and perDevice to split a histogram by device.

Send rows=0 to get the aggregations without any record data.

Example: {"field":"Power","type":"avg"}
dateFieldstringOptional

Which date column timeframe applies to. Must be a date field on the table.

Default: event_time
timezonestringOptional

IANA timezone name used to resolve timeframe and date filter values, for example Europe/Berlin. An unrecognised name falls back to Etc/UTC rather than failing.

Default: Etc/UTC
indexstring · enumOptional

Set to latest to search only the most recent index. Faster for recent data, but will not find older records.

Possible values:
Responses
200

Search results

application/json
recordsobject[]Optional

The matching rows, one object per record.

totalRecordsintegerOptional

Total number of records matching the query, which may exceed rows. Every scroll page repeats the same total; it does not count down as you page.

tookintegerOptional

Query execution time in milliseconds.

scroll_idstringOptional

Present only when scroll was requested. Pass it to /tables/{orgName}/{table}/search/scroll to fetch the next page. Each response returns a fresh id, and each call resets the context's 45-second expiry.

aggregationsobjectOptional

Present only when aggs was requested.

get/tables/{orgName}/{table}/search
GET /api/v1/tables/{orgName}/{table}/search HTTP/1.1
Host: app.ardexa.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "records": [
    {}
  ],
  "totalRecords": 1,
  "took": 1,
  "scroll_id": "text",
  "aggregations": {}
}

Fetch the next page of a scrolled search

get
/tables/{orgName}/{table}/search/scroll

Continues a search started with the scroll parameter. Pass the scroll_id from the previous response; each response returns a fresh id to use for the page after it. Keep calling until records comes back empty — a response can still carry a scroll_id once the records have run out, so an empty records is the signal to stop.

Each page is rows records, the value given on the initiating search.

A scroll context expires 45 seconds after the last call, not 45 seconds from the start, so a scroll of any length is fine as long as the gap between calls stays under that. Once it expires the id is no longer valid and the search must be restarted.

Authorizations
AuthorizationstringRequired

An Ardexa API token, sent as Authorization: Bearer <token>.

Path parameters
orgNamestringRequired

Workgroup ID

tablestringRequired

Name of the table being searched

Query parameters
scroll_idstringRequired

The scroll_id returned by the previous search or scroll response

Responses
200

The next page of results

application/json
recordsobject[]Optional

The matching rows, one object per record.

totalRecordsintegerOptional

Total number of records matching the query, which may exceed rows. Every scroll page repeats the same total; it does not count down as you page.

tookintegerOptional

Query execution time in milliseconds.

scroll_idstringOptional

Present only when scroll was requested. Pass it to /tables/{orgName}/{table}/search/scroll to fetch the next page. Each response returns a fresh id, and each call resets the context's 45-second expiry.

aggregationsobjectOptional

Present only when aggs was requested.

get/tables/{orgName}/{table}/search/scroll
GET /api/v1/tables/{orgName}/{table}/search/scroll?scroll_id=text HTTP/1.1
Host: app.ardexa.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "records": [
    {}
  ],
  "totalRecords": 1,
  "took": 1,
  "scroll_id": "text",
  "aggregations": {}
}

Last updated

Was this helpful?