API Notes - BKJackson/BKJackson_Wiki GitHub Wiki

OpenAPI (swagger)

Basics

POST : add new content
PUT: update existing content
GET: download content
DELETE: remove content

Recipes for Productionising Data Science APIs

What Is OpenAPI?
OpenAPI Specification (formerly Swagger Specification) is an API description format for REST APIs. An OpenAPI file allows you to describe your entire API. API specifications can be written in YAML or JSON. The format is easy to learn and readable to both humans and machines.

Swagger
Swagger is a set of open-source tools built around the OpenAPI Specification that can help you design, build, document and consume REST APIs.

Why Use OpenAPI?
The ability of APIs to describe their own structure is the root of all awesomeness in OpenAPI. Once written, an OpenAPI specification and Swagger tools can drive your API development further in various ways.

Basic OpenAPI file structure - Tip: use YAML

OpenAPI File & Multipart Uploads

OpenAPI (formerly SwaggerHub)

SwaggerHub
SwaggerHub is an online platform where you can design your REST APIs – be it public APIs, internal private APIs or microservices. The core principle behind SwaggerHub is Design First, Code Later. That is, you start by laying out your API, its resources, operations and data models, and once the design is complete you implement the business logic.

API definitions are written in the OpenAPI format (formerly known as Swagger). They are saved in the SwaggerHub cloud and can be synchronized with external systems like GitHub or Amazon API Gateway. You can also collaborate with your team on SwaggerHub, and maintain multiple versions of APIs as it evolves.

Implementing a Plugin Architecture in a Python Application

REST APIs

Guiding Principles of REST
REST API Tutorial: REST Resource Naming Guide
Flask-RESTful - an extension for Flask that adds support for quickly building REST APIs. It is a lightweight abstraction that works with your existing ORM/libraries. Flask-RESTful encourages best practices with minimal setup. If you are familiar with Flask, Flask-RESTful should be easy to pick up.