~/talk

Building Better Web APIs with Rails

Talkat Ancient City Ruby 2015 · 2015-03-25..03-27· [ruby, api-design]
slides:none on file

Five concrete practices for APIs on Rails: keep routes expressive but route filtered endpoints to focused controllers instead of fat project controllers; serialize with jbuilder or ActiveModelSerializers (JSON:API) or Roar; push long work to background jobs and return ActiveJob perform_later with HTTP 202, not 200; use token auth via authenticate_or_request_with_http_token and SecureRandom.uuid for tokens; and cover status codes, mime types and auth with small integration tests (minitest) and curl checks.

AI-written summary · about

  1. 0:00Introduction
  2. 1:46Scenario
  3. 5:22Routes
  4. 7:24Projects
  5. 12:06Content Negotiation
  6. 15:03JSON API
  7. 19:11Status Code
  8. 20:04Report Generation
  9. 21:28Active Job
  10. 22:55Status
  11. 23:38Authentication
  12. 24:46API Token
  13. 26:00Token Authentication
  14. 26:57UUID
  15. 27:57ActiveRecordCallback
  16. 30:40Semantic Versioning
  17. 31:15Versioning Services
  18. 34:08Removing Resources
  19. 36:14Integration Tests
  20. 36:29Listing Tests
  21. 38:29Authentication Access Rules
  22. 39:55Code School
  23. 40:30Podcasts
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.