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.
{
"data": {
"id": "string",
"name": "string",
"edge_id": "string",
"location": {
"latitude": -90,
"longitude": -180
},
"status": "active",
"thresholds": {
"string": 0.5
},
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}
}
const response = await fetch('https://openapi.deeplyinc.com/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('https://openapi.deeplyinc.com/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('https://openapi.deeplyinc.com/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();
Unique identifier of the microphone device
New name for the device
New host for the device (e.g. "192.168.1.100")
New location information
New status for the device. Could be active
or inactive
Detection threshold values for various sound events. Each threshold is a key-value pair where the value is a number between 0 and 1.