Retrieving API statistics
This endpoint allows you to retrieve statistics about the usage of Account API for a specified time period.
POST https://api.linkedapi.io/account/stats.getUsage
Body
{
"start": "2023-01-01T00:00:00Z",
"end": "2023-01-31T23:59:59Z"
}
start
– timestamp from which the statistics will be retrieved.end
– timestamp up to which the statistics will be retrieved.
The difference between
start
and end
must not exceed 30 days.Response
{
"status": "complete",
"completion": [
{
"endpoint": "connections.checkStatus",
"resultHandling": "long",
"status": "complete",
"dataItemsCount": 25,
"errorItemsCount": 3
},
{
"endpoint": "messages.send",
"resultHandling": "hook",
"status": "error",
"dataItemsCount": null,
"errorItemsCount": null
},
{
"endpoint": "connections.getOutgoing",
"resultHandling": "reslink",
"status": "processing",
"dataItemsCount": 50,
"errorItemsCount": 5
}
]
}
endpoint
– endpoint for which the request was made.resultHandling
– result-handling option used for the request. Enum values:long
– long polling.reslink
– result link.hook
– webhook.
status
– status of the request execution. Enum values:complete
– request is complete.processing
– request is still processing.error
– request encountered an error.
dataItemsCount
– number of successfully processed items (success: true
) in array requests. Returnsnull
if the request is not array-based.errorItemsCount
– number of unsuccessfully processed items (success: false
) in array requests. Returnsnull
if the request is not array-based.
Throughout the documentation, for simplicity, only the request body and final response (when status is
complete
) are shown. Consider possible global errors and result handling options for proper implementation.