Documentation
DocumentationDiscussions
These docs are for v4.2. Click to read the latest docs for v2024.2.

Using the HTTP API

Seq provides a compete HTTP API for manipulating events, queries, apps and so-on.

Integrating from C#/.NET

The complete functionality of the Seq application is exposed to C# apps via the Seq.Api NuGet package.

This package makes it trivial to interact with Seq from C#:

var connection = new SeqConnection("http://localhost:5341");
var installedApps = await connection.Apps.ListAsync();

Instructions for installing the package and making calls to Seq can be found on the API GitHub project.

Integrating from Other Languages

Navigating to /api/ with a logged-in Seq session will show the root resource, with links to the various parts of the API.

{
  "Product": "Seq .NET Structured Event Server",
  "Version": "1.0.0.0",
  "Links": {
    "ApiKeysResources": "/api/apikeys/resources",
    "AppInstancesResources": "/api/appinstances\resources",
    "AppsResources": "/api/apps/resources",
    "EventsResources": "/api/events/resources",
    "ExpressionsResources": "/api/expressions/resources",
    "FeedsResources": "/api/feeds/resources",
    "LicensesResources": "/api/licenses/resources",
    "QueriesResources": "/api/queries/resources",
    "ReportsResources": "/api/reports/resources",
    "RetentionPoliciesResources": "/api/retentionpolicies/resources",
    "SettingsResources": "/api/settings/resources",
    "UsersResources": "/api/users/resources",
    "ViewsResources": "/api/views/resources"
  }
}

Authentication

If authentication is enabled on the server, client applications will need to provide an API key, or log in and maintain the provided cookie.

API keys are the recommended way of authenticating with the Seq UI. The API key may either be provided in the query string:

GET /api/events?count=10&apiKey=a789b43750b297853

Or, included in an HTTP header:

X-Seq-ApiKey: a789b43750b297853