Rest APIs: best practice

As the Internet matures, REST (representational state transfer) APIs are emerging as the most reliable design pattern for web APIs. An API is described as RESTful if it follows these guiding principles:

  • The API is designed as a set of resources. For instance, the GitHub API provides information about users, repositories, followers, etc. Each user, or repository, is a specific resource. Each resource can be addressed through a different HTTP end-point.
  • The URLs should be simple and should identify the resource clearly. For instance, api.github.com/users/odersky is simple and tells us clearly that we should expect information about the user Martin Odersky.
  • There is no world resource that contains all the information about the ...

Get Scala: Guide for Data Science Professionals now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.