본문으로 건너뛰기

WhaTap Open API v2 (2.0)

Open API v2

프로젝트의 APM 통계 데이터를 조회합니다. 지정한 시간 범위 내에서 서비스별로 집계된 트랜잭션, SQL, HTTP 외부 호출, Exception, Client IP 통계를 반환합니다.

Base URL

  • SaaS: https://api.whatap.io
  • Self-hosted: 배포 환경에 따라 다릅니다 (예: https://{your-domain})

인증

모든 요청에 다음 헤더가 필요합니다.

헤더 타입 설명
x-whatap-token string 프로젝트 API 토큰
x-whatap-pcode string 프로젝트 코드

통계 타입

타입 설명 필터 지원
transaction 트랜잭션(서비스) 통계 -
sql SQL 수행 통계 -
httpc HTTP 외부 호출 통계 host, port
error Exception 통계 -
remote Client IP 통계 -

기본 정렬 순서

order를 생략하면 타입별로 다음 컬럼 기준 내림차순 정렬합니다.

타입 기본 정렬
transaction timeSum
sql timeAvg
httpc timeSum
error count
remote count

제한 사항

항목 설명
최대 시간 범위 24시간 etime - stime은 86,400,000ms를 초과할 수 없습니다.
최대 레코드 수 10,000 서버 설정 open_api_max_records 기본값입니다. 초과 시 total > retrievedTotal로 확인할 수 있습니다.

참고 사항

  • 해시(Hash) 필드는 부호 있는 정수이며 음수일 수 있습니다.
  • 통계는 5분 단위 큐브 데이터에서 집계합니다. 서버가 내부적으로 시간 경계를 정렬합니다.
  • etime이 현재 서버 시간을 초과하면 자동으로 현재 시간으로 보정합니다. 실제 조회 범위가 요청보다 좁을 수 있습니다.
  • totalretrievedTotal보다 크면 최대 레코드 수 제한으로 결과가 잘린 것입니다. 전체 데이터를 조회하려면 시간 범위를 좁혀 주세요.
  • 페이지 번호나 offset을 통한 페이지네이션은 지원하지 않습니다. 결과는 최대 레코드 수까지 단일 페이지로 반환됩니다.

APM 통계 조회

트랜잭션 통계 조회

설정한 시간 동안 발생한 트랜잭션 내역을 조회합니다. 서비스(URL 패턴) 기준으로 집계합니다.

header Parameters
x-whatap-token
required
string

프로젝트 API 토큰

x-whatap-pcode
required
string

프로젝트 코드

Request Body schema: application/json
required
stime
required
integer <int64>

조회 시작 시간입니다. UNIX epoch time(millisecond) 단위입니다.

etime
required
integer <int64>

조회 종료 시간입니다. UNIX epoch time(millisecond) 단위이며, etime - stime은 86,400,000ms(24시간)를 초과할 수 없습니다.

order
string

정렬 기준 컬럼입니다. 생략하면 timeSum 기준 내림차순 정렬합니다.

Responses

Response Schema: application/json
stime
integer

조회 시작 시간(millisecond)

etime
integer

조회 종료 시간(millisecond)

timestamp
integer

서버가 응답을 생성한 시간(millisecond)

Array of objects (TransactionRecord)
total
integer

조건에 일치하는 전체 레코드 수

retrievedTotal
integer

실제 반환된 레코드 수

Request samples

Content type
application/json
{
  • "stime": 1771545600000,
  • "etime": 1771545900000
}

Response samples

Content type
application/json
{
  • "stime": 1771545600000,
  • "etime": 1771545900000,
  • "timestamp": 1772591844544,
  • "data": [
    • {
      }
    ],
  • "total": 1210,
  • "retrievedTotal": 1210
}

SQL 통계 조회

설정한 시간 동안 수행된 SQL 내역을 조회합니다. SQL 문 및 DB Connection 기준으로 집계합니다.

header Parameters
x-whatap-token
required
string

프로젝트 API 토큰

x-whatap-pcode
required
string

프로젝트 코드

Request Body schema: application/json
required
stime
required
integer <int64>

조회 시작 시간입니다. UNIX epoch time(millisecond) 단위입니다.

etime
required
integer <int64>

조회 종료 시간입니다. UNIX epoch time(millisecond) 단위이며, etime - stime은 86,400,000ms(24시간)를 초과할 수 없습니다.

order
string

정렬 기준 컬럼입니다. 생략하면 timeAvg 기준 내림차순 정렬합니다.

Responses

Response Schema: application/json
stime
integer
etime
integer
timestamp
integer
Array of objects (SqlRecord)
total
integer
retrievedTotal
integer

Request samples

Content type
application/json
{
  • "stime": 1771545600000,
  • "etime": 1771545900000
}

Response samples

Content type
application/json
{
  • "stime": 1771545600000,
  • "etime": 1771545900000,
  • "timestamp": 1772591844612,
  • "data": [
    • {
      }
    ],
  • "total": 121,
  • "retrievedTotal": 121
}

HTTP 외부 호출 통계 조회

설정한 시간 동안 발생한 HTTP 외부 호출 내역을 조회합니다. URL 및 호스트 기준으로 집계합니다.

httpc 타입은 호스트와 포트로 필터링할 수 있습니다. 필터를 생략하면 전체 레코드를 반환합니다. 필터를 지정할 경우 hostport모두 포함해야 합니다.

참고 — 필터 적용 시 total 필드는 필터 조건에 일치하는 레코드 수를 반영합니다.

header Parameters
x-whatap-token
required
string

프로젝트 API 토큰

x-whatap-pcode
required
string

프로젝트 코드

Request Body schema: application/json
required
stime
required
integer <int64>

조회 시작 시간(millisecond)

etime
required
integer <int64>

조회 종료 시간(millisecond)

order
string

정렬 기준 컬럼입니다. 생략하면 timeSum 기준 내림차순 정렬합니다.

object

호스트와 포트로 필터링합니다. 지정 시 hostport를 모두 포함해야 합니다.

Responses

Response Schema: application/json
stime
integer
etime
integer
timestamp
integer
Array of objects (HttpcRecord)
total
integer
retrievedTotal
integer

Request samples

Content type
application/json
{
  • "stime": 1771545600000,
  • "etime": 1771545900000,
  • "filter": {
    • "host": "api.example",
    • "port": "443"
    }
}

Response samples

Content type
application/json
{
  • "stime": 1771545600000,
  • "etime": 1771545900000,
  • "timestamp": 1772591844703,
  • "data": [
    • {
      }
    ],
  • "total": 6260,
  • "retrievedTotal": 6260
}

Exception 통계 조회

설정한 시간 동안 발생한 Exception 내역을 조회합니다. Exception 클래스 및 메시지 기준으로 집계합니다.

header Parameters
x-whatap-token
required
string

프로젝트 API 토큰

x-whatap-pcode
required
string

프로젝트 코드

Request Body schema: application/json
required
stime
required
integer <int64>

조회 시작 시간(millisecond)

etime
required
integer <int64>

조회 종료 시간(millisecond)

order
string

정렬 기준 컬럼입니다. 생략하면 count 기준 내림차순 정렬합니다.

Responses

Response Schema: application/json
stime
integer
etime
integer
timestamp
integer
Array of objects (ErrorRecord)
total
integer
retrievedTotal
integer

Request samples

Content type
application/json
{
  • "stime": 1771545600000,
  • "etime": 1771545900000
}

Response samples

Content type
application/json
{
  • "stime": 1771545600000,
  • "etime": 1771545900000,
  • "timestamp": 1772591844811,
  • "data": [
    • {
      }
    ],
  • "total": 1041,
  • "retrievedTotal": 1041
}

Client IP 통계 조회

설정한 시간 동안 접속한 Client IP 통계를 조회합니다. GeoIP 정보를 포함합니다.

header Parameters
x-whatap-token
required
string

프로젝트 API 토큰

x-whatap-pcode
required
string

프로젝트 코드

Request Body schema: application/json
required
stime
required
integer <int64>

조회 시작 시간(millisecond)

etime
required
integer <int64>

조회 종료 시간(millisecond)

order
string

정렬 기준 컬럼입니다. 생략하면 count 기준 내림차순 정렬합니다.

Responses

Response Schema: application/json
stime
integer
etime
integer
timestamp
integer
Array of objects (RemoteRecord)
total
integer
retrievedTotal
integer

Request samples

Content type
application/json
{
  • "stime": 1771545600000,
  • "etime": 1771545900000
}

Response samples

Content type
application/json
{
  • "stime": 1771545600000,
  • "etime": 1771545900000,
  • "timestamp": 1772591844850,
  • "data": [
    • {
      }
    ],
  • "total": 4335,
  • "retrievedTotal": 4335
}