집계 미터 수정
curl --request PUT \
--url https://meterengine.com/v1/billable-metrics/{code} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"aggregation": "<string>",
"event_type": "<string>",
"name": "<string>",
"dimension_properties": [
"<string>"
],
"percentile": 123,
"rounding_mode": "<string>",
"rounding_precision": 6,
"target_property": "<string>",
"unit_size": 123
}
'const url = 'https://meterengine.com/v1/billable-metrics/{code}';
const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
aggregation: '<string>',
event_type: '<string>',
name: '<string>',
dimension_properties: ['<string>'],
percentile: 123,
rounding_mode: '<string>',
rounding_precision: 6,
target_property: '<string>',
unit_size: 123
})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));{
"active_from": "<string>",
"aggregation": "<string>",
"archived_at": "2023-11-07T05:31:56Z",
"code": "<string>",
"dimension_properties": [
"<string>"
],
"event_type": "<string>",
"inactive_from": "<string>",
"name": "<string>",
"percentile": 123,
"rounding_mode": "<string>",
"rounding_precision": 123,
"target_property": "<string>",
"unit_size": 123,
"version": 123
}{
"code": "validation_error",
"message": "서버 내부 오류입니다",
"errors": [
{
"field": "event_type",
"message": "공백일 수 없습니다"
}
]
}{
"code": "validation_error",
"message": "서버 내부 오류입니다",
"errors": [
{
"field": "event_type",
"message": "공백일 수 없습니다"
}
]
}{
"code": "validation_error",
"message": "서버 내부 오류입니다",
"errors": [
{
"field": "event_type",
"message": "공백일 수 없습니다"
}
]
}{
"code": "validation_error",
"message": "서버 내부 오류입니다",
"errors": [
{
"field": "event_type",
"message": "공백일 수 없습니다"
}
]
}{
"code": "validation_error",
"message": "서버 내부 오류입니다",
"errors": [
{
"field": "event_type",
"message": "공백일 수 없습니다"
}
]
}{
"code": "validation_error",
"message": "서버 내부 오류입니다",
"errors": [
{
"field": "event_type",
"message": "공백일 수 없습니다"
}
]
}미터
집계 미터 수정
미터를 요청 값으로 덮어쓰고 바뀐 미터를 돌려준다. code는 바꿀 수 없다. 현재 event_type의 이벤트가 한 건이라도 있으면 이름만 바꿀 수 있다. 집계, 대상 속성, 차원, 단위, 반올림, 백분위 변경은 409다.
PUT
/
v1
/
billable-metrics
/
{code}
집계 미터 수정
curl --request PUT \
--url https://meterengine.com/v1/billable-metrics/{code} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"aggregation": "<string>",
"event_type": "<string>",
"name": "<string>",
"dimension_properties": [
"<string>"
],
"percentile": 123,
"rounding_mode": "<string>",
"rounding_precision": 6,
"target_property": "<string>",
"unit_size": 123
}
'const url = 'https://meterengine.com/v1/billable-metrics/{code}';
const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
aggregation: '<string>',
event_type: '<string>',
name: '<string>',
dimension_properties: ['<string>'],
percentile: 123,
rounding_mode: '<string>',
rounding_precision: 6,
target_property: '<string>',
unit_size: 123
})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));{
"active_from": "<string>",
"aggregation": "<string>",
"archived_at": "2023-11-07T05:31:56Z",
"code": "<string>",
"dimension_properties": [
"<string>"
],
"event_type": "<string>",
"inactive_from": "<string>",
"name": "<string>",
"percentile": 123,
"rounding_mode": "<string>",
"rounding_precision": 123,
"target_property": "<string>",
"unit_size": 123,
"version": 123
}{
"code": "validation_error",
"message": "서버 내부 오류입니다",
"errors": [
{
"field": "event_type",
"message": "공백일 수 없습니다"
}
]
}{
"code": "validation_error",
"message": "서버 내부 오류입니다",
"errors": [
{
"field": "event_type",
"message": "공백일 수 없습니다"
}
]
}{
"code": "validation_error",
"message": "서버 내부 오류입니다",
"errors": [
{
"field": "event_type",
"message": "공백일 수 없습니다"
}
]
}{
"code": "validation_error",
"message": "서버 내부 오류입니다",
"errors": [
{
"field": "event_type",
"message": "공백일 수 없습니다"
}
]
}{
"code": "validation_error",
"message": "서버 내부 오류입니다",
"errors": [
{
"field": "event_type",
"message": "공백일 수 없습니다"
}
]
}{
"code": "validation_error",
"message": "서버 내부 오류입니다",
"errors": [
{
"field": "event_type",
"message": "공백일 수 없습니다"
}
]
}인증
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
헤더
경로 매개변수
고칠 미터의 code.
본문
application/json
Minimum string length:
1Minimum string length:
1Minimum string length:
1단가를 가르는 이벤트 속성 키. 속성에 따라 단가가 갈리지 않으면 빈 배열
percentile 집계에서만 지정하는 백분위 0~100
단위 변환 후 반올림: none, ceil, floor, round. 기본값은 none
반올림할 소수 자릿수 0~12. 기본값은 0
필수 범위:
0 <= x <= 12집계량을 나눌 양수 단위. 기본값은 1
응답
바뀐 미터
단가를 가르는 이벤트 속성 키. 속성에 따라 단가가 갈리지 않으면 빈 배열