Skip to content

Latest commit

 

History

History
33 lines (19 loc) · 1.43 KB

File metadata and controls

33 lines (19 loc) · 1.43 KB
layout page
title 301.08 Reading Notes
permalink /301-R8/

APIs (As described in API Design Best Practices)

  • REST: Representational State Transfer is a web design philosophy rather than a specific technology or language. REST APIs are based upon resources, identifiers, and representations.

    • Resources: Anything accessed by clients (data, services, objects, etc)

    • Identifiers: URIs (uniform resource identifiers) do distinctly key each resource (like URLs for HTTP). URI best practices include relative simplicity (not too many routes in the address) and consistency in naming conventions.

    • Representations: responses to requests made of a given resource (like other data or format changes)

  • APIs should optimize toward meaningful interactions to limit request count and avoid being "chatty"-- that is, making many small requests.

  • REST APIs should use standardized operations-- in the case of HTTP, these operations are GET, POST, PUT, PATCH, and DELETE.

    • Status codes can thus be standardized, like:

      • Successful GET: 200

      • Unsuccessful GET: 404

      • Successful POST: 201

      • Successful DELETE: 204

Things I want to know more about

  • which alternatives to the HTTP system have been tried (at whatever scale) since its adoption? Do any of these conform well to REST principles?