Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

General introduction to APIs


Published on

Introduction to APIs and how they might be used in libraries

Published in: Data & Analytics
  • Be the first to comment

  • Be the first to like this

General introduction to APIs

  1. 1. API opportunities A general introduction to APIs and how they might be used at the Watson Library
  2. 2. API opportunities API e.g. Application: Open Library Data Program: “FindIt Catalog” Interaction: Application hosts images. It accepts requests for an image with ISBN match. Program can display the book cover image if the application provided one.
  3. 3. API opportunities Application: Google Books Program: “FindIt Catalog” Interaction: Application hosts book descriptions. It accepts requests for information from programs. Program can display the book information. API e.g.
  4. 4. API opportunities Application: Internet Archive digital collection Program: “FindIt Catalog” Interaction: Application hosts digitized books. It accepts requests from programs. Program can display a link to the digitized book. API e.g.
  5. 5. API opportunities An “API” is a defined interaction between that part of a computer application which accepts requests from other programs and responds by providing some data. Application Program Interface or Application Program Interaction API basics
  6. 6. API opportunities API Technical Stuff Impress your colleagues Just four simple techy things to know about Application Program Interactions
  7. 7. API opportunities In order for a program to interact with an API, it must follow well defined, well documented syntax for making requests. We saw the book cover in the library catalog. That API request looks like this …
  8. 8. API opportunities Secondly, note that the response from the application is data… <breakfast_menu> <food> <name>Belgian Waffles</name> <price>$5.95</price> <description>Two of our famous Belgian Waffles with real maple syrup</description> <calories>650</calories> </food> </breakfast_menu>
  9. 9. API opportunities FoLok or as JSON data … {"request_date":"2017-11-14 15:26:52.195","search_value":[ {"operator":"contains","field":"Index","value":"c"}], "search_type":"search","results": [{"lastName":"Cadmus","displayDate":"1904-1999","index":"C","id":1144,"alphaSort": "Cadmus, Paul","isArtist":1, "firstName":"Paul","displayName": "Paul Cadmus"},{"lastName":"Cain","index":"C","id":2934, "alphaSort":"Cain, David","isArtist":1,"firstName":"David","displayName":"David Cain"},{"lastName":"Calder","displayDate": "(b. 1898, Lawnton, Pennsylvania - d. 1976, New York, New York)","index":"C","id":5616,"nationality": "American", "alphaSort":"Calder, Alexander","isArtist":1,"firstName":"Alexander","displayName":"AlexanderCalder"}], "total_results":125}
  10. 10. API opportunities • Some APIs only accept requests from authorized programs. • In that case you have to register for an “API Key” first. • The “key” is sent as part of the request. …/American/5616/Stella/t4jue8Y#%kwnYT&20171114M API Key
  11. 11. API opportunities Lastly, your program will need to have coding that tells it how to parse the data and do something useful with it … def make_openlib_holding(book): holding = { 'LIBRARY_NAME': 'IA', 'LOCATION_NAME': 'OL’, 'LOCATION_DISPLAY_NAME': 'OL: Open Library’ } if book.keys(): holding['ITEMS'][0]['DISPLAY_CALL_NO'] = book.get('identifiers', {}).get('openlibrary', [])[0] holding[‘DATA = book.get('url', '') return holding
  12. 12. API opportunities @ Watson Benefits of using APIs @ the Watson Library • Help the library / museum staff do their work • Improve usability of our services for library patrons • APIs might be used advocate the value of the library to the museum and the community by providing informative ‘dashboards’
  13. 13. API opportunities Types of info we can get or update from Sierra RETRIEVE ADD or DELETE UPDATE • Bibliographic data • Item data • Order data • Patron data • Checkouts • Fines • Holds @ Watson • Hold data • Patron names • Addresses • Phone numbers • Emails.
  14. 14. API opportunities @ Watson
  15. 15. API opportunities @ Watson
  16. 16. API opportunities Learn about APIs
  17. 17. API opportunities BD Learn about APIs
  18. 18. API opportunities What’s next? • Let’s learn what APIs are offered. • We can network with the Sierra and TMS community of API developers from other libraries • We’ll form a group of library staff to brainstorm ideas – and set priorities for which ones we might try first. • APIs are powerful, and free, let’s use them! Use APIs
  19. 19. API opportunities Questions?
  20. 20. API opportunities Image credits [14] Alma Dashboard Retrieved from [15] LibAnalytics Dashboard Retrieved from [19] To Decide the Question John George Brown (American (born England), Durham 1831–1913 New York) Retrieved from
  21. 21. API opportunities Michael Cummings 516-373-9359 November 2017 Metropolitan Museum of Art Thomas J. Watson Library