Archived Version: v2026.02
You are viewing an archived reference version.
Update A Mic Device
Update information for a specific microphone device by its ID
Last updated: January 1, 1980
PATCH
/api/v1/mics/{mic_id}Description
API to update information for a specific microphone device by its ID. Refer to the Mic Device Object for more details.
Authentication
Access Token is required via Bearer token authentication.
Refer to the Authentication section for more details.
Path Parameters
mic_id
Required
string
Unique identifier of the microphone device
Request Body
Request Body Parameters
name
Optional
string
New name for the device
host
Optional
string
New host for the device (e.g. "192.168.1.100")
location
Optional
object
New location information
status
Optional
enum
New status for the device. Could be
active or inactiveEnum Values:
active
inactive
thresholds
Optional
object
Detection threshold values for various sound events. Each threshold is a key-value pair where the value is a number between 0 and 1.
Response
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
{
"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"
}
}Request Examples
Update Device Name
1
2
3
4
5
6
7
8
9
10
11
12
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();Update Device Location
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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();Update Device Thresholds
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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();