Queue new sensor settings
const url = 'http://localhost:80/PhantomService.svc/saveSettings';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"phantomType":11,"phantomCode":189247628,"IntervalSendData":60,"Range":16,"IntervalRMS":30,"alarm1":6.4,"alarm2":8.6,"alarm3":10}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://localhost:80/PhantomService.svc/saveSettings \ --header 'Content-Type: application/json' \ --data '{ "phantomType": 11, "phantomCode": 189247628, "IntervalSendData": 60, "Range": 16, "IntervalRMS": 30, "alarm1": 6.4, "alarm2": 8.6, "alarm3": 10 }'Writes settings to a JSON file. The sensor picks them up the next time it asks for its configuration, not immediately.
Only triaxial, biaxial and General Purpose vibration sensors accept
settings; anything else returns status 506.
Request Bodyrequired
Section titled “Request Bodyrequired”object
Sensor type code. See the Sensor types page for the full table.
Sensor serial number. ⚠️ Aquí es ENTERO, mientras que en UpdateConfig el mismo dato es una cadena.
Minutes between full data sends. Minimum 10 (status 503).
Sensor range in G. Invalid values return status 502.
Seconds between alarm checks. Minimum 30 (status 504).
Alarm threshold in mm/s. Minimum 0.5 (status 505).
Alarm threshold in mm/s. Minimum 0.5 (status 505).
Alarm threshold in mm/s. Minimum 0.5 (status 505).
Example
{ "phantomType": 11, "phantomCode": 189247628, "IntervalSendData": 60, "Range": 16, "IntervalRMS": 30, "alarm1": 6.4, "alarm2": 8.6, "alarm3": 10}Responses
Section titled “Responses”The outcome of the operation.
The Key half of every response envelope.
object
0 means OK. See the Status codes page.
object
Example
{ "Description": "OK"}