Hackability, part 2: The role of APIs in a hackable world

Hackability, part 2: The role of APIs in a hackable world

API Strategy & Practice Conference 2014, Amsterdam

Fcafc7eab67d34d48b14f9d70bc05713?s=128

Adam Wiggins

March 28, 2014
Tweet

Transcript

  1. Hackability the role of APIs in a hackable world Adam

    Wiggins API Strategy & Practice March 2014 Donnerstag, 3. April 14
  2. I’m Adam Wiggins (@hirodusk) Donnerstag, 3. April 14

  3. Donnerstag, 3. April 14

  4. Donnerstag, 3. April 14

  5. Donnerstag, 3. April 14

  6. Donnerstag, 3. April 14

  7. What is “hackability” and why does it matter? Donnerstag, 3.

    April 14
  8. the ability to modify behavior of the tools and devices

    we use — at any level of depth hack·a·bil·i·ty noun Donnerstag, 3. April 14
  9. Donnerstag, 3. April 14

  10. Donnerstag, 3. April 14

  11. “computer” Donnerstag, 3. April 14

  12. Hackability is decreasing in modern computing Donnerstag, 3. April 14

  13. This is a loss, because... Donnerstag, 3. April 14

  14. ‣Kids learning to program Donnerstag, 3. April 14

  15. ‣Transparency into the tech we use Donnerstag, 3. April 14

  16. ‣Introspect and command the computing devices that we use to

    run our lives Donnerstag, 3. April 14
  17. Now, specifics (and how all this relates to APIs) Donnerstag,

    3. April 14
  18. Hackability for devices & internet of things Donnerstag, 3. April

    14
  19. https://twitter.com/tomdale/status/424368289666433027 Donnerstag, 3. April 14

  20. “Smart” devices already surround us Donnerstag, 3. April 14

  21. Donnerstag, 3. April 14

  22. $ nmap 192.168.1.0/24 Donnerstag, 3. April 14

  23. Donnerstag, 3. April 14

  24. Donnerstag, 3. April 14

  25. Donnerstag, 3. April 14

  26. Donnerstag, 3. April 14

  27. Donnerstag, 3. April 14

  28. ! Donnerstag, 3. April 14

  29. How can I introspect & command the devices that fill

    my home? Donnerstag, 3. April 14
  30. Hackability for devices: Donnerstag, 3. April 14

  31. Hackability for devices: open source? Donnerstag, 3. April 14

  32. This program is free software; you can redistribute it and/or

    modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, 5th Floor, Boston, MA 02110-1301, USA. Donnerstag, 3. April 14
  33. I actually want the self-contained box Donnerstag, 3. April 14

  34. Hackability for devices: Donnerstag, 3. April 14

  35. Hackability for devices: APIs! Donnerstag, 3. April 14

  36. Surveying devices for hackability via API Donnerstag, 3. April 14

  37. Device API hackability report card criteria ‣Standards-based (HTTP, REST...) ‣Developer

    site (developers.foo.com) ‣Documentation ‣Sample code ‣The curl test ‣Support / forums / community Donnerstag, 3. April 14
  38. Insteon D http://www.leftovercode.info/smartlinc.php Device API hackability report card HTTP+hex encoded

    responses Reverse engineered http://www.smarthome.com/forum/topic.asp?TOPIC_ID=13762 Donnerstag, 3. April 14
  39. WeMo C+ http://www.issackelly.com/blog/2012/08/04/wemo-api-hacking/ Device API hackability report card HTTP+SOAP+UPnP Reverse

    engineered https://ifttt.com/wemo_switch Donnerstag, 3. April 14
  40. Nest B- https://nest.com/developer/ Device API hackability report card HTTP/REST Private

    beta / registration https://github.com/gboudreau/nest-api Donnerstag, 3. April 14
  41. Sonos F http://www.front2backdev.com/2013/02/07/hacking-my-sonos/ Device API hackability report card HTTP/SOAP/XML Reverse

    engineered http://musicpartners.sonos.com/?q=node/21 Donnerstag, 3. April 14
  42. Roku A- http://sdkdocs.roku.com/display/sdkdoc/External+Control+Guide Device API hackability report card HTTP/REST Supported

    & documented Donnerstag, 3. April 14
  43. Donnerstag, 3. April 14

  44. The curl test Donnerstag, 3. April 14

  45. $ curl http://192.168.1.110:8060/query/apps <apps> <app id="12" version="3.1.6014">Netflix</app> <app id="13" version="4.10.13">Amazon

    Instant Video</app> <app id="2016" version="3.2.7">Crackle</app> <app id="2285" version="2.7.6">Hulu Plus</app> <app id="13842" version="1.3.2">VUDU</app> <app id="28" version="3.1.7">Pandora</app> </apps> Donnerstag, 3. April 14
  46. Hackability for the cloud: Donnerstag, 3. April 14

  47. Donnerstag, 3. April 14

  48. Donnerstag, 3. April 14

  49. Hackability for the cloud: open source? Donnerstag, 3. April 14

  50. Hackability for the cloud: APIs! Donnerstag, 3. April 14

  51. B2C cloud API example: Donnerstag, 3. April 14

  52. B2C cloud API example: Facebook Donnerstag, 3. April 14

  53. Donnerstag, 3. April 14

  54. $ curl https://graph.facebook.com/me Donnerstag, 3. April 14

  55. Donnerstag, 3. April 14

  56. B2D cloud API example: Donnerstag, 3. April 14

  57. B2D cloud API example: Heroku Donnerstag, 3. April 14

  58. “using” vs. “hacking” Donnerstag, 3. April 14

  59. Donnerstag, 3. April 14

  60. $ heroku create Creating young-fire-2556... done $ git push heroku

    master -----> Heroku receiving push -----> Python app detected -----> Discovering process types Procfile declares types -> web -----> Compiled slug size is 3.5MB -----> Launching... done, v2 http://baz.herokuapp.com deployed Donnerstag, 3. April 14
  61. Donnerstag, 3. April 14

  62. Donnerstag, 3. April 14

  63. $ curl -n https://api.heroku.com/apps Donnerstag, 3. April 14

  64. Conclusion Donnerstag, 3. April 14

  65. Hackability is empowerment, freedom, and taps humanity’s wells of creativity

    Donnerstag, 3. April 14
  66. APIs are a key piece of the puzzle for hackability

    of devices & cloud Donnerstag, 3. April 14
  67. APIs encourage us to tinker take control automate Donnerstag, 3.

    April 14
  68. Hackability in your product ? Donnerstag, 3. April 14

  69. the end Adam Wiggins @hirodusk http://about.adamwiggins.com/ Donnerstag, 3. April 14