버전을 확인한 미터 수정
curl --request PATCH \
--url https://meterengine.com/v1/billable-metrics/{code} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'If-Match: <if-match>' \
--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: 'PATCH',
headers: {
'If-Match': '<if-match>',
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": "공백일 수 없습니다"
}
]
}미터
버전을 확인한 미터 수정
조회한 version을 큰따옴표로 감싼 If-Match 헤더가 필수다. 다른 요청이 먼저 수정했으면 409다. PUT과 같은 전체 필드를 보낸다.
PATCH
/
v1
/
billable-metrics
/
{code}
버전을 확인한 미터 수정
curl --request PATCH \
--url https://meterengine.com/v1/billable-metrics/{code} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'If-Match: <if-match>' \
--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: 'PATCH',
headers: {
'If-Match': '<if-match>',
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.
헤더
경로 매개변수
본문
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
응답
바뀐 미터
단가를 가르는 이벤트 속성 키. 속성에 따라 단가가 갈리지 않으면 빈 배열