Results
The Appspotimage service aims to provide a fast and easy to process response, so in case that no problem is found during the processing, the responses will have Status 200 Ok and the image or image identifier (depending on the request) without any tagging nor xml formatting.
The following example shows a successful request after a request of an image identifier:
HTTP/1.0 200 OK
Content-Type: text/html
Content-Length: 135
http://appspotimage.appspot.com/image/agxpbWFnZXR3ZWFrZXJyDQsSB1BpY3R1cmUYNgw
For requests of images (not identifiers) the same status code is returned and the image as unique element in the body of the request:
HTTP/1.0 200 OK
Content-Type: image/png
Content-Length: 6453
agxpbWFnZXR3ZWFrZXJyDQsSB1BpY3R1cmUYNgwagxpbWFnZXR3ZWFrZXJyDQsSB1BpY3R1cmUYNgwagxpbWFnZXR3ZWFrZXJyDQsSB1BpY3R1cmUYNgwagxpbWFnZXR3ZWFrZXJyDQsSB1BpY3R1cmUYNgwagxpbWFnZXR3ZWFrZXJyDQsSB1BpY3R1cmUYNgwagxpbWFnZXR3ZWFrZXJyDQsSB1BpY3R1cmUYNgwagxpbWFnZXR3ZWFrZXJyDQsSB1BpY3R1cmUYNgwagxpbWFnZXR3ZWFrZXJyDQsSB1BpY3R1cmUYNgw
In case of error, an specific error code is issued and a response body is returned in xml format tagging a single element error with and attribute id containing a unique string identifier of the error. The content of this element is a human-readable English description of the error.
These are all possible error identifiers and their meanings:
| Identifier | Status Code | Meaning |
| appspotimage.invalid_key | 403 Forbidden | authentication key is not valid |
| appspotimage.usage_exceeded | 403 Forbidden | The usage of the API has reached the permitted limit |
| appspotimage.invalid_image | 400 Bad Request | The image provided is too big or corrupt |
| appspotimage.not_found | 404 Not Found | The image requested has not been found |
| appspotimage.invalid_encoding | 400 Bad Request | The indicated encoding is not supported, valid encodings are PNG and JPEG |
| appspotimage.invalid_parameters | 400 Bad Request | The indicated parameters to manipulate the image are not valid |
| system.other | 500 Internal Server Error | An unexpected error in the web service has happened |
This is an example of error response:
<?xml version="1.0" encoding="utf-8" ?>
<error id="invalid_image">The image provided is too big or corrupt</error>

