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.

Body

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

  • If passed, the query will group the database query.

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

Responses

  • API History successfully returned

    Hide response attributes Show response attributes array[object]
    • Date string

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

    • The ipv4 server address.

    • The ipv4 remote address.

    • Count number

      The number of successful requests for this date

    • CpuTime string

      The total CPU time as text.

    • The total CPU time in seconds

    • The number of successful requests for this date

    • The total time paused due to limits reached as text.

    • The total time paused due to limits reached in seconds

    • 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

    • the endpoint that was called.

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