Skip to content

Commit

Permalink
added documentation about API errors
Browse files Browse the repository at this point in the history
  • Loading branch information
iartarisi committed Sep 21, 2012
1 parent 5be8f75 commit 7c46a9d
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions popcorn/templates/api.html
Expand Up @@ -51,5 +51,21 @@ <h4>Warning!</h4> The API is currently unstable and may change

h3. Errors

Errors set the proper HTTP code and return a message stored in the @error@ field:

pre. $ curl -i --header "Accept: application/json" http://popcorn.opensuse.org/NotFound

pre..
HTTP/1.0 404 NOT FOUND
Content-Type: application/json
Content-Length: 53
Server: Werkzeug/0.8.3 Python/2.7.3
Date: Fri, 21 Sep 2012 13:17:23 GMT

{
"error": "Not Found"
}


{% endfilter %}
{% endblock %}

0 comments on commit 7c46a9d

Please sign in to comment.