Új eszköztípus létrehozása, opcionálisan szenzorsablon-hozzárendelésekkel.
POST
/v1/device-types
const url = 'https://api.signalguard.hu/v1/device-types';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"organisation_id":"example","name":"example","version":"example","show_mainsensor":true,"alarmed_flag":true,"icon_id":1,"color_id":1,"template_ids":[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/device-types \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "organisation_id": "example", "name": "example", "version": "example", "show_mainsensor": true, "alarmed_flag": true, "icon_id": 1, "color_id": 1, "template_ids": [ 1 ] }'Jelleg: író. Minden művelet a hívó kulcs jogosultságaival fut. Egyenértékű műveleti alak: POST /v1/ops/create_device_type (= 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
name
required
string
version
required
Verzió, pl. 1.0
string
show_mainsensor
boolean
alarmed_flag
boolean
icon_id
integer
color_id
integer
template_ids
Hozzárendelendő szenzorsablonok
Array<integer>
Examplegenerated
{ "organisation_id": "example", "name": "example", "version": "example", "show_mainsensor": true, "alarmed_flag": true, "icon_id": 1, "color_id": 1, "template_ids": [ 1 ]}Responses
Szekció neve “Responses”Siker — { ok: true, result }