Using APIs Flashcards
Use cases for APIs: (3)
- Automation tasks
- Data integration
- Functionality
Why are APIs so popular? (4)
- Apps were locked down
- The demand for integration has grown and more apps are exposing APIs.
- Modern APIs are designed as part of the product and even used as part of the product.
- The demand for APIs has made simple languages use these APIs and means non-software engineers can build apps and get results they need.
Name two types of APIs and the difference?
Synchronous API - Response and data is provided directly
Asynchronous API - Provides an initial response, but client needs to “call back” to obtain the data
Name 3 architectural styles of API calls
RPC
REST
SOAP
RPC implementation types
○ XML-RPC
○ JSON-RPC
○ NFS
○ Simple Object Access Protocol (SOAP)
What data format does SOAP support?
XML
Name the elements of SOAP message ? (4)
Envelope
Header
Body
Fault
Name 6 REST Constraints to be RESTful
Client-Server Stateless Cache Uniform Interface Layered System Code-on-demand
Name 4 components of REST API
URI
HTTP Method
HEADER
BODY
Name the 5 types of status codes and their meaning (high level)
1xx Informational 2xx Success 3xx Redirection 4xx Client Error 5xx Server error
HTTP Status CODE - OK
200
HTTP Status CODE - Created
201
HTTP Status CODE - Bad Request
400
HTTP Status CODE - Forbidden
403
HTTP Status CODE - Unauthorized
401