curl --request GET \
--url https://meterengine.com/v1/events \
--header 'Authorization: Bearer <token>'const url = 'https://meterengine.com/v1/events';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));{
"events": [
{
"actor_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"actor_type": "<string>",
"customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customer_name": "<string>",
"occurred_at": "2023-11-07T05:31:56Z",
"properties": {},
"received_at": "2023-11-07T05:31:56Z",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"transaction_id": "<string>",
"type": "<string>"
}
],
"from": "2023-11-07T05:31:56Z",
"month": "<string>",
"page": 123,
"size": 123,
"to": "2023-11-07T05:31:56Z",
"total": 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": "공백일 수 없습니다"
}
]
}사용량 이벤트 조회
지정한 달의 이벤트를 occurred_at 최신순으로 한 페이지씩 돌려준다. occurred_at이 같으면 transaction_id 내림차순이다. 기간은 KST 기준의 달이다. occurred_at 2026-08-31T23:59:59+09:00 이벤트는 8월에, 2026-09-01T00:00:00+09:00 이벤트는 9월에 든다. 사용량 조회와 기준이 같다. customer_id, month, type을 함께 주면 모두 만족하는 이벤트만 나오고, total은 조건을 적용한 뒤의 건수다. from과 to를 함께 주면 월 대신 자유 기간을 조회한다. 시작은 포함하고 종료 시각은 제외한다. 날짜만 준 to는 그 날짜의 하루 전체를 포함한다. 시간대 없는 날짜와 시각은 KST다. q는 transaction_id, 고객 이름과 외부 ID의 부분 검색이다. properties는 JSON 객체의 값이 포함된 이벤트를 찾는다. from과 to는 함께 주어야 하고 month와 같이 쓸 수 없다. 인보이스 검색은 한쪽만 주거나 month와 함께 줄 수 있어 규칙이 다르다. 모르는 조회 조건은 무시한다. 내보내기, 월 목록, 이벤트 문제와 수집 거절 검색은 모르는 조회 조건을 400으로 거절한다. properties는 저장된 값 그대로다. 키 순서와 공백은 보낸 것과 다를 수 있고, 숫자 자릿수는 그대로다.
curl --request GET \
--url https://meterengine.com/v1/events \
--header 'Authorization: Bearer <token>'const url = 'https://meterengine.com/v1/events';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));{
"events": [
{
"actor_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"actor_type": "<string>",
"customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customer_name": "<string>",
"occurred_at": "2023-11-07T05:31:56Z",
"properties": {},
"received_at": "2023-11-07T05:31:56Z",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"transaction_id": "<string>",
"type": "<string>"
}
],
"from": "2023-11-07T05:31:56Z",
"month": "<string>",
"page": 123,
"size": 123,
"to": "2023-11-07T05:31:56Z",
"total": 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": "공백일 수 없습니다"
}
]
}인증
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
쿼리 매개변수
0부터 세는 페이지 번호.
x >= 0한 페이지에 담을 개수.
1 <= x <= 100고객을 좁힌다. 생략하면 모든 고객이 대상이다.
조회할 달(yyyy-MM, KST). 생략하면 이번 달이다.
이벤트 type을 좁힌다. 어느 미터의 event_type도 아닌 값이어도 저장된 이벤트는 조회된다.
64645124044096