Download presentation
Presentation is loading. Please wait.
1
API (Application Program Interface)
Sophia Pandey, Ryan Amundson, & Jessica Betts
2
Outline What is an API? / Who uses API’s? API Pros and Cons
Security Concerns 3rd Party Authentication JSON RESTful API Routing / Status Codes / HTTP Requests Tools + Examples Mashup
3
What is an API? Application Programming Interface
A way for programmers to communicate with an application ”“is a set of routines, protocols, and tools for building software applications. The API specifies how software components should interact and APIs are used when programming graphical user interface (GUI) components.
4
Who uses API’s?
5
Most Popular APIs Facebook Google Maps Twitter Youtube AccuWeather
6
API Pros and Cons Pros: Cons: -less work for developers -security
-user convenience dependency -site capabilities
7
Security Concerns Problem arises with how API’s are coded
Not the concept Review code prior to release Security expert Test on multiple platforms and browsers Developers - include how to guide in documentation Development - balance speed with attention to detail in-the-enterprise
8
API’s - 3rd Party Authentication
Redirection occurs Facebook Example Commonly use OAuth protocol Focuses on client developer simplicity Provides specific authorization Create and save a reference to this request Redirect the user to the third-party login endpoint Process an inbound redirect from the third-party site Validate the request with the third-party service
9
JSON/XML JavaScript Object Notation Extensible Markup Language
Object for efficiently storing and moving data Uses objects and arrays to nest information Readability Extensible Markup Language Uses tags similar to HTML Nests data between tags Uses attributes for metadata
10
RESTful API What is REST? REpresentational State Transfer
Why should I use it? Simplicity of interfaces(Client-Server, Uniform) Stateless Modifiability of components to meet changing needs ( (even while the application is running) Visibility of communication between components by service agents (Middleware) Portability of components by moving program code with the data Reliability at the system level(Modular, Resilient)
11
HTTP Requests CRUD for API’s GET {Controller}/{Action}
Retrieve a resource POST Create a resource PUT Update a resource DELETE Remove a resource {Controller}/{Action} {Controller}/{Action}/{ID}
12
Routing URL pattern mapped to a handler
Server side handling of API request Receives incoming http request Middleware evaluates request Route determines resources to manipulate Data returned as JSON or XML
13
Status Codes - 1xx: informational - 2xx: Success - 3xx: Redirection
- 4xx: Client Error - 5xx: Server Error
14
Tools + Examples Postman API testing tool
Oxford University Google Geocode: maps.googleapis.com/maps/api/geocode/json?address=Oxford%20University,%20uk&sensor=false Beyonce Itunes search API: itunes.apple.com/search?term=beyonce&entity=musicVideo Go to: ryanamundson.com:8000
15
Mashup Combination of many APIs used together to create a new application E.g. google maps and photo locations Enterprise mashups Companies resources combined with external sources Consumer mashups wikipediavision(shows where edits are from with google maps) Data mashups Combination of resources for a new and distinct web service.
16
Mashups Popular Mashups: Infogr.am vineOS
Google charts, maps and analytics vineOS Google analytics, UPS, PayPal and more E-commerce IBM Watson message resonance API
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.