REST APIs Notes and References

Posted on Sun 12 February 2017 in REST • 1 min read

After working to create a REST API and client recently, here are some notes and resources I found useful. I’ll keep adding to this as I find new info.

General notes

  • Resource collection names should always be plural.

  • Depending on who (client vs server) names resources, creation switches between PUT/POST:

    • client names resources:
      • PUT /kittens/<my_kittens_name> - creates a resource there
    • server names resources:
      • POST /things - Creates a new thing at /things/<autogened_id>, with …

Continue reading

Python REST API Client Adhering to a Swagger Schema

Posted on Sat 11 February 2017 in REST • 3 min read

After building a REST API I left it alone for a while before coming back to try and get a client working properly.

Similar goals here to back then - find a good library to use going forwards that does the heavy lifting and make a simple example project. I chose a simple microservice that provides an API for decks of playing cards - like a casino dealer type of thing - which would be a client of …

Continue reading

Python REST API With SwaggerUI

Posted on Sat 29 October 2016 in REST • 3 min read

What with REST APIs and the swagger framework for documenting and integrating them being the in-thing lately, to start getting to grips with them I wanted to see how easy it would be to create a simple one in Python with minimal code from me. Turns out it was very simple.

As practice project I picked writing a really simple datastore.

Choosing a Package

After looking around for something that provides a SwaggerUI (demo here …

Continue reading