Source: http://negativespace.co/photos/computer-and-notebook/

How to write a piece of art REST API

Keep a uniformed interface

/users/223/addresses 
/user_list 
GET /users
/users 
/users/223

Use HTTP verbs

GET /users
GET /users/223
PUT /users/223
POST /users
DELETE /users/223

Return meaningful responses

{
"metadata": {
"resultset": {
"count": 1225,
"offset": 100,
"limit": 25
}
},
"results": []
}

Go stateless

Version your API

yourdomain.com/api/v1/users

Write the docs

Software engineer and web enthusiast. Co-founder of https://adevait.com, global community of remote developers.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store