Retrieves APM statistics data for a project. Returns transaction, SQL, HTTP external call, Exception, and Client IP statistics aggregated by service within the specified time range.
Base URL
- SaaS:
https://api.whatap.io- Self-hosted: Depends on your deployment environment (e.g.,
https://{your-domain})
All requests require the following headers.
| Header | Type | Description |
|---|---|---|
x-whatap-token |
string | Project API token |
x-whatap-pcode |
string | Project code |
| Type | Description | Filter Support |
|---|---|---|
transaction |
Transaction (service) statistics | - |
sql |
SQL execution statistics | - |
httpc |
HTTP external call statistics | host, port |
error |
Exception statistics | - |
remote |
Client IP statistics | - |
If order is omitted, results are sorted in descending order by the following column for each type.
| Type | Default Sort |
|---|---|
transaction |
timeSum |
sql |
timeAvg |
httpc |
timeSum |
error |
count |
remote |
count |
| Item | Value | Description |
|---|---|---|
| Maximum time range | 24 hours | etime - stime cannot exceed 86,400,000ms. |
| Maximum records | 10,000 | Default value for the server setting open_api_max_records. When exceeded, check total > retrievedTotal. |
etime exceeds the current server time, it is automatically adjusted to the current time. The actual query range may be narrower than requested.total is greater than retrievedTotal, results have been truncated due to the maximum record limit. Narrow the time range to retrieve all data.Retrieves transaction records for the specified time range. Aggregated by service (URL pattern).
| x-whatap-token required | string Project API token |
| x-whatap-pcode required | string Project code |
| stime required | integer <int64> Query start time. In UNIX epoch time (millisecond). |
| etime required | integer <int64> Query end time. In UNIX epoch time (millisecond). |
| order | string Sort column. If omitted, results are sorted by |
| stime | integer Query start time (millisecond) |
| etime | integer Query end time (millisecond) |
| timestamp | integer Server response generation time (millisecond) |
Array of objects (TransactionRecord) | |
| total | integer Total number of records matching the criteria |
| retrievedTotal | integer Number of records actually returned |
{- "stime": 1771545600000,
- "etime": 1771545900000
}{- "stime": 1771545600000,
- "etime": 1771545900000,
- "timestamp": 1772591844544,
- "data": [
- {
- "serviceHash": -72437855,
- "service": "/account/{aa}/{bb}/{cc}",
- "count": 11771,
- "error": 1397,
- "timeAvg": 4498,
- "timeSum": 52946241,
- "timeMin": 66,
- "timeMax": 81126,
- "timeStdev": 10005.8545,
- "sqlCount": 119806,
- "sqlCountAvg": 10,
- "sqlTime": 568833,
- "sqlTimeAvg": 4.75,
- "txSqlTimeAvg": 48.32,
- "sqlFetch": 53339053,
- "sqlFetchAvg": 4531,
- "sqlFetchTime": 626777,
- "sqlFetchTimeAvg": 0.01,
- "txSqlFetchTimeAvg": 53.25,
- "httpcCount": 15897,
- "httpcCountAvg": 1,
- "httpcTime": 35499855,
- "httpcTimeAvg": 2233.12,
- "txHttpcTimeAvg": 3015.87,
- "memAvg": 1047554,
- "cpuAvg": 3,
- "apdexSatisfied": 4003,
- "apdexTolerated": 5310,
- "apdex": 0.5656273893466995
}
], - "total": 1210,
- "retrievedTotal": 1210
}Retrieves SQL execution records for the specified time range. Aggregated by SQL statement and DB Connection.
| x-whatap-token required | string Project API token |
| x-whatap-pcode required | string Project code |
| stime required | integer <int64> Query start time. In UNIX epoch time (millisecond). |
| etime required | integer <int64> Query end time. In UNIX epoch time (millisecond). |
| order | string Sort column. If omitted, results are sorted by |
| stime | integer |
| etime | integer |
| timestamp | integer |
Array of objects (SqlRecord) | |
| total | integer |
| retrievedTotal | integer |
{- "stime": 1771545600000,
- "etime": 1771545900000
}{- "stime": 1771545600000,
- "etime": 1771545900000,
- "timestamp": 1772591844612,
- "data": [
- {
- "sqlHash": -751015470,
- "sql": "insert into emp values(#, '#', '#', null, to_date('#','#'), #, null, #)",
- "dbcHash": -1034994871,
- "db": "jdbc:mysql://localhost:3306/fake",
- "count": 49,
- "error": 0,
- "timeAvg": 107,
- "timeSum": 5265,
- "timeMin": 0,
- "timeMax": 1037,
- "timeStdev": 220.1905,
- "fetchCount": 10190,
- "fetchCountAvg": 207,
- "fetchTime": 144,
- "fetchTimeAvg": 0,
- "serviceHash": -72437855,
- "service": "/account/{aa}/{bb}/{cc}",
- "crudMetrics": "C:[emp]"
}
], - "total": 121,
- "retrievedTotal": 121
}Retrieves HTTP external call records for the specified time range. Aggregated by URL and host.
The httpc type supports filtering by host and port. If the filter is omitted, all records are returned. When specifying a filter, both host and port must be included.
Note — When a filter is applied, the
totalfield reflects the number of records matching the filter criteria.
| x-whatap-token required | string Project API token |
| x-whatap-pcode required | string Project code |
| stime required | integer <int64> Query start time (millisecond) |
| etime required | integer <int64> Query end time (millisecond) |
| order | string Sort column. If omitted, results are sorted by |
object Filters by host and port. Both |
| stime | integer |
| etime | integer |
| timestamp | integer |
Array of objects (HttpcRecord) | |
| total | integer |
| retrievedTotal | integer |
{- "stime": 1771545600000,
- "etime": 1771545900000,
- "filter": {
- "host": "api.example",
- "port": "443"
}
}{- "stime": 1771545600000,
- "etime": 1771545900000,
- "timestamp": 1772591844703,
- "data": [
- {
- "urlHash": 2043925204,
- "url": "/",
- "hostHash": 1225909693,
- "host": "api.example.com:8443",
- "port": 8443,
- "count": 1979,
- "error": 0,
- "timeAvg": 208,
- "timeSum": 412599,
- "timeMin": 151,
- "timeMax": 501,
- "timeStdev": 43.4971,
- "serviceHash": -72437855,
- "service": "/account/{aa}/{bb}/{cc}"
}
], - "total": 6260,
- "retrievedTotal": 6260
}Retrieves Exception records for the specified time range. Aggregated by Exception class and message.
| x-whatap-token required | string Project API token |
| x-whatap-pcode required | string Project code |
| stime required | integer <int64> Query start time (millisecond) |
| etime required | integer <int64> Query end time (millisecond) |
| order | string Sort column. If omitted, results are sorted by |
| stime | integer |
| etime | integer |
| timestamp | integer |
Array of objects (ErrorRecord) | |
| total | integer |
| retrievedTotal | integer |
{- "stime": 1771545600000,
- "etime": 1771545900000
}{- "stime": 1771545600000,
- "etime": 1771545900000,
- "timestamp": 1772591844811,
- "data": [
- {
- "classHash": -694525485,
- "class": "java.io.IOException",
- "msgHash": -737467391,
- "msg": "java.lang.RuntimeException: random exception",
- "errorSnapId": "-4348068476968860657",
- "count": 1258,
- "time": 1771545600000,
- "serviceHash": -72437855,
- "service": "/account/{aa}/{bb}/{cc}",
- "oids": [
- 1474039239,
- -159195572,
- 1430527595
], - "onames": [
- "dev3078112-8090",
- "dev3078114-8091",
- "dev3078116-8093"
], - "okinds": [ ],
- "okindNames": [ ],
- "onodes": [ ],
- "onodeNames": [ ]
}
], - "total": 1041,
- "retrievedTotal": 1041
}Retrieves Client IP statistics for the specified time range. Includes GeoIP information.
| x-whatap-token required | string Project API token |
| x-whatap-pcode required | string Project code |
| stime required | integer <int64> Query start time (millisecond) |
| etime required | integer <int64> Query end time (millisecond) |
| order | string Sort column. If omitted, results are sorted by |
| stime | integer |
| etime | integer |
| timestamp | integer |
Array of objects (RemoteRecord) | |
| total | integer |
| retrievedTotal | integer |
{- "stime": 1771545600000,
- "etime": 1771545900000
}{- "stime": 1771545600000,
- "etime": 1771545900000,
- "timestamp": 1772591844850,
- "data": [
- {
- "ip": "127.115.101.81",
- "country": "-",
- "city": "-",
- "count": 132
}
], - "total": 4335,
- "retrievedTotal": 4335
}