APIs Flashcards
What is an API?
Application programming interface (API)
Defined set of methods which expose only the required objects or methods for a particular program to simplify programming or data access for a third party.
Web APIs to allow access to data in a data store
Name 2 web APIs
- SOAP
2. RESET
What is SOAP?
Simple Object Access Protocol (SOAP) allows communication using any protocol (HTTP, SMTP, TCP, UDP) via messages consisting of XML.
Benefits-
a. Can be used with any protocol, and XML allows easy extensibility.
Disadvantage-
b. Highly verbose protocol, slow parsing speed of XML so not scalable for large datasets
What is REST?
Representational State Transfer (REST) allows requests via HTTP methods (GET, HEAD, POST, PUT, PATCH, DELETE) to a resource URI to obtain an HTML, XML, or JSON payload.
Benefit-
1. Standardised and independent on platform or languages, highly readable, scalable for use with large datasets.