When teams need the Security Onion API and what it requires
A SOC or platform team needs the Security Onion API when it wants to automate work that otherwise happens by hand in the browser console, such as pulling events into a ticketing or reporting pipeline, querying cases on a schedule, or checking detection state from its own tooling. The API is a Pro feature, and it authenticates with the OAuth 2.0 client credentials flow, so an automated caller holds a client ID and secret rather than a person's login. Security Onion 3.2.0 renamed the Connect API to the Security Onion API, so older runbooks and blog posts may still use the previous name.
The API is separate from the Security Onion Console, which is the browser interface analysts use for alerts, hunting and cases. Automation does not run through the console session, so the team has to plan credentials, permissions and token handling on its own. Typical use cases include scripted event queries for recurring investigations, exporting case data for management reporting, and feeding a central logging or SOAR platform. Each use case should be written down with the specific data it reads, because that list drives which permissions to grant later.
Before any design work, confirm that your organization holds a Pro license with the API feature enabled, since the API does not run on the free edition. Confirm also that a superuser can create API clients under Administration and that your grid version includes the API. Check the Security Onion API documentation against your installed release, because feature names and screens can change between versions. If the license or version does not cover the API, the rest of this page applies only after that gap is closed.
Request flow from API client to subgrid data
The flow starts with a superuser creating an API client under Administration > API Clients in a Pro Security Onion Console. The automation then requests a bearer token from /oauth2/token using the client credentials flow, and sends that token on each API call. Where the grid is a Manager of Managers, the call includes a gridId parameter to reach data on a subgrid. Check that the client holds only the granted permissions and that the token is refreshed before its two-hour default lifetime ends.
Client creation, token request and a gridId query routed through a MoM node.
Configuration options and when each fits
This table compares where an API client sits in a grid, how wide its permissions are, and whether clients are shared across integrations. Read each row as a decision: the right choice is the one that keeps audit trails readable and limits what a single leaked credential can reach. The main takeaway is that narrow, one-purpose clients cost more setup but make every token's activity easier to attribute and contain.
| Option | Best fit | Trade-off for auditing and blast radius | When to choose it |
|---|---|---|---|
| Single grid client | One Security Onion grid with its own automation | Actions trace to one grid, so review is simple; a compromised client exposes only that grid | Single-site teams with one or two automation jobs |
| Client on a MoM node | Several subgrids managed from one console | One credential can reach many subgrids through gridId, so a leak has wider reach and needs tighter scoping | Multi-grid programs that accept a larger blast radius for central control |
| Read-only client (events/read, cases/read) | Dashboards, reporting pulls, SIEM-style lookups | Cannot change state, so the worst outcome of a leak is data exposure rather than tampering | Default choice for any integration that only retrieves data |
| Broader write rights | Case updates or workflows that must write back | Writes are harder to attribute and reverse; limit them to the one permission the job needs | Only when a documented integration requires writing and read-only will not do |
| One client per integration | Separate tools such as a ticketing sync and a report job | Each token maps to one owner and purpose, so revoking one client leaves others working | Most production setups where ownership and rotation matter |
| Shared client across integrations | Small test environments or a short-lived proof of concept | Activity from several tools blends together, and revoking the client breaks every integration at once | Only where the team accepts coarse audit records and a single rotation point |
Setting up an API client step by step
This sequence takes a Security Onion Pro grid from licence check to a verified API client that can request a bearer token, read data within its granted permissions and handle token expiry.
Confirm the Pro license includes the API feature
Before anything else, a superuser checks that the Security Onion Pro license on the grid includes the API feature. The API is part of Pro, so a free edition grid cannot complete the remaining steps. Ask your Security Onion Solutions contact to confirm which features your license covers if the console does not show the API options. This step is done when the API settings are visible to a superuser in the console.
Enable the API in the console
A superuser turns on the API feature in the console so that the OAuth token endpoint becomes available on the grid. Confirm the exact settings location in the current Security Onion documentation for your version, since the API was called the Connect API before the 3.2.0 rename. The step is complete when the console shows the API as enabled and you can reach the token endpoint from the network segment where your automation will run.
Create an API client under Administration
A superuser opens Administration > API Clients and creates a client for the automation or integration that will call the API. Use one client per integration so that access can be reviewed and revoked separately. Record the client identifier and the generated secret in your secrets manager at creation time, because the secret must be handled as a credential from the start. The step is done when the client appears in the list with its identifier.
Assign granular permissions to the client
Grant only the permissions the integration needs, such as events/read or cases/read. Security Onion API clients use granular permissions rather than roles, and OAuth 2.0 scopes are not used, so permissions are the control that limits what the client can reach. Keep write permissions out of read-only integrations. Check the permission list against the current documentation for your version before you save. The step is verified in the next two steps, when a permitted read succeeds and a denied action fails.
Request a bearer token from /oauth2/token
From the automation host, request a token from the /oauth2/token endpoint using the OAuth 2.0 client credentials flow, sending the client identifier and secret as the documentation specifies for your version. The response contains a bearer token that expires after 2 hours by default. Store the token in memory only and do not write it to logs or configuration files. The step is done when the endpoint returns a token and the response shows its expiry.
Call one read endpoint and test a denied permission
Send the bearer token to one read endpoint that the client is permitted to use, such as an events query, and confirm that the response returns data. Then send a request to an endpoint the client was not granted, or try a write action, and confirm that the API returns an error rather than data. This pair of checks shows that the token is accepted and that the permission model is enforced. If the denied request succeeds, stop and review the client's permissions before going further.
Handle token expiry and rotation
Build the automation to track the token's expiry time and request a new token before the 2-hour default lapses, rather than waiting for failures. Test this by letting a token expire in a non-production run and confirming that the client requests a replacement and resumes without manual steps. Also confirm your procedure for rotating or deleting the client's secret and for disabling the client when the integration is retired. The step is complete when a test run survives a token refresh and the revocation procedure has been rehearsed.
Securing client secrets, permissions and token handling
The Security Onion API gives any holder of a client secret the same access that client was granted, so the controls below decide how far a leaked credential can reach. Each card covers one risk and the control that limits it, from where secrets live to how long an integration keeps its access after it is retired.
Store client secrets in a secrets manager
The client secret is the long-lived credential that exchanges for two-hour bearer tokens, so it should never sit in a script, a cron file or a shared wiki page. Keep it in a secrets manager your team already operates, inject it into the integration at runtime, and limit read access to the service account that needs it. Check who can read the secret store, not only who created the API client in Administration > API Clients.
- Default token lifetime
- 2 hours
Grant only the permissions a job needs
API clients use granular permissions such as events/read or cases/read rather than roles, so each client can be scoped to the exact data its integration reads or writes. A dashboard export rarely needs cases/write or detection changes. Review each client's permission list against the job's actual calls, and create separate clients for read-only reporting and any integration that changes state.
Separate clients for each integration
Giving several integrations one shared client makes it impossible to tell which system made a call, and revoking that client breaks all of them at once. Issue one client per integration, such as a SOAR connector or a reporting script, so audit trails and revocation stay specific. Name each client after its owner and purpose so the console shows who is responsible for it.
Rotate secrets on a schedule
A client secret that never changes stays valid for as long as anyone has a copy of it. Set a rotation interval in your secrets manager, create the replacement secret, update the integration, confirm a new token is issued, and then retire the old value. Ask your team to record each rotation so an audit can show when every secret last changed.
Revoke clients when integrations retire
Orphaned API clients are a common gap: the script is decommissioned but its credential still authorizes calls to events and cases. When an integration is retired, delete its API client in the console, remove the secret from the secrets manager, and confirm that no tokens are still being requested from /oauth2/token. Make this step part of the decommissioning checklist for every automation project.
Keep tokens out of logs and restrict network access
Bearer tokens in application logs, proxy logs or error traces can be replayed until they expire. Configure integrations to mask the Authorization header and the token response, and avoid debug modes in production. Then limit which hosts can reach the API endpoint with host firewall rules or network segmentation, so a stolen token cannot be used from an arbitrary location.
Querying subgrids through Manager of Managers
Manager of Managers (MoM) lets one console run several Security Onion grids, and the API reaches subgrid data by passing a gridId parameter to a MoM node. Your integration therefore needs two things settled before any code is written: which MoM node it calls, and which subgrid IDs it is allowed to read. The Security Onion API is available only with a Pro license, and Manager of Managers is a Pro feature as well, so confirm that both are licensed for every grid you plan to query. Subgrid licensing is covered in the sibling Manager of Managers topic, so this section focuses on the request pattern itself.
The API client created under Administration > API Clients is the identity that makes the subgrid call, and its granular permissions such as events/read or cases/read are what the MoM node checks. Because permissions are not granted by role in the API, do not assume that a client which reads events on the local grid can read the same data on a subgrid. Test each target grid with a read-only client first, using a call to the same endpoint you plan to automate, and record which fields and records come back. Keep the bearer token flow unchanged: the token from /oauth2/token is requested once per client and reused until the default two-hour expiry, and it is the same token for local and subgrid calls.
Confirm two behaviors in your own environment before relying on subgrid results. First, how subgrid roles affect what a client sees, since a role-scoped user on the subgrid may return fewer records than the same call made locally. Second, what the MoM node returns when a subgrid is offline, whether it is an error, a partial result or an empty set, because a monitoring script that treats an empty answer as "no events" can hide a gap. Ask your Security Onion contact or test against a non-production subgrid, and make your integration distinguish an empty result from a failed subgrid call.
Limits and what to confirm before you build
The Security Onion API is documented, but several details change between releases or depend on your grid's layout. Treat each item below as a question to close with Security Onion Solutions or in a test grid before you write automation that depends on it. Answers will decide how much of your integration you can safely build now.
Exact endpoint list for your version
Confirm which endpoints your installed version exposes, rather than assuming the list in the current documentation applies to you. The API was renamed from the Connect API in 3.2.0, so older scripts and examples may refer to paths or names that differ from your release. Ask for the endpoint reference matching your exact version and check each route your automation calls against a test grid before production use.
API docsAvailable permission names
Permissions such as events/read or cases/read are granular, so the exact names matter when you grant access. Confirm the full permission list for your release and whether write permissions exist for each area your workflow touches. Create a test client with the narrowest set you think you need, then confirm which calls fail, so you know the permission model before you grant broader access in production.
Token lifetime changes
Bearer tokens expire after 2 hours by default, but that default may change between releases or be configurable in your deployment. Ask whether the lifetime is fixed or adjustable and whether refresh behavior changes. Your client should request a new token on expiry and handle a 401 response gracefully, and you should test that path, since long-running jobs will hit it.
Rate limits and pagination
Confirm whether the API applies rate limits, how many results a single query returns, and how pagination works for large event or case result sets. Ask for documented limits in writing, then measure behavior against a grid sized like yours. Hunting queries over long time ranges can be slow, so test how timeouts and partial results are reported before you build bulk exports on top of the API.
Subgrid behavior when offline
For Manager of Managers setups, confirm how the API responds when a subgrid is offline or unreachable through the gridId parameter. Ask whether the response is an error, an empty result or a partial result, and whether the MoM node reports which subgrid failed. Your automation should treat an offline subgrid as a known state, not as zero events, or you may report a clean result for a grid that never answered.
Subgrid API docsQuestions teams ask before automating the Security Onion API
Does automating the Security Onion API require a Pro license?
Yes. The Security Onion API is a Pro feature, and the API feature must be enabled on the license before a superuser can create an API client. Security Onion Pro is a paid edition sold on 1 to 5 year terms. It also bundles OIDC single sign-on, Manager of Managers, the MCP server, the Onion AI assistant and professional support, so the license decision usually covers more than the API. Confirm the exact feature set for your term with Security Onion Solutions before you plan, because the licensed features are what your integration can rely on. The Security Onion Pro page lists the current contents of the edition.
What does the team need before building an API integration?
The team needs a running Pro grid with the API feature enabled, and a superuser who can create clients under Administration > API Clients. Before any code is written, you also need:
- A named owner for each API client, with a documented purpose
- A permission list matched to the use case, such as events/read or cases/read, rather than broad access
- Network paths from the consuming system to the console's
/oauth2/tokenendpoint and API - A secret store for client secrets that the integration can read at runtime
- Engineers who can work with OAuth 2.0 client credentials, bearer tokens and HTTP error handling
- A test grid, so changes can be validated before they reach production analysts
How long does a Security Onion API integration take?
Duration depends on scope, and no fixed timeline applies to every integration. A read-only pull of events into a reporting tool is much smaller than a two-way case sync that creates and updates cases. The main drivers are the number of systems involved, whether the integration writes data, whether queries must reach several subgrids through Manager of Managers, the depth of error handling and logging you need, and how quickly a test grid is available. Ask any provider, including DeployOpen, for a written scope with deliverables and milestones. DeployOpen agrees scope, deliverables and timelines in writing before work starts, so the schedule should come from that document.
Can an in-house team automate the Security Onion API without a partner?
Yes, if the team has API engineering experience and access to a Pro license and a test grid. The API uses the standard OAuth 2.0 client credentials flow, so most of the work is credential handling, permission design and integration logic. The common failure points are over-broad permissions, client secrets stored in scripts, no alerting on failed token requests and version changes after upgrades. Security Onion 3.2.0 renamed the Connect API to the Security Onion API, so check the release notes before each upgrade. A partner adds value when the team lacks time or when the integration spans several platforms and needs formal handover documentation.
How does token renewal work with two-hour bearer tokens?
Each bearer token from /oauth2/token expires after 2 hours by default. The integration should store the token with its expiry time, reuse it while it is valid, and request a new token shortly before it lapses. It should also retry once after an authentication failure, then raise an alert if the retry fails. Requesting a new token for every API call adds load and noise to logs. Confirm in the Security Onion API documentation how client secrets are rotated and whether any other renewal mechanism applies. Rotation needs a planned window, because the old secret must be replaced in every system that uses it.
Is Manager of Managers needed to query several Security Onion grids?
No, a single grid does not need Manager of Managers. You need MoM when you want one API path to reach data from several grids. Subgrid data is reached through a gridId parameter on a MoM node, so the integration sends the same request format and chooses the grid by ID. Without MoM, the integration calls each grid's API separately and combines results in its own code, which adds complexity and more credentials to manage. Before you design around MoM, confirm subgrid licensing, the roles that apply on each subgrid, what MoM does not merge, and how queries behave when a subgrid is offline.
What drives the cost of an API automation project?
Cost has four main parts: the Pro license from Security Onion Solutions, internal staff time, any external implementation fee, and test infrastructure. Design, build, testing and documentation are usually one-time work. Recurring costs include license renewal, maintenance after Security Onion upgrades, client secret rotation, monitoring and changes when new data consumers appear. The biggest cost drivers are the number of integrations, whether they write data, the number of subgrids and clients, the compliance evidence the business expects, and whether the organization already has a secrets manager and monitoring. When requesting a quote, ask for deliverables, assumptions, the test plan, handover materials and a list of exclusions.
How DeployOpen scopes and delivers Security Onion API work
DeployOpen plans and delivers Security Onion API automation inside infrastructure you control, starting from a written scope that names the Pro license, API clients, permissions and subgrid targets involved. We build, test and document the integration so your team can review and operate it after handover.
How we scope
- Confirm your Security Onion edition and that the Pro license includes the API feature before any build work starts.
- List each automation use case and the granular permissions it needs, such as events/read or cases/read, so access stays minimal.
- Record whether the API will query a single grid or subgrids through a Manager of Managers node, and which gridId values apply.
- Agree the written scope, deliverables and timelines before work starts. Engagements are fixed-scope.
How we build
- Enable Hydra and create dedicated API clients under Administration > API Clients, one per integration rather than shared credentials.
- Implement the OAuth 2.0 client credentials flow against /oauth2/token and handle bearer token renewal before the two-hour default expiry.
- Store client secrets in your approved secrets manager and keep them out of scripts, repositories and logs.
- Test each permission boundary, including requests that should be denied, and confirm subgrid queries return only the intended grid data.
How we hand over
- Deliver written documentation covering client inventory, permission mapping, token lifecycle, and the endpoints each integration calls.
- Walk your security and platform engineers through the flow, secret rotation steps and how to revoke a compromised API client.
- Provide the integration code or configuration in your repositories, with the test cases used to verify it.
How we support
- Ongoing support, upgrades and continuous testing are available as retainers, covering changes after handover.
- Plan retesting when Security Onion versions change, since the API was renamed in 3.2.0 and release behavior may evolve.
- Confirm with your team which support responsibilities sit with DeployOpen, your staff and Security Onion Solutions for Pro issues.

