REST

As a Web API paradigm


Élie Michel
École normale supérieure

17 November 2014

Contents

1. APIs and Web APIs


2. REST principles


3. Evernest API

APIs and Web APIs

Application Programming Interface

Program to Program Interactions


Building blocks


UI and API

APIs and Web APIs

Born of Web APIs

Web Site


Web Service Web App


Web API

APIs and Web APIs

Web APIs

Endpoints


Format: XML, JSON


Token, Key

APIs and Web APIs

How to write a Web API?


Service Oriented Architecture


Resources Oriented Architecture

REST principles

REpresentational State Transfer

General principles
Not limited to APIs


Hypermedia system architecture
Resources and Relations


Browsing and Interaction
UI and API

REST principles

Flexibility
Client-Server, Layering


Efficiency
Scalable, Stateless, Cachable


Explorability
Self-description, HATEOAS

REST principles

Applied to Web APIs

Based on HTTP


Resource    Endpoint


Hypertext links

Evernest API

Presentation

Resources

EventStreamSource
UserRightUserRight


HTTP, JSON


Multiple Authentication
Sources, User Keys

Evernest API

REST or not REST?

Resource Oriented


Stateless, Data selection, Rate limits


No client-side caching

Evernest API

Should we be RESTful?

Guidelines
No obligation


Trade-off
Between different principles


Integration
In current ecosystem