If you would like to retrieve info about the current state of your stream, you can make a request to the stats endpoint.
The data returned will include:
pageCount- The number of pages your data will span when paging your data during output.
remaining- The number of bytes you have remaining before hitting your data cap.
used- The number of bytes your stream is currently using.
cap- The current cap setting for your stream in bytes.
Stats are currently available in
JSONP formats, but more formats will be available soon. If you
would like to see a specific stats output format supported, submit an issue on GitHub,
and we will try to make it available.
HTTP Request Examples
Data can be retrieved by using your
PUBLIC_KEY to make a
HTTP GET request for the
FORMAT you would like
returned by the server.
Example Retrieve the stats for a stream in JSON format:
The JSON response would look like this:
Unlike all of the other methods, JSONP responses will always be sent with the
HTTP 200 success code. We respond
this way for the JSONP format because browsers will not parse the response body when the server replies with a HTTP error code.
Example Retrieve the stats for a stream in JSONP format with jQuery:
The JSONP response to this request would look like this: