Update information for a specific microphone device by its ID
/api/v1/mics/{mic_id}API to update information for a specific microphone device by its ID. Refer to the Mic Device Object for more details.
Access Token is required via Bearer token authentication.
Refer to the Authentication section for more details.
active or inactivesound_level_ge (0 to 100) and confidence_ge (0 to 1). Send only the values you want to change. Out-of-range values return 422, and event types the device does not support return 400.{
"data": {
"id": "string",
"name": "string",
"host": "string",
"edge_id": "string",
"status": "enum(active | inactive)",
"thresholds": {
"breathing_heavily": {
"sound_level_ge": 65,
"confidence": 0.8
},
"[event_category]": {
"sound_level_ge": 65,
"confidence": 0.8
}
},
"location": {
"latitude": -90,
"longitude": -180
},
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}
}const response = await fetch('http://{{EDGE_IP}}:8100/api/v1/mics/mic_123', {
method: 'PATCH',
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"name": "New Device Name"
})
});
const data = await response.json();const response = await fetch('http://{{EDGE_IP}}:8100/api/v1/mics/mic_123', {
method: 'PATCH',
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"location": {
"latitude": 37.5665,
"longitude": 126.978
}
})
});
const data = await response.json();const response = await fetch('http://{{EDGE_IP}}:8100/api/v1/mics/mic_123', {
method: 'PATCH',
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"thresholds": {
"screem_male": 0.5,
"screem_female": 0.31,
"breathing_heavily": 0.2
}
})
});
const data = await response.json();