API Daily History

POST /Api/Read/History

This process returns the daily history details of successful API calls for the past 7 days grouped by remote ip address and endpoint for your API Key. After a week, the history records get merged together by ACL id with no remote IP addres. Secret Hmac Required. Cache Time 30 minutes. Multiple pages possible.

application/json

Body

  • HistoryDays number

    If not passed, this defaults to 7 days of history.

  • HistoryGroup string

    If passed, the query will group the database query.

  • HistoryFields string

    If passed, these fields will be gathered (important for accumulating counts for grouping).

Responses

  • 200 application/json

    API History successfully returned

    Hide response attributes Show response attributes object
    • Date string

      YYYY-MM-DD date that the API call was requested

    • Server_Addr string

      The ipv4 server address.

    • Remote_Addr string

      The ipv4 remote address.

    • Count number

      The number of successful requests for this date

    • CpuTime string

      The total CPU time as text.

    • CpuSeconds number

      The total CPU time in seconds

    • FailCount number

      The number of successful requests for this date

    • LimitTime string

      The total time paused due to limits reached as text.

    • LimitSeconds number

      The total time paused due to limits reached in seconds

    • BandWidth string

      The total bandwidth used by these API calls as text.

    • Bytes number

      The total bandwidth used by these API calls in bytes.

    • Api_Acl number

      The acl id for the call

    • Api_Function string

      the endpoint that was called.

POST /Api/Read/History
curl \
 --request POST 'https://api.wrtm.io/v1.0/Api/Read/History' \
 --header "X-ApiKey: $API_KEY" \
 --header "Authorization: X-apidate $ACCESS_TOKEN" \
 --header "Authorization: X-apihmac $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{"HistoryDays":14,"HistoryGroup":"date,api_function","HistoryFields":"sum(count) count"}'
Request examples
{
  "HistoryDays": 14,
  "HistoryGroup": "date,api_function",
  "HistoryFields": "sum(count) count"
}
Response examples (200)
[
  {
    "Date": "2023-05-16",
    "Bytes": 8497,
    "Count": 9,
    "Api_Acl": 2,
    "CpuTime": "0.417 Seconds",
    "BandWidth": "8.3KB",
    "FailCount": 3,
    "LimitTime": "0 Seconds",
    "CpuSeconds": 0.4169,
    "Remote_Addr": "127.0.0.1",
    "Server_Addr": "127.0.0.1",
    "Api_Function": "api/Read/History",
    "LimitSeconds": 0
  },
  {
    "Date": "2023-05-16",
    "Bytes": 61820,
    "Count": 72,
    "Api_Acl": 2,
    "CpuTime": "2.1 Seconds",
    "BandWidth": "60.4KB",
    "FailCount": 3,
    "LimitTime": "6 Seconds",
    "CpuSeconds": "2.0984,",
    "Remote_Addr": "127.0.0.1",
    "Server_Addr": "127.0.0.1",
    "Api_Function": "api/Read/Limits",
    "LimitSeconds": 5.96
  },
  {
    "Date": "2023-05-16",
    "Bytes": 4049,
    "Count": 72,
    "Api_Acl": 2,
    "CpuTime": "0.229 Seconds",
    "BandWidth": "4.0KB",
    "FailCount": 4,
    "LimitTime": "0 Seconds",
    "CpuSeconds": ".2289,",
    "Remote_Addr": "127.0.0.1",
    "Server_Addr": "127.0.0.1",
    "Api_Function": "api/Read/Log",
    "LimitSeconds": 0
  }
]