Uncorking the Seq API

The web interface of Seq connects to the server via a simple API using JSON/HTTP. (I’d call it REST, but it’s not fully IEEE 1337.00 REST-1.1 compliant ;-))

Quite a few customers integrate with the API, either for querying events or for automating administrative tasks like adding users, creating/modifying queries and views, etc.

Though it’s possible to just jump right in using JSON, it’s a pain to figure out the dynamic structure of the entities that are sent and received and hand-code C# types that serialize appropriately using JSON.NET.

To fix this, we just published the entire set of Seq API types, as well as higher-level wrappers, to the new seq-api project on GitHub and published via NuGet:

Install-Package Seq.Api

You can use the package to connect and work with items from your Seq instance:

Things should be pretty self-explanatory - just dot your way through the properties on SeqConnection to find your way around.

As a brand new project we fully expect some rough edges in there, for example you may need to upgrade to Seq 1.6.7 in order for some features to work. You can already do some interesting things with it though!