Use cases for APIs: (3)
Why are APIs so popular? (4)
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
HTTP Status CODE - Not Found
404
HTTP Status CODE - Internal Error
500
HTTP Status CODE - Service Unavailable
503
HTTP Status CODE - Not implemented
501
REST Authentication Methods
Basic Authentication
Bearer Authentication (token)
API Key
What method of authentication does OAuth use
Token like bearer Authentication
Why use API rate limits? (3)
List 4 API rate limit algorithms
Leaky bucket
Token bucket
Fixed window counter
Sliding Window Counter
API Rate limit - explain X-RateLimit-Limit header
the max number of request per unit of time