마이크 수정
마이크 ID로 특정 마이크 장치 정보를 수정합니다.
마지막 업데이트: 2026년 3월 26일
PATCH
/api/v1/mics/{mic_id}설명
마이크 ID를 기준으로 특정 마이크 장치 정보를 수정하는 API입니다. 마이크 장치 객체를 참고하면 관련 구조를 자세히 확인할 수 있습니다.
인증
Access Token은 Bearer 토큰 인증 방식으로 전달해야 합니다.
자세한 내용은 인증 문서를 참고해 주세요.
경로 파라미터
mic_id
Required
string
마이크 장치의 고유 식별자
요청 본문
요청 본문 파라미터
name
Optional
string
장치의 새 이름
host
Optional
string
장치의 새 호스트 주소
(예: "192.168.1.100")location
Optional
object
새 위치 정보
status
Optional
enum
장치의 새 상태.
active 또는 inactive 값을 사용할 수 있습니다.Enum Values:
active
inactive
thresholds
Optional
object
여러 음향 이벤트에 대한 감지 임계값입니다. 각 threshold는 key-value 쌍이며, 값은 0과 1 사이의 숫자입니다.
응답
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"
}
}요청 예제
장치 이름 수정
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();장치 위치 수정
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();장치 임계값 수정
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();