API Daily 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
-
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).
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"
}
]