Szenzorsablon módosítása.
PATCH
/v1/sensor-templates/{template_id}
const url = 'https://api.signalguard.hu/v1/sensor-templates/example';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"template_id":1,"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 PATCH \ --url https://api.signalguard.hu/v1/sensor-templates/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "template_id": 1, "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/update_sensor_template (= az azonos nevű MCP tool).
Authorizations
Szekció neve “Authorizations”Parameters
Szekció neve “Parameters”Path Parameters
Szekció neve “Path Parameters”template_id
required
string
Request Body
Szekció neve “Request Body”Media typeapplication/json
object
template_id
required
integer
label
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
{ "template_id": 1, "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 }