SlideShare una empresa de Scribd logo
1 de 21
API opportunities
A general introduction to APIs
and how they might be used
at the Watson Library
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.
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.
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.
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
API opportunities API Technical Stuff
Impress your colleagues
Just four simple techy things
to know about
Application Program Interactions
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 …
https://covers.openlibrary.org/b/isbn/0300120273-M.jpg
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>
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}
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
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
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’
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.
API opportunities @ Watson
API opportunities @ Watson
API opportunities Learn about APIs
API opportunities
BD
Learn about APIs
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
API opportunities Questions?
API opportunities
Image credits
[14] Alma Dashboard
Retrieved from http://discoveralma.com/classes/819hdh90faspaFJ0aKD9/classes_secure_dashboard_102.html
[15] LibAnalytics Dashboard
Retrieved from https://buzz.springshare.com/springynews/news-26/laninsight
[19] To Decide the Question
John George Brown (American (born England), Durham 1831–1913 New York)
Retrieved from https://www.metmuseum.org/art/collection/search/10241
API opportunities
Michael Cummings
mike.wiganydc@gmail.com
516-373-9359
November 2017
Metropolitan Museum of Art
Thomas J. Watson Library

Más contenido relacionado

Similar a Introduction to APIs

Harnessing Free Content with Web Service APIs
Harnessing Free Content with Web Service APIsHarnessing Free Content with Web Service APIs
Harnessing Free Content with Web Service APIsALATechSource
 
2013 Midwinter Tech Wrapup: Marshall Breeding
2013 Midwinter Tech Wrapup: Marshall Breeding2013 Midwinter Tech Wrapup: Marshall Breeding
2013 Midwinter Tech Wrapup: Marshall BreedingALATechSource
 
ValoBox - Targeting Customers with APIs
ValoBox - Targeting Customers with APIsValoBox - Targeting Customers with APIs
ValoBox - Targeting Customers with APIsValoBox
 
Doing More with Less: Mash Your Way to Productivity
Doing More with Less: Mash Your Way to ProductivityDoing More with Less: Mash Your Way to Productivity
Doing More with Less: Mash Your Way to Productivityguest3c5c731bc
 
Doing More with Less: Mash Your Way to Productivity
Doing More with Less: Mash Your Way to ProductivityDoing More with Less: Mash Your Way to Productivity
Doing More with Less: Mash Your Way to Productivitykevinreiss
 
API Discovery: Visibility, Usability, and Advocacy
API Discovery: Visibility, Usability, and AdvocacyAPI Discovery: Visibility, Usability, and Advocacy
API Discovery: Visibility, Usability, and AdvocacyBill Doerrfeld
 
Moving into API documentation writing
Moving into API documentation writingMoving into API documentation writing
Moving into API documentation writingEllis Pratt
 
Library Mashups: What's New
Library Mashups: What's NewLibrary Mashups: What's New
Library Mashups: What's NewNicole Baratta
 
Library Mashups: What's New
Library Mashups: What's NewLibrary Mashups: What's New
Library Mashups: What's NewNicole Baratta
 
Pundit @ Den Haag
Pundit @ Den HaagPundit @ Den Haag
Pundit @ Den Haagsimonefonda
 
Microservices and the Art of Taming the Dependency Hell Monster
Microservices and the Art of Taming the Dependency Hell MonsterMicroservices and the Art of Taming the Dependency Hell Monster
Microservices and the Art of Taming the Dependency Hell MonsterC4Media
 
The scripting library: Combining data and information in the library
The scripting library: Combining data and information in the libraryThe scripting library: Combining data and information in the library
The scripting library: Combining data and information in the libraryBonaria Biancu
 
A comparative study between commercial and open source discovery tools
A comparative study between commercial and open source discovery toolsA comparative study between commercial and open source discovery tools
A comparative study between commercial and open source discovery toolsSusantaSethi3
 
AALL 2015: Hands on Linked Data Tools for Catalogers: MarcEdit and MARCNext
AALL 2015: Hands on Linked Data Tools for Catalogers: MarcEdit and MARCNextAALL 2015: Hands on Linked Data Tools for Catalogers: MarcEdit and MARCNext
AALL 2015: Hands on Linked Data Tools for Catalogers: MarcEdit and MARCNextTerry Reese
 
A "lofiAPI": Using open source applications and simple XML to build a library...
A "lofiAPI": Using open source applications and simple XML to build a library...A "lofiAPI": Using open source applications and simple XML to build a library...
A "lofiAPI": Using open source applications and simple XML to build a library...jason clark
 

Similar a Introduction to APIs (20)

Harnessing Free Content with Web Service APIs
Harnessing Free Content with Web Service APIsHarnessing Free Content with Web Service APIs
Harnessing Free Content with Web Service APIs
 
Library hacks
Library hacksLibrary hacks
Library hacks
 
2013 Midwinter Tech Wrapup: Marshall Breeding
2013 Midwinter Tech Wrapup: Marshall Breeding2013 Midwinter Tech Wrapup: Marshall Breeding
2013 Midwinter Tech Wrapup: Marshall Breeding
 
Library Mashups
Library MashupsLibrary Mashups
Library Mashups
 
20140220_Cooperation, Cloud, and Consumer Technologies
20140220_Cooperation, Cloud, and Consumer Technologies20140220_Cooperation, Cloud, and Consumer Technologies
20140220_Cooperation, Cloud, and Consumer Technologies
 
ValoBox - Targeting Customers with APIs
ValoBox - Targeting Customers with APIsValoBox - Targeting Customers with APIs
ValoBox - Targeting Customers with APIs
 
Doing More with Less: Mash Your Way to Productivity
Doing More with Less: Mash Your Way to ProductivityDoing More with Less: Mash Your Way to Productivity
Doing More with Less: Mash Your Way to Productivity
 
Doing More with Less: Mash Your Way to Productivity
Doing More with Less: Mash Your Way to ProductivityDoing More with Less: Mash Your Way to Productivity
Doing More with Less: Mash Your Way to Productivity
 
API Discovery: Visibility, Usability, and Advocacy
API Discovery: Visibility, Usability, and AdvocacyAPI Discovery: Visibility, Usability, and Advocacy
API Discovery: Visibility, Usability, and Advocacy
 
Moving into API documentation writing
Moving into API documentation writingMoving into API documentation writing
Moving into API documentation writing
 
Mashups for Libraries
Mashups for LibrariesMashups for Libraries
Mashups for Libraries
 
Library Mashups: What's New
Library Mashups: What's NewLibrary Mashups: What's New
Library Mashups: What's New
 
Library Mashups: What's New
Library Mashups: What's NewLibrary Mashups: What's New
Library Mashups: What's New
 
Pundit @ Den Haag
Pundit @ Den HaagPundit @ Den Haag
Pundit @ Den Haag
 
Microservices and the Art of Taming the Dependency Hell Monster
Microservices and the Art of Taming the Dependency Hell MonsterMicroservices and the Art of Taming the Dependency Hell Monster
Microservices and the Art of Taming the Dependency Hell Monster
 
The scripting library: Combining data and information in the library
The scripting library: Combining data and information in the libraryThe scripting library: Combining data and information in the library
The scripting library: Combining data and information in the library
 
A comparative study between commercial and open source discovery tools
A comparative study between commercial and open source discovery toolsA comparative study between commercial and open source discovery tools
A comparative study between commercial and open source discovery tools
 
AALL 2015: Hands on Linked Data Tools for Catalogers: MarcEdit and MARCNext
AALL 2015: Hands on Linked Data Tools for Catalogers: MarcEdit and MARCNextAALL 2015: Hands on Linked Data Tools for Catalogers: MarcEdit and MARCNext
AALL 2015: Hands on Linked Data Tools for Catalogers: MarcEdit and MARCNext
 
A "lofiAPI": Using open source applications and simple XML to build a library...
A "lofiAPI": Using open source applications and simple XML to build a library...A "lofiAPI": Using open source applications and simple XML to build a library...
A "lofiAPI": Using open source applications and simple XML to build a library...
 
MVS: An angular MVC
MVS: An angular MVCMVS: An angular MVC
MVS: An angular MVC
 

Último

Top profile Call Girls In Vadodara [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Vadodara [ 7014168258 ] Call Me For Genuine Models ...Top profile Call Girls In Vadodara [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Vadodara [ 7014168258 ] Call Me For Genuine Models ...gajnagarg
 
Jodhpur Park | Call Girls in Kolkata Phone No 8005736733 Elite Escort Service...
Jodhpur Park | Call Girls in Kolkata Phone No 8005736733 Elite Escort Service...Jodhpur Park | Call Girls in Kolkata Phone No 8005736733 Elite Escort Service...
Jodhpur Park | Call Girls in Kolkata Phone No 8005736733 Elite Escort Service...HyderabadDolls
 
Reconciling Conflicting Data Curation Actions: Transparency Through Argument...
Reconciling Conflicting Data Curation Actions:  Transparency Through Argument...Reconciling Conflicting Data Curation Actions:  Transparency Through Argument...
Reconciling Conflicting Data Curation Actions: Transparency Through Argument...Bertram Ludäscher
 
怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制
怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制
怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制vexqp
 
Vadodara 💋 Call Girl 7737669865 Call Girls in Vadodara Escort service book now
Vadodara 💋 Call Girl 7737669865 Call Girls in Vadodara Escort service book nowVadodara 💋 Call Girl 7737669865 Call Girls in Vadodara Escort service book now
Vadodara 💋 Call Girl 7737669865 Call Girls in Vadodara Escort service book nowgargpaaro
 
Discover Why Less is More in B2B Research
Discover Why Less is More in B2B ResearchDiscover Why Less is More in B2B Research
Discover Why Less is More in B2B Researchmichael115558
 
Statistics notes ,it includes mean to index numbers
Statistics notes ,it includes mean to index numbersStatistics notes ,it includes mean to index numbers
Statistics notes ,it includes mean to index numberssuginr1
 
Kings of Saudi Arabia, information about them
Kings of Saudi Arabia, information about themKings of Saudi Arabia, information about them
Kings of Saudi Arabia, information about themeitharjee
 
Ranking and Scoring Exercises for Research
Ranking and Scoring Exercises for ResearchRanking and Scoring Exercises for Research
Ranking and Scoring Exercises for ResearchRajesh Mondal
 
Nirala Nagar / Cheap Call Girls In Lucknow Phone No 9548273370 Elite Escort S...
Nirala Nagar / Cheap Call Girls In Lucknow Phone No 9548273370 Elite Escort S...Nirala Nagar / Cheap Call Girls In Lucknow Phone No 9548273370 Elite Escort S...
Nirala Nagar / Cheap Call Girls In Lucknow Phone No 9548273370 Elite Escort S...HyderabadDolls
 
Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...
Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...
Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...nirzagarg
 
Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...nirzagarg
 
Fun all Day Call Girls in Jaipur 9332606886 High Profile Call Girls You Ca...
Fun all Day Call Girls in Jaipur   9332606886  High Profile Call Girls You Ca...Fun all Day Call Girls in Jaipur   9332606886  High Profile Call Girls You Ca...
Fun all Day Call Girls in Jaipur 9332606886 High Profile Call Girls You Ca...kumargunjan9515
 
Dubai Call Girls Peeing O525547819 Call Girls Dubai
Dubai Call Girls Peeing O525547819 Call Girls DubaiDubai Call Girls Peeing O525547819 Call Girls Dubai
Dubai Call Girls Peeing O525547819 Call Girls Dubaikojalkojal131
 
Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...nirzagarg
 
Gartner's Data Analytics Maturity Model.pptx
Gartner's Data Analytics Maturity Model.pptxGartner's Data Analytics Maturity Model.pptx
Gartner's Data Analytics Maturity Model.pptxchadhar227
 
如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样
如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样
如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样wsppdmt
 
Digital Transformation Playbook by Graham Ware
Digital Transformation Playbook by Graham WareDigital Transformation Playbook by Graham Ware
Digital Transformation Playbook by Graham WareGraham Ware
 
20240412-SmartCityIndex-2024-Full-Report.pdf
20240412-SmartCityIndex-2024-Full-Report.pdf20240412-SmartCityIndex-2024-Full-Report.pdf
20240412-SmartCityIndex-2024-Full-Report.pdfkhraisr
 
Charbagh + Female Escorts Service in Lucknow | Starting ₹,5K To @25k with A/C...
Charbagh + Female Escorts Service in Lucknow | Starting ₹,5K To @25k with A/C...Charbagh + Female Escorts Service in Lucknow | Starting ₹,5K To @25k with A/C...
Charbagh + Female Escorts Service in Lucknow | Starting ₹,5K To @25k with A/C...HyderabadDolls
 

Último (20)

Top profile Call Girls In Vadodara [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Vadodara [ 7014168258 ] Call Me For Genuine Models ...Top profile Call Girls In Vadodara [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Vadodara [ 7014168258 ] Call Me For Genuine Models ...
 
Jodhpur Park | Call Girls in Kolkata Phone No 8005736733 Elite Escort Service...
Jodhpur Park | Call Girls in Kolkata Phone No 8005736733 Elite Escort Service...Jodhpur Park | Call Girls in Kolkata Phone No 8005736733 Elite Escort Service...
Jodhpur Park | Call Girls in Kolkata Phone No 8005736733 Elite Escort Service...
 
Reconciling Conflicting Data Curation Actions: Transparency Through Argument...
Reconciling Conflicting Data Curation Actions:  Transparency Through Argument...Reconciling Conflicting Data Curation Actions:  Transparency Through Argument...
Reconciling Conflicting Data Curation Actions: Transparency Through Argument...
 
怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制
怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制
怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制
 
Vadodara 💋 Call Girl 7737669865 Call Girls in Vadodara Escort service book now
Vadodara 💋 Call Girl 7737669865 Call Girls in Vadodara Escort service book nowVadodara 💋 Call Girl 7737669865 Call Girls in Vadodara Escort service book now
Vadodara 💋 Call Girl 7737669865 Call Girls in Vadodara Escort service book now
 
Discover Why Less is More in B2B Research
Discover Why Less is More in B2B ResearchDiscover Why Less is More in B2B Research
Discover Why Less is More in B2B Research
 
Statistics notes ,it includes mean to index numbers
Statistics notes ,it includes mean to index numbersStatistics notes ,it includes mean to index numbers
Statistics notes ,it includes mean to index numbers
 
Kings of Saudi Arabia, information about them
Kings of Saudi Arabia, information about themKings of Saudi Arabia, information about them
Kings of Saudi Arabia, information about them
 
Ranking and Scoring Exercises for Research
Ranking and Scoring Exercises for ResearchRanking and Scoring Exercises for Research
Ranking and Scoring Exercises for Research
 
Nirala Nagar / Cheap Call Girls In Lucknow Phone No 9548273370 Elite Escort S...
Nirala Nagar / Cheap Call Girls In Lucknow Phone No 9548273370 Elite Escort S...Nirala Nagar / Cheap Call Girls In Lucknow Phone No 9548273370 Elite Escort S...
Nirala Nagar / Cheap Call Girls In Lucknow Phone No 9548273370 Elite Escort S...
 
Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...
Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...
Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...
 
Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...
 
Fun all Day Call Girls in Jaipur 9332606886 High Profile Call Girls You Ca...
Fun all Day Call Girls in Jaipur   9332606886  High Profile Call Girls You Ca...Fun all Day Call Girls in Jaipur   9332606886  High Profile Call Girls You Ca...
Fun all Day Call Girls in Jaipur 9332606886 High Profile Call Girls You Ca...
 
Dubai Call Girls Peeing O525547819 Call Girls Dubai
Dubai Call Girls Peeing O525547819 Call Girls DubaiDubai Call Girls Peeing O525547819 Call Girls Dubai
Dubai Call Girls Peeing O525547819 Call Girls Dubai
 
Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...
 
Gartner's Data Analytics Maturity Model.pptx
Gartner's Data Analytics Maturity Model.pptxGartner's Data Analytics Maturity Model.pptx
Gartner's Data Analytics Maturity Model.pptx
 
如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样
如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样
如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样
 
Digital Transformation Playbook by Graham Ware
Digital Transformation Playbook by Graham WareDigital Transformation Playbook by Graham Ware
Digital Transformation Playbook by Graham Ware
 
20240412-SmartCityIndex-2024-Full-Report.pdf
20240412-SmartCityIndex-2024-Full-Report.pdf20240412-SmartCityIndex-2024-Full-Report.pdf
20240412-SmartCityIndex-2024-Full-Report.pdf
 
Charbagh + Female Escorts Service in Lucknow | Starting ₹,5K To @25k with A/C...
Charbagh + Female Escorts Service in Lucknow | Starting ₹,5K To @25k with A/C...Charbagh + Female Escorts Service in Lucknow | Starting ₹,5K To @25k with A/C...
Charbagh + Female Escorts Service in Lucknow | Starting ₹,5K To @25k with A/C...
 

Introduction to APIs

  • 1. API opportunities A general introduction to APIs and how they might be used at the Watson Library
  • 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. 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. 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. 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. API opportunities API Technical Stuff Impress your colleagues Just four simple techy things to know about Application Program Interactions
  • 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 … https://covers.openlibrary.org/b/isbn/0300120273-M.jpg
  • 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. 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. 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. 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. 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. 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.
  • 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
  • 20. API opportunities Image credits [14] Alma Dashboard Retrieved from http://discoveralma.com/classes/819hdh90faspaFJ0aKD9/classes_secure_dashboard_102.html [15] LibAnalytics Dashboard Retrieved from https://buzz.springshare.com/springynews/news-26/laninsight [19] To Decide the Question John George Brown (American (born England), Durham 1831–1913 New York) Retrieved from https://www.metmuseum.org/art/collection/search/10241
  • 21. API opportunities Michael Cummings mike.wiganydc@gmail.com 516-373-9359 November 2017 Metropolitan Museum of Art Thomas J. Watson Library

Notas del editor

  1. A quick story. When I talk to my wife about what I do at the library, I talk a lot about ‘metadata’. Her reaction is ‘no more please!’ One the other hand, she thinks what we have done with APIs is pretty cool. So I hope you will too.
  2. I’ll show you a few examples of APIs in action. These are from the George Washington University library catalog. This first example involves the Open Library. Their application has a treasure trove of book covers. Our library catalog program interacts with their a application. It requests and receives FREE cover images to display.
  3. Another example is the Google books application. Although you can query our catalog program by OCLC number. if we don’t have a match, our program interacts with the Google books application to retrieve and display the books description.
  4. My last example is from the Internet Archive digitized book application. Our catalog program interacts with their application to look for a free digitized copy of a book -- and if one is available we provide a pseudo 'holding’ link. That says Internet Archive Open Library, and there is a button the patron can click to see the book.
  5. You may have noticed I kept saying our program interacts with such and such application? My definition of an API is … I prefer to say interaction because that emphasizes the request and response concept. That’s the basic, general idea.
  6. I want to talk about using API’s at the Watson, library but first I really think there are some general things you should know if you want to have a conversation about API’s. I thought about skipping this part, but its important for your general understanding.
  7. First of all, its not too difficult to have your program start the interaction by requesting data from an application. You just need to be sure to use proper syntax like this example ..
  8. OK, Secondly note that the response from the application is data not fit for human consumption… such an XML data set See what I did here? Belgian waffles definitely fit for consumption. This XML structure? Not so much.
  9. Another typical application response to a request is going to be the “JSON” or javascript object notation like this. The main take away here is that it’s a data stream intended for a program, not a person.
  10. Third, you should be able to use terms like, “We have an API key’. That’s just a code that shows your program is registered, and authorized to interact with the application. WorldCat, OCLC, Summon, I’m sure Sierra, require API keys.
  11. This is the catch. You need to know how to code a program to parse the XML or JSON data and do something with it. This is Python code to add a holding line to the available items that says Open Library.
  12. Is it worth going through the trouble? Here are a few benefits. (see bullet points)
  13. I found out that these are a few things we can retrieve and or update using the sierra api. (see bullet list)
  14. Like I said, I can imagine developing a sort of library ‘dashboard’. Maybe one intended for administrators and library staff.
  15. There could be a ‘public’ version versus a staff version.
  16. There are TMS/ emuseum APIs also …
  17. .and there both the Sierra APIs and TMS APIs are well documented. Not only that, there seems to be a good network of developers sharing what they have done with APIs!
  18. See bullet points
  19. Thank you. Questions?