APILensDocs 1.0.0

The owner has unlisted this package. This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet add package APILensDocs --version 1.0.0
                    
NuGet\Install-Package APILensDocs -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="APILensDocs" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="APILensDocs" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="APILensDocs" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add APILensDocs --version 1.0.0
                    
#r "nuget: APILensDocs, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package APILensDocs@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=APILensDocs&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=APILensDocs&version=1.0.0
                    
Install as a Cake Tool

APILens

Drop-in live traffic dashboard and a fully custom API documentation UI for ASP.NET Web API 2 (OWIN) applications. No external services, no Node/build tooling - the docs/dashboard UI is plain HTML/CSS/JS.

What you get

  • Live traffic dashboard - total hits/success/fail, an hourly bar chart, and a per-endpoint breakdown, all computed in-memory from real requests.
  • Per-endpoint drill-down - hourly chart and a log of the most recent individual requests for one endpoint.
  • Request/response payload viewer - click a recent request to see its actual request and response body in a popup, with common sensitive field names (passwords, tokens, card numbers, etc.) automatically redacted before anything is stored.
  • Custom documentation UI - reads your existing Swagger/OpenAPI 2.0 JSON (e.g. from Swashbuckle) and renders a fully brandable Overview / Endpoints / Schemas experience with a working "Try it out" (editable headers, live cURL preview, tabbed response viewer).

Everything is in-memory and resets when the app pool recycles - this is a live/rolling view, not a persisted audit log.

Install

  1. Install this package into your ASP.NET Web API 2 project.

  2. In your WebApiConfig (or wherever you configure HttpConfiguration), add:

    config.EnableApiLens();
    

    Or override the defaults:

    config.EnableApiLens(options =>
    {
        options.RetainHours = 72;
        options.MaxRecentRequestsPerEndpoint = 100;
        options.SensitiveFieldNames.Add("accountNumber");
    });
    
  3. Copy the content/ApiLensDocs folder (installed alongside this package) into your web project as static content, then browse to /ApiLensDocs/index.html.

  4. If your Swagger JSON isn't served at the default /swagger/docs/v1, edit apilens.config.js (in the copied folder) to point at the right URL.

Security note

This package does not add authentication to the dashboard or diagnostics endpoints (/api/_apilens/stats, /api/_apilens/stats/endpoint) - it tracks whatever your app already allows. If your API is not otherwise locked down, anyone who can reach those routes can see captured traffic, including request bodies (minus redacted fields). Restrict access to these routes the same way you would any other sensitive endpoint in your app (e.g. an [Authorize] filter, IP allowlist, or a reverse-proxy rule) if that matters for your deployment.

Configuration reference (ApiLensOptions)

Option Default Purpose
TrackedPathPrefix /api/ Only paths starting with this are tracked
ExcludedPathPrefixes ["/api/_apilens"] Paths never tracked, checked after the prefix match
RetainHours 48 Hours of hourly buckets kept before pruning
MaxRecentRequestsPerEndpoint 50 Individual requests kept per endpoint for the payload drill-down
MaxBodyLength 8000 Captured request/response bodies longer than this are truncated
SensitiveFieldNames password/token/card/etc. JSON field names redacted before storage

Powered by Irosh Fernando.

Product Compatible and additional computed target framework versions.
.NET Framework net481 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated