Introduction
An API refers to Application Programming Interface in a computer programming language that defines subroutines or instructions for executing a program to complete a task. The API is an interface to connect software or website to the Server any request or any operation cannot perform without the interaction of the API.
A simple way to understand an API is what?
An API is a messenger to establish a connection between software and server. API is used for transferring data from one side to another. That means all sets of operations can be performed with API like user registration details are saved to the database with the API and access the user data from the database with the API.
The API is used to access data from a database with proper connection or request. In real life example, an API is used to create an account with Google, Facebook, Twitter, etc, and to access Google Map on a Website or project is also using a web API.
In a current scenario, there are various platforms available for developing any project like Web applications, Windows desktop applications, android applications, etc. For example, Facebook is available on Android, Web Applications, Desktop Applications, etc but it used the same structure and same database everywhere. Similarly, we use the same method for any platform-dependent project using API. Generally, the API is created for maintaining a database. and all sets of operations are performed on API. The API does not have any front end it could be tested on swagger and postman. The API returns the response only like 200,404,500 etc various responses are returned according to the method. When a request is denied for any region like an account does not exist, the map is not accessed, etc that time API shows an error.
API Request Methods
POST
The Post request is used for submitting a new record into a database.
GET
The Get request is used to display all available records in a table or list.
PUT
The Put request is used for updating the available record from the database.
DELETE
The delete request is used to delete the record from the database.
What is CLI?
The full form of CLI is Command Line Interface in a .NET core command-line interface is a cross-platform command-line tool used to develop and perform various development activities when developing a .Net core application.
Step by step to explain how to create .NET core web API using Command Line
Step 1
To install a .Net in our system.

Step 2
To open a command prompt.









Join the conversation! Your thoughts help the community grow.