Fetch latest GNSS sensor data
curl --request POST \
--url https://api.beta.ontoto.com/v1/sensor-data/gnss/latest \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"deviceSerialNumbers": [
"<string>"
],
"legacyDeviceIds": [
0
],
"includeDeleted": true
}
'import requests
url = "https://api.beta.ontoto.com/v1/sensor-data/gnss/latest"
payload = {
"deviceSerialNumbers": ["<string>"],
"legacyDeviceIds": [0],
"includeDeleted": True
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({deviceSerialNumbers: ['<string>'], legacyDeviceIds: [0], includeDeleted: true})
};
fetch('https://api.beta.ontoto.com/v1/sensor-data/gnss/latest', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.beta.ontoto.com/v1/sensor-data/gnss/latest",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'deviceSerialNumbers' => [
'<string>'
],
'legacyDeviceIds' => [
0
],
'includeDeleted' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.beta.ontoto.com/v1/sensor-data/gnss/latest"
payload := strings.NewReader("{\n \"deviceSerialNumbers\": [\n \"<string>\"\n ],\n \"legacyDeviceIds\": [\n 0\n ],\n \"includeDeleted\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.beta.ontoto.com/v1/sensor-data/gnss/latest")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"deviceSerialNumbers\": [\n \"<string>\"\n ],\n \"legacyDeviceIds\": [\n 0\n ],\n \"includeDeleted\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.beta.ontoto.com/v1/sensor-data/gnss/latest")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"deviceSerialNumbers\": [\n \"<string>\"\n ],\n \"legacyDeviceIds\": [\n 0\n ],\n \"includeDeleted\": true\n}"
response = http.request(request)
puts response.read_body{
"items": [
{
"deviceSerialNumber": "2CF44434E909",
"deviceAlias": "Dam wall GNSS",
"legacyDeviceId": 10043,
"sensorUuid": "e5f6a7b8-c9d0-41e2-a3f4-b5c6d7e8f9a0",
"sensorAlias": "GNSS receiver",
"channelIndex": 0,
"sensorStatus": "ok",
"srid": 4326,
"projectionMetadata": [
{
"projectionType": "standard",
"id": 1,
"label": "MGA94 Zone 55",
"verticalDatum": "AHD",
"heightType": "orthometric",
"srid": 28355
},
{
"projectionType": "proj_string",
"id": 2,
"label": "Local dam grid",
"verticalDatum": null,
"heightType": "ellipsoidal",
"projString": "+proj=tmerc +lat_0=-42.88 +lon_0=147.32 +k=1 +x_0=0 +y_0=0 +ellps=GRS80 +units=m +no_defs"
}
],
"baseStations": [
{
"id": 7,
"type": "cors",
"name": "HOB2",
"status": "active",
"isEnabled": true
}
],
"data": [
{
"id": 918273,
"timestamp": "2024-06-15T06:00:00.000Z",
"bs": 7,
"lat": -42.881412,
"lon": 147.325803,
"eh": 41.226,
"oh": 39.104,
"quality": {
"sdn": 0.004,
"sde": 0.003,
"sdu": 0.009,
"q": 1,
"ns": 18,
"ar": 999.9
},
"roll": 0.12,
"pitch": -0.34,
"dE": 0.0021,
"dN": -0.0014,
"dU": 0.0008,
"d2d": 0.0025,
"d3d": 0.0026,
"vE": null,
"vN": null,
"vU": null,
"proj": {
"1": {
"e": 526412.118,
"n": 5251893.442,
"h": 39.104
},
"2": {
"e": 12.418,
"n": -8.223,
"h": 41.226
}
},
"debug": {
"ps": "completed",
"err": null,
"at": "2024-06-15T06:04:12.000Z",
"gw": 2318,
"gd": 6,
"gt": 453600,
"log": "gnss/solutions/2CF44434E909/2024-06-15T06.log"
}
}
],
"units": {
"dE": "m",
"dN": "m",
"dU": "m",
"d2d": "m",
"d3d": "m",
"vE": "mm/d",
"vN": "mm/d",
"vU": "mm/d",
"lat": "deg",
"lon": "deg",
"eh": "m",
"oh": "m",
"roll": "deg",
"pitch": "deg"
}
}
]
}{
"message": "Invalid request body"
}{
"message": "Authentication required"
}{
"message": "You do not have permission to access this resource"
}{
"message": "Resource not found"
}{
"message": "Duplicate entry"
}{
"message": "Rate limit of 200 requests per minute exceeded. Retry in 12s."
}{
"message": "Internal server error"
}Sensor Data
Fetch latest GNSS sensor data
Returns the most recent GNSS position for each requested device, as a single complete solution epoch rather than one series per field. Only applicable to GNSS-enabled devices.
POST
/
sensor-data
/
gnss
/
latest
Fetch latest GNSS sensor data
curl --request POST \
--url https://api.beta.ontoto.com/v1/sensor-data/gnss/latest \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"deviceSerialNumbers": [
"<string>"
],
"legacyDeviceIds": [
0
],
"includeDeleted": true
}
'import requests
url = "https://api.beta.ontoto.com/v1/sensor-data/gnss/latest"
payload = {
"deviceSerialNumbers": ["<string>"],
"legacyDeviceIds": [0],
"includeDeleted": True
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({deviceSerialNumbers: ['<string>'], legacyDeviceIds: [0], includeDeleted: true})
};
fetch('https://api.beta.ontoto.com/v1/sensor-data/gnss/latest', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.beta.ontoto.com/v1/sensor-data/gnss/latest",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'deviceSerialNumbers' => [
'<string>'
],
'legacyDeviceIds' => [
0
],
'includeDeleted' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.beta.ontoto.com/v1/sensor-data/gnss/latest"
payload := strings.NewReader("{\n \"deviceSerialNumbers\": [\n \"<string>\"\n ],\n \"legacyDeviceIds\": [\n 0\n ],\n \"includeDeleted\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.beta.ontoto.com/v1/sensor-data/gnss/latest")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"deviceSerialNumbers\": [\n \"<string>\"\n ],\n \"legacyDeviceIds\": [\n 0\n ],\n \"includeDeleted\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.beta.ontoto.com/v1/sensor-data/gnss/latest")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"deviceSerialNumbers\": [\n \"<string>\"\n ],\n \"legacyDeviceIds\": [\n 0\n ],\n \"includeDeleted\": true\n}"
response = http.request(request)
puts response.read_body{
"items": [
{
"deviceSerialNumber": "2CF44434E909",
"deviceAlias": "Dam wall GNSS",
"legacyDeviceId": 10043,
"sensorUuid": "e5f6a7b8-c9d0-41e2-a3f4-b5c6d7e8f9a0",
"sensorAlias": "GNSS receiver",
"channelIndex": 0,
"sensorStatus": "ok",
"srid": 4326,
"projectionMetadata": [
{
"projectionType": "standard",
"id": 1,
"label": "MGA94 Zone 55",
"verticalDatum": "AHD",
"heightType": "orthometric",
"srid": 28355
},
{
"projectionType": "proj_string",
"id": 2,
"label": "Local dam grid",
"verticalDatum": null,
"heightType": "ellipsoidal",
"projString": "+proj=tmerc +lat_0=-42.88 +lon_0=147.32 +k=1 +x_0=0 +y_0=0 +ellps=GRS80 +units=m +no_defs"
}
],
"baseStations": [
{
"id": 7,
"type": "cors",
"name": "HOB2",
"status": "active",
"isEnabled": true
}
],
"data": [
{
"id": 918273,
"timestamp": "2024-06-15T06:00:00.000Z",
"bs": 7,
"lat": -42.881412,
"lon": 147.325803,
"eh": 41.226,
"oh": 39.104,
"quality": {
"sdn": 0.004,
"sde": 0.003,
"sdu": 0.009,
"q": 1,
"ns": 18,
"ar": 999.9
},
"roll": 0.12,
"pitch": -0.34,
"dE": 0.0021,
"dN": -0.0014,
"dU": 0.0008,
"d2d": 0.0025,
"d3d": 0.0026,
"vE": null,
"vN": null,
"vU": null,
"proj": {
"1": {
"e": 526412.118,
"n": 5251893.442,
"h": 39.104
},
"2": {
"e": 12.418,
"n": -8.223,
"h": 41.226
}
},
"debug": {
"ps": "completed",
"err": null,
"at": "2024-06-15T06:04:12.000Z",
"gw": 2318,
"gd": 6,
"gt": 453600,
"log": "gnss/solutions/2CF44434E909/2024-06-15T06.log"
}
}
],
"units": {
"dE": "m",
"dN": "m",
"dU": "m",
"d2d": "m",
"d3d": "m",
"vE": "mm/d",
"vN": "mm/d",
"vU": "mm/d",
"lat": "deg",
"lon": "deg",
"eh": "m",
"oh": "m",
"roll": "deg",
"pitch": "deg"
}
}
]
}{
"message": "Invalid request body"
}{
"message": "Authentication required"
}{
"message": "You do not have permission to access this resource"
}{
"message": "Resource not found"
}{
"message": "Duplicate entry"
}{
"message": "Rate limit of 200 requests per minute exceeded. Retry in 12s."
}{
"message": "Internal server error"
}Authorizations
Body
application/json
Response
Successful response
Response body for querying GNSS sensor data
Show child attributes
Show child attributes