Skip to content

Instantly share code, notes, and snippets.

@JogoShugh
Last active August 29, 2015 14:05
Show Gist options
  • Save JogoShugh/00f07c8e7dce20bbb295 to your computer and use it in GitHub Desktop.
Save JogoShugh/00f07c8e7dce20bbb295 to your computer and use it in GitHub Desktop.
Web API Design notes

Web APIs

  • Should be self-describing
  • Devs want to see examples quickly, not read for hours on end just to figure out basics
  • RPC -> REST -> HATEOAS
  • Avoid dogma of REST vs the world

URI Design

  • Start with nouns, not verbs
  • For collection results, include meta-information about the collection separate from the list of items
  • ETags (Entity Tags)

Non-Resource APIs

  • Example: api/calculateTax?state=GA&total=149.99

REST implementations

Alternatives to REST

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment