Friday, April 3, 2020

AWS API Gateway


  • API Keys-API keys are unique identifier that are assigned to API to be executed by a single developer or group of developer.We can understand it like as if it the name of the API. By sharing API Keys, a developer who has created the API gives the access to other developer to use the created API.
  • Custom Domain Name-Custom Domain name is creating the API url by the domain of ours. When we create the application, it is generally hosted on our domain, so for using the API on our domain, we have to pass the API url which has our domain, but for a note, the created API will also work for the AWS created url.
  • Settings-Define the permission that the created API has. By default, no permission are granted to the API that is created. We have to gives all the permission that are required.
First we have to create Create Resource and then Create Method.
Resource is nothing but the path that will be appended in the url path.

  • Models-Models are the area where we define the type of data which we are using.
  • Authorizers-Authorizers is the area where we have to define the permission for the users who will use this API.
  • Documentation-Documentation is the area where we will write the use of the API
  • Binary Support-It work when we sent the file with our request to API
  • Dashboard-Highlevel overview of how our API works.

This is the cyclic diagram of how API actually works 
First box Method Request act as a Gate Keeper
First box is the Method Request which states that how the API must look like, whether this 
Particular API is meeting the criteria that are prescribed, the criteria can be anything, parameter or data model or criteria for schema specification
Also we can do the authentication for the API so that only valid users are able to do the usage of this API.We can say Method Request  is like gatekeeper who keep an eye on the data and their validity.
If the authentication is not met, we simply block the rest of the work that has to be performed.

Second box is Integration Request is used to map the data according to the way we want to use it.Also we can hardcode the data according to the use.The transformation of data can be of any type for instance, authentication data, header data, parameter data and many other.This is the box where we define the function where we have to write the business logic as well.

The third cyclic box is Integration Response and is used to extract the data from the integration request and pass it to method response and here only success response are passed.Also we can transform the data according to the need of client and send it to method response. Integration Response can also be useful in allowing the access control allow for header data type, methods which this particular API can handle and parameter datatype.

The last box is Method Response is the last response box and it will pass all the response whether it is pass or fail and we can give the final touch of how data has to be rendered in front of client.


No comments:

Post a Comment