Toy Service General Specs
Basic structures of the result documents
- status
- This element has the response status as integer.
- message
- This element has the error message. Root element has one if an error occurred.
- result
- This element has the result. The structure of the result is different for each service. Root element has one if the service finished successfully.
- argument
- This element has all available arguments. The structure of the result is different for each service. Root element has one if the service finishes successfully.
- meta
- This element has "name" and "content" attributes and has no element. Root element has not less than zero.
Basic response status
- 200
- Indicating that the service finished successfully.
- 400
- Indicating that the service failed because of wrong parameters.
- 500
- Indicating that the service failed inside the server.
Indivisual specs
The part of spec which is different for each service is as below.
- "result" element is service specific.
- "argument" element is service specific.
- Each service may has additional response status codes.
Response styles
- XML
- The name of the root element is different for each service.
- JSONP
- If "jsonp" parameter is set, JSONP style documents are returned. In this case, there is not named root element. The name of surrounding function is variable along the value of jsonp parameter.
- JSONP
- If "php" parameter is set, PHP style documents are returned. In this case, there is not named root element. The value of php parameter does not affect anything.