Smartocto Insights API: Responses and Rate Limiting

Response


All endpoints provide a response in JSON format. The response is paginated. Use the "limit" parameter to control the number of items on one page. The maximum is 10.000. Each response has a "paging" section that provides a URL to the next page. Also, in each request, you can specify the exact page using the "page" parameter.


Whether or not a request succeeded is indicated by the standard HTTP status code (200, 401, 500 etc.).


Some endpoints can provide a response in CSV format. This is controlled by "format" parameter. CSV format doesn’t have pagination nor limit.

Example response

{
"success" : true,
"data" : {
"articles_number" : 19,
"article_reads" : 245733,
"social_actions" : 32182,
"attention_minutes" : 31100488,
"articles_number_trend" : 0,
"article_reads_trend" : 0,
"social_actions_trend" : 0,
"attention_minutes_trend" : 0,
"article_read_devices" : {
"desktop" : 33,
"tablet" : 0,
"mobile" : 64,
"other" : 3
},
"attention_minutes_devices" : {
"desktop" : 33,
"tablet" : 0,
"mobile" : 64,
"other" : 3
}
}
}

 

Rate Limiting


Requests should be spaced by at least 330ms (around 200 per minute). If you go over the limit, you will get 503 HTTP error. If that happens you should wait a minute and try again.