Wednesday, July 22, 2020

API Testing- benefits, Type of APIs, API Gateways

What is API?

Application programming interface

  • Software creation
  • System interaction
  • Consists of
    • Protocols
    • Functions
    • Objects
    • Commands
  • Code does not have to be rewritten
  • Available for web, window and mobile apps

 

Key benefits of using APIs

  • Conform to standards
  • Can be provided as a service
  • Data and functionality can be outsources
  • APIs can be offered by local systems
  • Allows developers to focus on other important aspect of application development

 

Decoupling services from applications

  • Consuming application is not connected to the servicing infrastructure
  • Service providers have great flexibility
  • Endpoint service delivery remains unchanged
  • API contract

 

Remote APIs

Overview of Remote APIs

  • Access and manipulate remote resources
  • Utilizes various protocols and standards
  • Independent of language and platform

 

Web APIs

  • Standards for connecting application to an API
  • Network or internet connections
  • Hypertext Transfer protocol
  • Web API
    • Web addressable endpoints
    • Support HTTP commands
  • Various internet based APIs

 

Common browser APIs

  • Document manipulation in browser
  • Fetch data from server
  • Audio
  • Video
  • Create and manipulate graphics like canvas and webGL

 

RestAPI

  • representation state transfer
  • web service access protocols
  • Rest aims to address soap shortcomings
  • Rest is lighter weight
  • Relies more on URL than xml
  • Provides flexibility on data output form

 

REST API tasks

  • GET -to retrieve
  • POST – to create
  • PUT – to update
  • Delete- to delete

 

REST API Advantages over SOAP

  • Designed similar to existing web technology
  • Does not require expensive tools
  • Easier to learn
  • No excessive processing
  • More efficient- smaller messaging

 

SOAP API

  • Simple object access protocol
  • Web service access protocols
  • Well established
  • More rigid than rest api
  • Relies on XML – can become highly complicated
  • Highly extensible
  • Difficulty depend on language used
  • http vs SMTP

 

SOAP advantages over rest API

  • independent of language and platform
  • independent of transport protocols
  • standardized
  • ideal for distributed environments
  • WS* standards
  • Build in error handling
  • Automation

 

API gateways

  • Classic API gateways
    • Sit between provider and consumer
    • Web services
    • Centralize functions
  • Microservice architectures
  • Microgateways
    • Functions are a subset of classic api gateway functions
    • Unique and automated deployment method
    • Scalability

 

Security functions

  • Multilayered API protection
  • Authentication
  • Authorization
  • Identity mediation
  • Security monitoring
  • Traffic encryption and signatures
  • Key and certificate management

 

Monitoring and Administration functions

  • Real time monitoring
  • Alerts
  • Insights and trends
  • Managing daily operations
  • Client management
  • Other integration scenarios

 

Control functions

  • Control and governance
  • Service level agreement
  • Throttling
  • Load balancing
  • Content based routing
  • Blocking
  • Quote management

 

Transformation functions

  • Bidirectional transformation
  • Less time to market
  • Numerous protocols, formats and various standards
  • Replacement of existing systems
  • Lightweight API orchestration tools

 

API Endpoints

  • Web service entry point : URL
  • Used to reduce latency
  • Some services support regional endpoints
  • Multiple region deployment
  • Custom domain name
  • Route clients to low latency regions

 

Cheers.

TJ

 

No comments:

Post a Comment