Layar Connect FAQ
Here is a list of frequently asked questions. We provide technical support for the communication between the layer management system and the Layar server. If your questions are not mentioned below, please ask them in devsupport environment, ask a question in the Layar Connect API forum or create a ticket. Please note that we do not provide support on how to build a layer management system.
Is the service case sensitive? Is the service picky about strings vs integers?
[answer]: Yes. Yes.
What is "layer status" exactly, and how does it differ from "layer data"?
[answer]: "Layer status" is a detailed description of the status (Unpublished, Pending approval, etc) that is included in "layer data". It includes all the administration comment history.
There's some binary data (images) associated with layers, such as icons for POIs and an image for the layer catalogue. How will we upload and delete these? Base64-encoded/UUencoded or with separate REST calls that have not been defined yet?
[answer]: The entire request should be formatted as multipart/form-data. This allows for file uploads next to other values.
Will you support partial updates for the layer data and layer status calls or will any update call overwrite all previous data, i.e. each call needs to include ALL data that needs to be retained after the call?
[answer]: Partial updates are the default for layer data.
What will be the result of a failed call (4xx response)? Specifically, do you guarantee that any request will be handled either completely or not at all, or, is there a chance that legal changes get applied while illegal changes are dropped?
[answer]: Before committing changes, the API will check all incoming data. The complete request will fail if one of the elements is invalid. If the response indicates success, all changes have been applied.
The spec now lists PUT for "layer status" update and "layer data" update, and POST for layer creation. I would actually expect the reverse, POST for updates and PUT for creation. Also, in my experience using POST for anything is fine too. Can you elaborate why you chose to do it like this?
[answer]: RESTful PUT is used for updates, POST for new entries.