Push Log Appears to Ignore Id Parameter


#1

According to the documentation (see http://dev.datasift.com/docs/rest-api/pushlog), I should be able to request the log for a single push subscription.

When I issue a query of my usage by subscription id, I get back more than one subscription’s result.

The request I’m issuing (minus my authorization credentials is):
https://api.datasift.com/push/log?id=6e0a1ef9bc925c147d638f2114da33f4&include_finished=1

The response is:
{“count”:18,“log_entries”:[{“message”:“The delivery has completed”,“subscription_id”:“6e0a1ef9bc925c147d638f2114da33f4”,“success”:true,“request_time”:1371965221},{“message”:“Successfully delivered after delivery failure(s)”,“subscription_id”:“6e0a1ef9bc925c147d638f2114da33f4”,“success”:true,“request_time”:1371964722},{“message”:“Successfully delivered after delivery failure(s)”,“subscription_id”:“6e0a1ef9bc925c147d638f2114da33f4”,“success”:true,“request_time”:1371963827},{“message”:“Successfully delivered after delivery failure(s)”,“subscription_id”:“6e0a1ef9bc925c147d638f2114da33f4”,“success”:true,“request_time”:1371960157},{“message”:“Successfully delivered after delivery failure(s)”,“subscription_id”:“6e0a1ef9bc925c147d638f2114da33f4”,“success”:true,“request_time”:1371952838},{“message”:“The endpoint returned a 502 status”,“subscription_id”:“6e0a1ef9bc925c147d638f2114da33f4”,“success”:false,“request_time”:1371952752},{“message”:“Successfully delivered after delivery failure(s)”,“subscription_id”:“6e0a1ef9bc925c147d638f2114da33f4”,“success”:true,“request_time”:1371951441},{“message”:“The endpoint returned a 502 status”,“subscription_id”:“6e0a1ef9bc925c147d638f2114da33f4”,“success”:false,“request_time”:1371951371},{“message”:“Successfully delivered after delivery failure(s)”,“subscription_id”:“6e0a1ef9bc925c147d638f2114da33f4”,“success”:true,“request_time”:1371943901},{“message”:“The endpoint returned a 502 status”,“subscription_id”:“6e0a1ef9bc925c147d638f2114da33f4”,“success”:false,“request_time”:1371943838},{“message”:“Successfully delivered after delivery failure(s)”,“subscription_id”:“6e0a1ef9bc925c147d638f2114da33f4”,“success”:true,“request_time”:1371942826},{“message”:“The endpoint returned a 503 service unavailable status”,“subscription_id”:“6e0a1ef9bc925c147d638f2114da33f4”,“success”:false,“request_time”:1371942765},{“message”:“The endpoint returned a 502 status”,“subscription_id”:“6e0a1ef9bc925c147d638f2114da33f4”,“success”:false,“request_time”:1371942696},{“message”:“Successfully delivered after delivery failure(s)”,“subscription_id”:“6e0a1ef9bc925c147d638f2114da33f4”,“success”:true,“request_time”:1371942272},{“message”:“The endpoint returned a 503 service unavailable status”,“subscription_id”:“6e0a1ef9bc925c147d638f2114da33f4”,“success”:false,“request_time”:1371942210},{“message”:“The endpoint returned a 503 service unavailable status”,“subscription_id”:“6e0a1ef9bc925c147d638f2114da33f4”,“success”:false,“request_time”:1371942151},{“message”:“Successfully delivered after delivery failure(s)”,“subscription_id”:“6e0a1ef9bc925c147d638f2114da33f4”,“success”:true,“request_time”:1371941390},{“message”:“The endpoint returned a 503 service unavailable status”,“subscription_id”:“6e0a1ef9bc925c147d638f2114da33f4”,“success”:false,“request_time”:1371941311}],“success”:true}

Specific questions:

  1. Should the above http request, assuming that the subscription id is valid, return 0 or 1 results instead of many results?
  2. Am I constructing the request incorrectly?
  3. Is something else wrong that I can work around?

#2

Each of these logs have the subscription ID that you specified in your API call. Each log is a separate log related to the same subscription. There does not seem to be anything wrong with your API request, or the response you have received in this example.

Just for clarification, the /push/log endpoint reports errors and warnings that have been logged with you Push subscription, such as being unable to deliver data for whatever reason.

If you are looking for your API usage (i.e. how many interactions you have received for one Push subscription over the last day), you may want to look at the /usage endpoint.