Rest examples

Your authentication token is d7a63348-02b7-46ae-bdbe-8d8254bfbda0. Reload the page for a new token.

List all chairs

    curl -H "Authentication: d7a63348-02b7-46ae-bdbe-8d8254bfbda0" \
         http://py4web.bakunin.s7g.org.uk/showcase/rest/chair

Create a new chair record

    curl -X POST \
         -d '{"color":"red"}' \
         -H "Content-Type: application/json" \
         -H "Authentication: d7a63348-02b7-46ae-bdbe-8d8254bfbda0" \
         http://py4web.bakunin.s7g.org.uk/showcase/rest/chair

Retrieve chair with id=1

    curl -H "Authentication: d7a63348-02b7-46ae-bdbe-8d8254bfbda0" \
         http://py4web.bakunin.s7g.org.uk/showcase/rest/chair/1

Update chair with id=1

    curl -X PUT \
         -d '{"color":"green"}' \
         -H "Content-Type: application/json" \
         -H "Authentication: d7a63348-02b7-46ae-bdbe-8d8254bfbda0" \
         http://py4web.bakunin.s7g.org.uk/showcase/rest/chair/1

Delete chair with id=1

    curl -X DELETE \
         -H "Authentication: d7a63348-02b7-46ae-bdbe-8d8254bfbda0" \
         http://py4web.bakunin.s7g.org.uk/showcase/rest/chair/1