Let's Talk APIs
Well...RESTful ones anyway
Andrew Tomaka / @atomaka
What is an API?
-
Application
-
Programming
-
Interface
Let other people use your stuff!
What is RESTful?
-
REpresentational
-
State
-
Transfer
Constraints to create consistent APIs
REST Constraints
- Client-server
- Stateless
- Cacheable
- Layered System
- Code on demand
- Uniform interface
Code on demand: Servers can temporarily extend or customize the functionality of
a client by the transfer of executable code.REST on the Web
- Take a base URI
- Pick a data type (JSON, XML, Atom, etc)
- Use standard HTTP methods
- GET, PUT, POST, DELETE, (and PATCH)
- Use standard HTTP response codes
- 200 OK, 204 No Content, 404 Not Found
Let's Talk APIs
Well...RESTful ones anyway
Andrew Tomaka / @atomaka