Skip to main content
Version: v0.7

Web API Project Template

Create Your First Arcus Web API Project

First, install the template from NuGet:

> dotnet new --install Arcus.Templates.WebApi

When installed, the template can be created with shortname: arcus-webapi:

> dotnet new arcus-webapi --name Arcus.Demo.WebAPI

Features

Creates a starter web API project with by default configured:

Configuration

And additional features available with options:

  • -au|--authentication (default None)
  • -ia|--include-appsettings (default false): includes a appsettings.json file to the web API project.
  • -ec|--exclude-correlation (default false): excludes the capability to correlate between HTTP requests/responses from the API project.
  • -eo|--exclude-openApi (default false): exclude the ASP.NET OpenAPI docs generation and UI from API project.
  • -lo|--logging (default Serilog)
    • Console: no extra logging mechanism except for the default console logging will be added to the web API project.
    • Serilog: adds Serilog as logging mechanism with request logging, default enrichers (version, application, and correlation when appropriate), sinking to Application Insights to the web API project.

Security

As part of this template the following HTTP header(s) are removed for security sake:

  • Server header * Provides information concerning the Web API runtime