WhaTap Open API
수집 중인 모니터링 정보를 추출하여 별도로 활용하고자 하는 경우 Open API를 통해 해당 정보를 추출할 수 있는 기능을 제공합니다. 계정 API 토큰 및 프로젝트 API 토큰, 프로젝트 코드를 파라미터로 전달하여 수집된 정보를 획득할 수 있습니다.
구 버전의 Open API 문서는 다음 문서를 참조하세요.
토큰은 계정 API 토큰과 프로젝트 API 토큰으로 구분됩니다. 계정 API 토큰은 프로젝트의 목록 정보를 취득하기 위한 용도로, 프로젝트 API 토큰은 프로젝트의 모니터링 정보를 취득하기 위한 용도로 활용합니다.
프로젝트 코드는 프로젝트 진입 시 브라우저 화면 상단의 윈도우 또는 탭 제목에 '[{프로젝트 코드}]
Cloud Application Monitoring'와 같이 표시되는 정보를 통해 확인할 수 있습니다. API 토큰을 변경하려면 각 화면의 재발급 또는 토큰 재발급 버튼을 선택하세요.
구분 | 키 | 설정값 | 비교 |
---|---|---|---|
헤더 | x-whatap-token |
API토큰 | 계정 API토큰 |
헤더 | x-whatap-token |
API토큰 | 프로젝트 API토큰 |
헤더 | x-whatap-pcode |
프로젝트 코드 | 화면 윈도우 또는 브라우저 탭 타이틀 확인 |
계정 토큰 확인하기
화면의 오른쪽 위에 프로필 아이콘을 선택하세요.
팝업 메뉴가 나타나면 계정 관리 버튼을 선택하세요.
화면을 아래로 스크롤해 API토큰 섹션으로 이동하세요.
프로젝트 토큰 확인하기
홈 화면에서 프로젝트를 선택하세요.
프로젝트 진입 후 왼쪽에 관리 > 프로젝트 관리 메뉴를 선택하세요.
API토큰 항목을 확인하세요.
프로젝트 목록 조회
프로젝트 목록을 조회하는 API입니다.
header Parameters
x-whatap-token required | string 계정 API 토큰 {{ACCOUNT_API_TOKEN}} |
Responses
Response Schema: application/json
Array of objects | |
accountEmail | string 사용자 계정 이메일 주소 |
total | integer 프로젝트 수 |
Request samples
- curl
curl -L \ -w "\n" \ -H "x-whatap-token: {{ACCOUNT_API_TOKEN}}" \ "https://api.whatap.io/open/api/json/projects"
Response samples
- 200
{- "data": [
- {
- "groupName": "",
- "projectCode": 35,
- "projectName": "APM_TEST2",
- "createTime": "2018-10-19T07:17:03.774",
- "status": "subscribe",
- "productType": "APM",
- "platform": "JAVA",
- "gatewayName": "LOCAL",
- "apiToken": "5**********************R"
}
], - "accountEmail": "xxx@whatap.io",
- "total": 6
}
프로젝트 정보 조회
애플리케이션 및 서버 상품의 프로젝트 정보를 조회하는 API입니다.
header Parameters
x-whatap-token required | string 프로젝트 API 토큰 {{PROJECT_API_TOKEN}} |
x-whatap-pcode required | string 프로젝트 코드 {{projectCode} |
Responses
Response Schema: application/json
platform | string 애플리케이션 상품 플랫폼 |
createTime | string 프로젝트 생성 날짜 |
gatewayName | string 데이터 서버 지역 |
projectCode | number 프로젝트 코드 |
status | string Enum: "pending" "trial" "subscribe" "close_pending" "limited" "closed" "trial_limited" 프로젝트 상태 |
lastUpdatedTime | string 프로젝트 수정 날짜 |
name | string 프로젝트 이름 |
productType | string 애플리케이션 상품 유형 |
Request samples
- curl
curl -L \ -w "\n" \ -H "x-whatap-token: {{PROJECT_API_TOKEN}}" \ -H "x-whatap-pcode: {{projectCode}}" \ "https://api.whatap.io/open/api/json/project"
Response samples
- 200
{- "platform": "JAVA",
- "createTime": "Tue Sep 18 08:34:27 GMT 2018",
- "gatewayName": "Office-OTE",
- "projectCode": 1234,
- "status": "Subscribe",
- "lastUpdatedTime": "Tue Sep 18 08:34:34 GMT 2018",
- "name": "SEO_APM",
- "productType": "APM"
}
프로젝트 멤버 목록 조회
프로젝트에 소속된 멤버 목록을 조회하는 API입니다.
path Parameters
projectCode required | integer 프로젝트 코드 |
header Parameters
x-whatap-token required | string 계정 API 토큰 {{ACCOUNT_API_TOKEN}} |
Responses
Response Schema: application/json
Array of objects | |
total | integer 프로젝트 멤버 수 |
Request samples
- curl
curl -L \ -w "\n" \ -H "x-whatap-token: {{ACCOUNT_API_TOKEN}}" \ "https://api.whatap.io/open/api/json/project/{projectCode}/members"
Response samples
- 200
{- "data": [
- {
- "email": "honggildong@whatap.io",
- "name": "홍길동",
- "desc": "",
- "sms": "010XXXXXXX"
}
], - "totla": 8
}
그룹 목록 조회
사용자가 소속된 그룹 목록을 조회하는 API입니다.
header Parameters
x-whatap-token required | string 계정 API 토큰 {{ACCOUNT_API_TOKEN}} |
Responses
Response Schema: application/json
Array of objects | |
total | integer 그룹 수 |
Request samples
- curl
curl -L \ -w "\n" \ -H "x-whatap-token: {{ACCOUNT_API_TOKEN}}" \ "https://api.whatap.io/open/api/v2/json/groups"
Response samples
- 200
{- "data": [
- {
- "groupName": "WHATAP APM",
- "groupKey": "grp****ab123kskd*****q",
- "description": "APM Group"
}
], - "total": 3
}
그룹 멤버 목록 조회
사용자가 소속된 그룹의 멤버 목록을 조회하는 API입니다.
path Parameters
groupKey required | integer 그룹 고유 식별자(ID) |
header Parameters
x-whatap-token required | string 계정 API 토큰 {{ACCOUNT_API_TOKEN}} |
Responses
Response Schema: application/json
Array of objects | |
total | integer 그룹 멤버 수 |
Request samples
- curl
curl -L \ -w "\n" \ -H "x-whatap-token: {{ACCOUNT_API_TOKEN}}" \ "https://api.whatap.io/open/api/json/group/{groupKey}/members"
Response samples
- 200
{- "data": [
- {
- "email": "honggildong@whatap.io",
- "name": "홍길동",
- "desc": "",
- "sms": "010XXXXXXX"
}
], - "totla": 8
}
그룹에 포함된 프로젝트 조회
그룹에 포함된 프로젝트들의 메타정보를 조회하는 API입니다.
path Parameters
groupKey required | integer 그룹 고유 식별자(ID) |
header Parameters
x-whatap-token required | string 계정 API 토큰 {{ACCOUNT_API_TOKEN}} |
Responses
Response Schema: application/json
Array of objects | |||||||||||||
Array
|
Request samples
- curl
curl -L \ -w "\n" \ -H "x-whatap-token: {{ACCOUNT_API_TOKEN}}" \ "https://api.whatap.io/open/api/json/group/{groupKey}/projects"
Response samples
- 200
{- "data": [
- {
- "projectCode": 35,
- "name": "APM_TEST2",
- "status": "Subscribe",
- "productType": "APM",
- "platform": "JAVA",
- "gatewayName": "LOCAL"
}
]
}
에이전트 상태 및 호스트 IP 조회
프로젝트 내 에어전트의 상태 및 IP 주소를 조회하는 API입니다.
header Parameters
x-whatap-token required | string 프로젝트 API 토큰 {{PROJECT_API_TOKEN}} |
x-whatap-pcode required | string 프로젝트 코드 {{projectCode} |
Responses
Response Schema: application/json
Array of objects | |||||||
Array
|
Request samples
- curl
curl -L \ -w "\n" \ -H "x-whatap-token: {{PROJECT_API_TOKEN}}" \ -H "x-whatap-pcode: {{projectCode}}" \ "https://api.whatap.io/open/json/agents"
Response samples
- 200
{- "data": [
- {
- "host_ip": "127.0.0.1",
- "oname": "TC-29-96-8082",
- "active": true
}
]
}
oid 목록 호출
사용자가 조회를 원하는 시간 동안 활성화된 에이전트 정보를 조회할 수 있는 API입니다. 조회 시간(stime
, etime
)은 하루로 제한되며, 시간 단위는 ms(millisecond, ms)입니다.
예시에서 작성된 샘플 코드 중 stime
, etime
파라미터 값은 사용자 환경에 맞게 변경해 사용하세요. 파라미터 값은 다양한 포맷으로 변경해 요청할 수 있습니다.
- 1693475430087 (unix timestamp)
yyyyMMddHHmmss
yyyyMMddHHmm
MMddHHmmss
MMddHHmm
header Parameters
x-whatap-token required | string 프로젝트 API 토큰 {{PROJECT_API_TOKEN}} |
x-whatap-pcode required | string 프로젝트 코드 {{projectCode} |
Request Body schema: application/jsonrequired
stime | integer <int64> 조회 시작 시간(UNIX epoch time, millisecond) |
etime | integer <int64> 조회 종료 시간(UNIX epoch time, millisecond) |
Responses
Response Schema: application/json
stime | integer <int64> 조회 시작 시간(UNIX epoch time, millisecond) |
etime | integer <int64> 조회 종료 시간(UNIX epoch time, millisecond) |
timestamp | integer <int64> 데이터 생성 시간(UNIX epoch time, millisecond) |
Array of objects |
Request samples
- Payload
- curl
{- "stime": 1690850183000,
- "etime": 1693321200000
}
Response samples
- 200
{- "stime": 1690850183000,
- "etime": 1693321200000,
- "timestamp": 1693388196965,
- "data": [
- {
- "oid": 757639646,
- "oname": "DBX-0-107-3306",
- "alias": "",
- "initial": "",
- "otype": "database",
- "subtype": "0",
- "active": false,
- "okind": 0,
- "okindName": "",
- "onode": 0,
- "onodeName": "",
- "ip": "",
- "agent.version": "",
- "cpuCores": 0
}
]
}
모든 정보 조회
애플리케이션 모니터링 프로젝트의 모든 정보를 조회하는 API입니다.
header Parameters
x-whatap-token required | string 프로젝트 API 토큰 {{PROJECT_API_TOKEN}} |
x-whatap-pcode required | string 프로젝트 코드 {{projectCode} |
Responses
Response Schema: application/json
pcode | integer 프로젝트 코드 |
act_agent | string 활성화 상태의 에이전트 수 |
inact_agent | string 비활성화 상태의 에이전트 수 |
host | string 호스트(HOST) 수 |
cpucore | string 호스트의 CPU 코어 수 합계 |
txcount | string 트랜잭션 갯수 |
tps | string TPS |
user | string 액티브 사용자(5분) |
actx | string 액티브 트랜잭션 |
rtime | string 평균 응답시간(ms) |
cpu | string 평균 CPU 사용률(%) |
threadpool_active | string 스레드풀 활성 스레드 수 |
threadpool_queue | string 스레드풀 큐잉 스레드 수 |
dbconn_total | string 전체 DB Connection 수 |
dbconn_act | string 활성(Active) 상태의 DB Connection 수 |
dbconn_idle | string 유휴(Idle) 상태의 DB Connection 수 |
act_method | string 활성 메소드(Method) 수 |
act_sql | string 활성 SQL 수 |
act_httpc | string 활성 HTTP Call 수 |
act_dbc | string 활성 데이터베이스 커넥션 수 |
act_socket | string 활성 소켓(Socket) 연결 수 |
apdex | string Apdex(Application Performance Index, 애플리케이션의 사용자 만족도) |
Request samples
- curl
curl -L \ -w "\n" \ -H "x-whatap-token: {{PROJECT_API_TOKEN}}" \ -H "x-whatap-pcode: {{projectCode}}" \ "https://api.whatap.io/open/api/json/spot"
Response samples
- 200
{- "pcode": 8,
- "act_agent": "6",
- "inact_agent": "6",
- "host": "1",
- "cpucore": "2",
- "txcount": "459",
- "tps": "93.07",
- "user": "1007",
- "actx": "149",
- "rtime": "1873",
- "cpu": "29.35",
- "threadpool_active": "0",
- "threadpool_queue": "0",
- "dbconn_total": "600.0",
- "dbconn_act": "239.0",
- "dbconn_idle": "361.0",
- "act_method": "51",
- "act_sql": "24",
- "act_httpc": "64",
- "act_dbc": "10",
- "act_socket": "0",
- "apdex": "0.9871"
}
활성화 상태의 에이전트 수 조회
애플리케이션 모니터링 프로젝트에서 활성화 상태의 에이전트 수를 조회할 수 있는 API입니다.
header Parameters
x-whatap-token required | string 프로젝트 API 토큰 {{PROJECT_API_TOKEN}} |
x-whatap-pcode required | string 프로젝트 코드 {{projectCode} |
Responses
Response Schema: text/plain
활성화 상태의 에이전트 수
Request samples
- curl
curl -L \ -w "\n" \ -H "x-whatap-token: {{PROJECT_API_TOKEN}}" \ -H "x-whatap-pcode: {{projectCode}}" \ "https://api.whatap.io/open/api/act_agent"
Response samples
- 200
5
비활성화 상태의 에이전트 수 조회
애플리케이션 모니터링 프로젝트에서 비활성화 상태의 에이전트 수를 조회할 수 있는 API입니다.
header Parameters
x-whatap-token required | string 프로젝트 API 토큰 {{PROJECT_API_TOKEN}} |
x-whatap-pcode required | string 프로젝트 코드 {{projectCode} |
Responses
Response Schema: text/plain
비활성화 상태의 에이전트 수
Request samples
- curl
curl -L \ -w "\n" \ -H "x-whatap-token: {{PROJECT_API_TOKEN}}" \ -H "x-whatap-pcode: {{projectCode}}" \ "https://api.whatap.io/open/api/inact_agent"
Response samples
- 200
2
호스트(HOST) 수
애플리케이션 모니터링 프로젝트와 연결된 호스트(HOST) 수를 조회할 수 있는 API입니다.
header Parameters
x-whatap-token required | string 프로젝트 API 토큰 {{PROJECT_API_TOKEN}} |
x-whatap-pcode required | string 프로젝트 코드 {{projectCode} |
Responses
Response Schema: text/plain
호스트(HOST) 개수
Request samples
- curl
curl -L \ -w "\n" \ -H "x-whatap-token: {{PROJECT_API_TOKEN}}" \ -H "x-whatap-pcode: {{projectCode}}" \ "https://api.whatap.io/open/api/host"
Response samples
- 200
5