Post Sensors
curl --request POST \
--url https://api.sandbox.isometric.com/mrv/v0/sensors \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-client-secret: <x-client-secret>' \
--data '
{
"measurement_property": {},
"reference": "<string>",
"units": "<string>",
"facility_id": "fcl_1G8QT5ZAB1S0XSDW",
"manufacturer": "<string>",
"model": "<string>",
"storage_location_id": "slc_1F3PMGVC91S0SBK3"
}
'import requests
url = "https://api.sandbox.isometric.com/mrv/v0/sensors"
payload = {
"measurement_property": {},
"reference": "<string>",
"units": "<string>",
"facility_id": "fcl_1G8QT5ZAB1S0XSDW",
"manufacturer": "<string>",
"model": "<string>",
"storage_location_id": "slc_1F3PMGVC91S0SBK3"
}
headers = {
"x-client-secret": "<x-client-secret>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-client-secret': '<x-client-secret>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
measurement_property: {},
reference: '<string>',
units: '<string>',
facility_id: 'fcl_1G8QT5ZAB1S0XSDW',
manufacturer: '<string>',
model: '<string>',
storage_location_id: 'slc_1F3PMGVC91S0SBK3'
})
};
fetch('https://api.sandbox.isometric.com/mrv/v0/sensors', 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.sandbox.isometric.com/mrv/v0/sensors",
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([
'measurement_property' => [
],
'reference' => '<string>',
'units' => '<string>',
'facility_id' => 'fcl_1G8QT5ZAB1S0XSDW',
'manufacturer' => '<string>',
'model' => '<string>',
'storage_location_id' => 'slc_1F3PMGVC91S0SBK3'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-client-secret: <x-client-secret>"
],
]);
$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.sandbox.isometric.com/mrv/v0/sensors"
payload := strings.NewReader("{\n \"measurement_property\": {},\n \"reference\": \"<string>\",\n \"units\": \"<string>\",\n \"facility_id\": \"fcl_1G8QT5ZAB1S0XSDW\",\n \"manufacturer\": \"<string>\",\n \"model\": \"<string>\",\n \"storage_location_id\": \"slc_1F3PMGVC91S0SBK3\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-client-secret", "<x-client-secret>")
req.Header.Add("Authorization", "Bearer <token>")
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.sandbox.isometric.com/mrv/v0/sensors")
.header("x-client-secret", "<x-client-secret>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"measurement_property\": {},\n \"reference\": \"<string>\",\n \"units\": \"<string>\",\n \"facility_id\": \"fcl_1G8QT5ZAB1S0XSDW\",\n \"manufacturer\": \"<string>\",\n \"model\": \"<string>\",\n \"storage_location_id\": \"slc_1F3PMGVC91S0SBK3\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.isometric.com/mrv/v0/sensors")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-client-secret"] = '<x-client-secret>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"measurement_property\": {},\n \"reference\": \"<string>\",\n \"units\": \"<string>\",\n \"facility_id\": \"fcl_1G8QT5ZAB1S0XSDW\",\n \"manufacturer\": \"<string>\",\n \"model\": \"<string>\",\n \"storage_location_id\": \"slc_1F3PMGVC91S0SBK3\"\n}"
response = http.request(request)
puts response.read_body{
"id": "sns_1GJ82BEMB1S0FBFV",
"manufacturer": "<string>",
"measurement_property": {},
"model": "<string>",
"project_id": "<string>",
"reference": "<string>",
"units": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}Time series data
Post Sensors
Creates a sensor in the Isometric system.
POST
/
sensors
Post Sensors
curl --request POST \
--url https://api.sandbox.isometric.com/mrv/v0/sensors \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-client-secret: <x-client-secret>' \
--data '
{
"measurement_property": {},
"reference": "<string>",
"units": "<string>",
"facility_id": "fcl_1G8QT5ZAB1S0XSDW",
"manufacturer": "<string>",
"model": "<string>",
"storage_location_id": "slc_1F3PMGVC91S0SBK3"
}
'import requests
url = "https://api.sandbox.isometric.com/mrv/v0/sensors"
payload = {
"measurement_property": {},
"reference": "<string>",
"units": "<string>",
"facility_id": "fcl_1G8QT5ZAB1S0XSDW",
"manufacturer": "<string>",
"model": "<string>",
"storage_location_id": "slc_1F3PMGVC91S0SBK3"
}
headers = {
"x-client-secret": "<x-client-secret>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-client-secret': '<x-client-secret>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
measurement_property: {},
reference: '<string>',
units: '<string>',
facility_id: 'fcl_1G8QT5ZAB1S0XSDW',
manufacturer: '<string>',
model: '<string>',
storage_location_id: 'slc_1F3PMGVC91S0SBK3'
})
};
fetch('https://api.sandbox.isometric.com/mrv/v0/sensors', 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.sandbox.isometric.com/mrv/v0/sensors",
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([
'measurement_property' => [
],
'reference' => '<string>',
'units' => '<string>',
'facility_id' => 'fcl_1G8QT5ZAB1S0XSDW',
'manufacturer' => '<string>',
'model' => '<string>',
'storage_location_id' => 'slc_1F3PMGVC91S0SBK3'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-client-secret: <x-client-secret>"
],
]);
$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.sandbox.isometric.com/mrv/v0/sensors"
payload := strings.NewReader("{\n \"measurement_property\": {},\n \"reference\": \"<string>\",\n \"units\": \"<string>\",\n \"facility_id\": \"fcl_1G8QT5ZAB1S0XSDW\",\n \"manufacturer\": \"<string>\",\n \"model\": \"<string>\",\n \"storage_location_id\": \"slc_1F3PMGVC91S0SBK3\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-client-secret", "<x-client-secret>")
req.Header.Add("Authorization", "Bearer <token>")
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.sandbox.isometric.com/mrv/v0/sensors")
.header("x-client-secret", "<x-client-secret>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"measurement_property\": {},\n \"reference\": \"<string>\",\n \"units\": \"<string>\",\n \"facility_id\": \"fcl_1G8QT5ZAB1S0XSDW\",\n \"manufacturer\": \"<string>\",\n \"model\": \"<string>\",\n \"storage_location_id\": \"slc_1F3PMGVC91S0SBK3\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.isometric.com/mrv/v0/sensors")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-client-secret"] = '<x-client-secret>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"measurement_property\": {},\n \"reference\": \"<string>\",\n \"units\": \"<string>\",\n \"facility_id\": \"fcl_1G8QT5ZAB1S0XSDW\",\n \"manufacturer\": \"<string>\",\n \"model\": \"<string>\",\n \"storage_location_id\": \"slc_1F3PMGVC91S0SBK3\"\n}"
response = http.request(request)
puts response.read_body{
"id": "sns_1GJ82BEMB1S0FBFV",
"manufacturer": "<string>",
"measurement_property": {},
"model": "<string>",
"project_id": "<string>",
"reference": "<string>",
"units": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}Authorizations
A JWT Bearer token header for authentication and authorization, in the format Authorization: Bearer <token>
Headers
A secret token identifying the client connecting to the API
Example:
"Syou3EZiO5vuMEgNyBeA8cjEMYOnQDwP"
Body
application/json
The physical quantity this sensor measures
Show child attributes
Show child attributes
What the supplier refers to this sensor by
Maximum string length:
255The units of measurement for this sensor
The facility where the sensor is installed
Required string length:
20 - 37Example:
"fcl_1G8QT5ZAB1S0XSDW"
The manufacturer of the sensor
The model of the sensor
The storage location where the sensor is stored
Required string length:
20 - 37Example:
"slc_1F3PMGVC91S0SBK3"
Response
Successful Response
Required string length:
20 - 37Examples:
"sns_1GJ82BEMB1S0FBFV"
"sns_1CCYZYWFWSBXYG38"
Show child attributes
Show child attributes
Was this page helpful?
⌘I