Showing posts with label API. Show all posts
Showing posts with label API. Show all posts

Tuesday, July 20, 2021

API Verbs

API Verbs
  • Get
  • Post
  • Put
  • Delete
API Terminology
  • Idempotency: In the context of REST APIs, when making multiple identical requests has the same effect as making a single request. The API supports idempotency for safely retrying requests without accidentally performing the same operation twice. This is useful when an API call is disrupted in transit and you do not receive a response. For example, if a request to create a charge does not respond due to a network connection error, you can retry the request with the same idempotency key to guarantee that no more than one charge is created.
  • Safety: Action does not have any effect on the State. For example, Get action. 

API Economy

 Is the way APIs can positively impact an organization's profitability.

Simple API Request

 


API Mottos - IBM

 

  • APIs should be treated like any other product. 
  • They need a carefully defined life cycle and governance model to enforce that life cycle
  • APIs must be carefully crafted so they’re attractive to the intended consumer so it “sells.” (not literally)


Friday, July 31, 2020

Microservices vs. API (Edureka)

Microservices

Monolithic Architecture

  • Front end, back end, business logic all reside in a single code base. 
Example Scenario is that of Amazon Market. 


In the case of Monolithic Architecture,



Microservices Architecture


    In the case of Microservices Architecture,

    • In case of a Microservice architecture, all the three functionalities - customer information, products available in cart and All the products available, can be put in three different services. 
      • Service A - Customer information
      • Service B - Products available in cart
      • Service C - All products available
    • Composite Microservice - will take data from all the three services above and display it to the customer. 

    Microservices or Microservices Architecture is an architectural style that structures an application as a collection of small autonomous services, modelled around a business domain. In a Microservices Architecture, each service is self-contained and implements a single business capability. 

    APIs

    Application Programming Interfaces most commonly known as APIs is a way to ensure two applications communicate with each other to process client requests. 



    HTTP Methods used by APIs


    APIs use the above methods to communicate between the client and the respective functionality / feature of the app (service).

    Where are APIs used in Microservices?

    API interfaces between the client and the Microservice. 



    Summary

    Microservice is an architectural style through which you can build applications in the form of small autonomous services.

    APIs are set of procedures / functions which allow customers to use the underlying service of an application. 

    Thursday, July 23, 2020

    API and Web Services (Udemy)

    [Mulesoft]

    API is the acronym for Application Programming Interface, which is a software intermediary that allows two applications to talk to each other. Each time you use an app like Facebook, send an instant message or check the weather on your phone, you’re using an API. 

    Example - Online travel service that interacts with several other websites to collect data...

    • API also provides a layer of security. Your phone's data is never fully exposed to the server, and likewise, the server is never fully exposed to your phone. Each communicates in small packets with only what is necessary - like ordering a takeaway. 

    If we already have automation, what's the need for Agents?

    “Automation” and “agent” sound similar — but they solve very different classes of problems. Automation = Fixed Instruction → Fixed Outcome ...