Upgrade to Pro — share decks privately, control downloads, hide ads and more …

APIs Demystified

APIs Demystified

My first tech talk. I chose to speak on APIs.

NOTE: Slide 7 is missing some information about applications that use API authentication (e.g. Facebook) and others that don't (e.g. PlaceKitten) and why.

Jessica Egoyibo Mong

July 24, 2013
Tweet

Other Decks in Programming

Transcript

  1. What is an API? API stands for Application Programming Interface

    • APIs prevent us as developers from "reinventing the wheel" AKA "No more Facebooks!" • API == Menu
  2. How do APIs work? Authentication!!! API Key ‑ Grants access

    to the API • ‑ Identifies you to the API ‑ Are often long alphanumeric strings Some APIs require authentication using Auth or OAuth •
  3. How do APIs work? Response Response from the server contains

    a 3‑digit status code which begin with 1, 2, 3, 4 or 5: • 2XX = Server says OK!! Everything is fine! e.g. HTTP 200 OK – 4XX = Mistake from Client!!! e.g. 404 "File not found" – 5XX = Server fails and can't respond e.g. HTTP Error 504 –
  4. How do APIs work? Response Body!! XML or JSON? How

    to know what format of response the API returns... • READ DOCUMENTATION!!! – JSON XML
  5. APIs Successfully Demystified!!! <Well> Hopefully!!! </Well> RESOURCES: Codecademy: http://codecademy.com Stack

    Exchange: http://programmers.stackexchange.com/questions/35939/ho w‑do‑web‑apis‑work If you prefer Humans: Liz, Cynthia, Christian, Nick and Nick [Lol]