Új szenzorsablon létrehozása.
POST
/v1/sensor-templates
const url = 'https://api.signalguard.hu/v1/sensor-templates';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"organisation_id":"example","label":"example","description":"example","unit":"example","default_sui":"example","icon_id":1,"color_id":1,"sensor_order":1,"has_history":true,"history_size":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.signalguard.hu/v1/sensor-templates \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "organisation_id": "example", "label": "example", "description": "example", "unit": "example", "default_sui": "example", "icon_id": 1, "color_id": 1, "sensor_order": 1, "has_history": true, "history_size": 1 }'Jelleg: író. Minden művelet a hívó kulcs jogosultságaival fut. Egyenértékű műveleti alak: POST /v1/ops/create_sensor_template (= az azonos nevű MCP tool).
Authorizations
Szekció neve “Authorizations”Request Body
Szekció neve “Request Body”Media typeapplication/json
object
organisation_id
required
A szervezet azonosítója
string
label
required
Címke (megjelenített név)
string
description
Név / leírás
string
unit
Mértékegység
string
default_sui
Alapértelmezett SUI
string
icon_id
integer
color_id
integer
sensor_order
integer
has_history
boolean
history_size
integer
Examplegenerated
{ "organisation_id": "example", "label": "example", "description": "example", "unit": "example", "default_sui": "example", "icon_id": 1, "color_id": 1, "sensor_order": 1, "has_history": true, "history_size": 1}Responses
Szekció neve “Responses”Siker — { ok: true, result }