An Introduction to Web API

Last Updated on June 28, 2022
An Introduction to Web API

An Introduction to Web API.

API stands for Application Programming Interface. This is a concept that works on HTTP protocol on top of the ASP.NET framework. The most common use of web API is for building RESTful services. This API service can be consumed by any client like browser, mobile, and desktop applications.

Let’s create a new Web API project.

  • Open the visual studio (2019/2022). Once we open the visual studio then click on Create a new project and click on the Next button. Create-API-New-Project
  • Search or find the “ASP.NET Core Web API” and click on the Next button. Select-API-Template
  • Give the appropriate project name and select the location where we want to save the project and click on the Next button. Configure-new-project
  • Select any available “Long term support” framework from the drop-down. We are selecting .Net 6.0 for this demonstration. Leave the rest of all the same as it is shown in the screenshot. After all, click on the Create button to create the new project. Create-a-new-project
  • Here, we have created the new Web API project. Final-view-of-project

Let's run the API project and see how does it looks like in browser. Currently, we are using swagger client but we can choose any clients as we want.

Run-the-API-project