I’m just beginning the implementation of my Web Service for passbook.
In the docs I see there’s an optional endpoint for logs, but don’t understand what uses/consumes this endpoint?
As far as I can tell, it’s only used by humans who wish to check the logs.
For clarity, Apple’s docs say the logs should be accessible via a
POST request to webServiceURL /version /log
but I can’t see why we couldn’t use a GET request to webServiceURL/version/myAppsLogs
According to the specification, Passbook will POST a JSON document to your logging endpoint. GET wouldn’t allow submitting data. This JSON document will only have one key “logs” which is an array of strings. You need to respond only with an HTTP 200 status.
A sample communication would look like this:
POST /yourwebServiceURL/v1/log HTTP/1.1 Host: yourserver Content-Type: application/json Content-Length: 83 { "logs" : [ "log message 1", "log message 2", "log message n" ] } HTTP/1.1 200 OK Connection: Close