Reference from OpenAPI
Every operation, parameter and response of the v2 API, rendered straight from its OpenAPI 3.1 file.
This page is built from the OpenAPI 3.1 file, so it always matches it. Load the same file into Postman, Insomnia or a client generator to call the API from your own tools. Requests and parameters explains each parameter in more depth.
Each request has a Try it form. With your API key it sends the request from your browser to the API. Without a key it shows real responses recorded from our reference sensor, ASENSE00000005.
Base URL: https://api.semitronica.pt/asense/v2
Get sensor data
get/
Returns records from table_name for device id between start_time and end_time (both inclusive). A page reads at most limit stored records; when more remain, the response carries next_timestamp.
Authentication
- API key in the x-api-key header
Parameters
| Name | In | Type | Default | Description |
|---|---|---|---|---|
table_namerequired | query | acc | gyr | ain | fft | data | env | connected | Table to read. See https://asense.semitronica.pt/docs/data-model/ | |
idrequired | query | string | Device ID, | |
start_timerequired | query | integer | Start of the window, Unix milliseconds, UTC, inclusive. | |
end_timerequired | query | integer | End of the window, Unix milliseconds, UTC, inclusive. | |
limit | query | integer | 256 | Most stored records read per page. On acc, gyr and ain one stored record is one packet of samples. A value that is not an integer falls back to 256. |
ascending | query | true | false | true | Sort by time, oldest first. |
merge | query | true | false | true | Join stored packets. acc, gyr, ain: the whole page becomes one item. fft: the X, Y and Z records of each UTC hour become one item with fft_x, fft_y, fft_z. data, env: no joining. When true, |
output_format | query | map | tuple_array | dict_array | combined_tuple | combined_dict | map | Layout of every series. An unknown value falls back to |
timestamps_only | query | true | false | false | On data and env, return only the record times in the window (never paged, ignores |
auto_odr | query | true | false | true | acc, gyr, ain. Space samples by the measured time between packets (1.0 to 1.5 s apart). Only |
enable_correction | query | true | false | acc, gyr, ain. Repair single packets whose timestamp is out of step. Default depends on the device. | |
sync_acc_gyr | query | true | false | gyr. Move each gyroscope packet to the accelerometer packet recorded up to 200 ms before it. Defaults to the value of | |
load_prior_elements | query | true | false | acc, gyr, ain. Read up to 3 s before |
Try it
Your key stays in this page and is sent only to the Asense API. It is gone when you leave or reload the page.
Without a key you see real responses recorded from our reference sensor, ASENSE00000005. Add your key to change the request and send it to your own devices.
Request
curl -H "x-api-key: $ASENSE_API_KEY" \ "https://api.semitronica.pt/asense/v2/?table_name=data&id=ASENSE00000005&start_time=1790470873632&end_time=1790474473632&limit=3"
Responses
| Status | Description | Body |
|---|---|---|
200 | Records in the window. An empty window returns | StandardResponse or TimestampsOnlyResponse |
400 | Missing or invalid parameters. | Error |
403 | Missing or invalid API key. | object |
500 | The request could not be completed, for example for an unknown | Error |