background preloader


Facebook Twitter

Best Practices for Designing a Pragmatic RESTful API. Your data model has started to stabilize and you're in a position to create a public API for your web app.

Best Practices for Designing a Pragmatic RESTful API

You realize it's hard to make significant changes to your API once it's released and want to get as much right as possible up front. Now, the internet has no shortage on opinions on API design. But, since there's no one widely adopted standard that works in all cases, you're left with a bunch of choices: What formats should you accept? How should you authenticate?

Should your API be versioned? In designing an API for Enchant (a Zendesk Alternative), I've tried to come up with pragmatic answers to these questions. ... or just skip to the bottom and signup for updates Latest from the Enchant blog How to make your app lovable A decent app helps you get the job done. ... and those apps, the ones that make things feel effortless, are the ones we love the most.

But what makes an app feel effortless? Key requirements for the API Use RESTful URLs and actions. Easy APIs Without Authentication – Terence Eden's Blog. This is a curated list of APIs which do not require usernames, passwords, access tokens, signing, accept-headers, or anything more complicated than sticking a URL in a browser.

Easy APIs Without Authentication – Terence Eden's Blog

(This is an update to my post from two years ago.) When I introduce people to the concept of using RESTful APIs, they immediately get how powerful it is to retrieve information from the Internet and then manipulate it in software. I used to give Twitter and Flickr as examples - they're both fairly well known and have interesting content. The only problem is that both require authentication.

I'm an adult with two decades of programming experience and I still find OAuth-dances tricky! So, here's a list of APIs which don't require any authentication. Pokemon API / Star Wars API The inimitable Paul Hallett has created these two marvellous resources. Both are great fun to play with and have excellent documentation. Wikipedia. 10 Best Practices for Writing Node.js REST APIs. In this article we cover best practices for writing Node.js REST APIs, including topics like naming your routes, authentication, black-box testing & using proper cache headers for these resources.

10 Best Practices for Writing Node.js REST APIs

One of the most popular use-cases for Node.js is to write RESTful APIs using it. Still, while we help our customers to find issues in their applications with Trace, our Node.js monitoring tool we constantly experience that developers have a lot of problems with REST APIs. I hope these best-practices we use at RisingStack can help: #1 - Use HTTP Methods & API Routes Imagine, that you are building a Node.js RESTful API for creating, updating, retrieving or deleting users. As a best practice, your API routes should always use nouns as resource identifiers. POST /user or PUT /user:/id to create a new user,GET /user to retrieve a list of users,GET /user/:id to retrieve a user,PATCH /user/:id to modify an existing user record,DELETE /user/:id to remove a user. #2 - Use HTTP Status Codes Correctly Restify.

The Real-time Web in REST Services at IMVU. By Jon Watte, VP Technology @ IMVU IMVU has built a rich, graph-shaped REST (REpresentational State Transfer) API (Application Programming Interface) to our data.

The Real-time Web in REST Services at IMVU

This data includes a full social network, as well as e-commerce, virtual currencies, and the biggest 3D user generated content catalog in the world. This post discusses how IMVU addresses two of the bigger draw-backs of REST-based service architectures for real-time interactive content: Cache Invalidation (where users want to know about new data as soon as it becomes available,) and Request Chattiness (where request latency kills your performance.) Cache Invalidation REST principles like cacheability and hypertext-based documents work great for exposing data to a variety of clients (desktop, web, and mobile,) but runs into trouble when it meets the expectation of real-time interaction.

At 10:03 am, Bob logs in and the client application fetches the profile information about his friend Alice. Request Chattiness (Latency) 1 to 1 relationships and subresources in REST APIs. For the past few years I have advocated best practices for building REST APIs and I spent a lot of time building reasonably well designed examples to help demonstrate it.

1 to 1 relationships and subresources in REST APIs

I learned that building REST APIs from the ground up isn't hard at all because you have no legacy or technical debt to work with, so of course everything is going to work well and be praised for being RESTful. Building RESTful apis for well established projects is a lot trickier but also a lot more exciting. In January we started replacing our old JSON RPC-style API with a brand new REST-like API. "Great! " I said, "This is exactly the type of job I want! " During this (still on-going) rebuild I encountered a few interesting design problems that I had to overcome.