top of page
Writer's picturechpranusha90

Basics of API


If you are new to API, Lets review the basics terminology used in API .


API stands for Application Programming Interface. APIs act as a software intermediary to enable two software components to communicate with each other.


End point: Address where API is hosted on the Server.


HTTP methods: which are commonly used to communicate with Rest API’s are GET, POST, PUT, and DELETE


GET- The GET method is used to extract information from the given server using a given URI. While using GET request, it should only extract data and should have no other effect on the data. No Payload/Body required,To send input data in GET use Query Parameters


POST- A POST request is used to send data to the server, for example, customer information, file upload, etc. using HTML forms.To send input data in POST use Body Payload


PUT- Replaces all current representations of the target resource with the uploaded content.


DELETE- Removes all current representations of the target resource given by a URI.


Resources:

Resources represent API/Collection which can be accessed from the Server

BaseURl:https://reqres.in

Example :BaseURL/api/users


Path Parameters:Path parameters are variable parts of a URL path. They are typically used to point to a specific resource within a collection, such as a user identified by ID

Example:BaseURL/api/users/2


Query Parameters:Query Parameter is used to sort/filter the resources.Query Parameters are identified with "?"

Example:BaseURL/api/users?page=2


Headers/Cookies:Headers represent the meta-data associated with the API request and response. In general terms, we were sending Additional details to API to process our request.

Example : Authorization details.


By using above information we can construct the End Point Request URL as below

Base URL/resource/(Query/Path)Parameters


Thanks for reading the blog. Hope you got an idea of API terminology.








126 views

Recent Posts

See All
bottom of page