1. Create Project
# dotnet new webapi -o testapi <-- testapi is your project name
The template "ASP.NET Core Web API" was created successfully.
Processing post-creation actions...
Running 'dotnet restore' on testapi/testapi.csproj...
Restoring packages for /home/johnnychu/DotNetProjects/testapi/testapi.csproj...
Generating MSBuild file /home/johnnychu/DotNetProjects/testapi/obj/testapi.csproj.nuget.g.props.
Generating MSBuild file /home/johnnychu/DotNetProjects/testapi/obj/testapi.csproj.nuget.g.targets.
Restore completed in 571.95 ms for /home/johnnychu/DotNetProjects/testapi/testapi.csproj.
Restore succeeded.
2. Run
# cd testapi
# dotnet run
Hosting environment: Development
Content root path: /home/johnnychu/DotNetProjects/testapi
Now listening on: https://localhost:5001
Now listening on: http://localhost:5000
Application started. Press Ctrl+C to shut down.
3. Call API via Your Browser or PostMan
["value1","value2"]