Integrations
API access
DFIRe provides a full REST API for programmatic access. Use API keys to authenticate SIEM connectors, SOAR playbooks, custom scripts, and third-party integrations.
Overview
Every action available in the DFIRe web interface is also available through the REST API, apart from managing your own multi-factor authentication, which needs a browser session. API keys allow external systems to authenticate and perform operations with the same permission model as browser-based users.
Key concepts:
- API Keys are per-user Bearer tokens that inherit the user's full RBAC permissions
- Service Accounts are dedicated user accounts that authenticate exclusively via API key (no password or SSO login)
- API Documentation is built into every DFIRe installation as an interactive reference at
/api/docs/
API Keys
API keys provide programmatic access to DFIRe. Each key is tied to a specific user and inherits that user's group memberships, permissions, and case access. Any endpoint accessible via the browser is accessible via API key with the same authorization checks, except the multi-factor settings.
Creating an API Key
-
Open API Keys from the profile menu
Click your avatar in the header and choose API Keys. Any authenticated user can create API keys for their own account.
-
Click "Create API Key"
Provide a descriptive name (e.g., "Splunk SOAR connector") and set an expiration date. The expiration cannot exceed the tenant-configured maximum lifetime.
-
Copy the raw key immediately
The full key (starting with
dfire_ak_) is displayed only once. Store it securely. DFIRe stores only a SHA-256 hash and cannot recover the original key.
Key Properties
| Property | Description |
|---|---|
| Name | A descriptive label for identifying the key's purpose. |
| Description | Optional notes about what system uses this key. |
| Expiration | Mandatory. Keys automatically stop working after this date. Bounded by the tenant maximum lifetime setting. |
| Enabled | Keys can be temporarily disabled without deletion. Disabled keys reject all requests. |
| Key Prefix | The first 12 characters of the key (e.g., dfire_ak_a1b2), visible in audit logs for identification. |
Managing API Keys
In the same API Keys view you can:
- Enable / Disable. Temporarily suspend a key without deleting it
- Regenerate. Create a new key value (the old value stops working immediately)
- Delete. Permanently remove a key
- View usage. See last used timestamp, IP address, and total request count
Tenant Policy
Administrators can configure API key policy in Settings > Global Settings:
| Setting | Default | Description |
|---|---|---|
| Maximum keys per user | 3 | Limits the number of active (enabled and non-expired) keys a single user can have. |
| Maximum key lifetime | 365 days | The furthest expiration date allowed when creating or regenerating a key. |
Admin Key Management
Superusers can manage any account's API keys from Settings → User Accounts, by editing the user. This includes creating, listing, editing, disabling, regenerating, and deleting keys.
The Edit userapikey permission adds key administration to a role without letting it hand out access. It works alongside the user permissions that open Settings → User Accounts in the first place, so a role needs both to manage anyone else's keys. A key authenticates as the account it belongs to and carries that account's permissions, so issuing one is equivalent to lending out the account. What the permission allows therefore depends on the account:
- Service accounts: everything, including creating and regenerating keys. This is the account type meant to be driven by a key.
- Ordinary accounts: listing, editing, disabling, and deleting the keys that already exist. New keys cannot be issued and existing ones cannot be regenerated. People create their own keys from their profile.
- System Root accounts: nothing. Only another superuser can manage a superuser's keys.
Service Accounts
Service accounts are dedicated user accounts designed for automated systems. They authenticate exclusively via API key. Password login and SSO are blocked. A System Root account cannot become a service account.
Creating a Service Account
-
Create a new user account
Go to Settings → User Accounts and create a regular user account (for example
svc-splunk). -
Enable the service account flag
In the user's profile, check "Service Account". This blocks password and SSO login, and hides the account from non-admin user listings.
-
Assign appropriate roles
Give the service account the roles that grant the permissions it needs. Follow the principle of least privilege.
-
Create an API key
Still in Settings → User Accounts, edit the service account and create the key from its API Keys section.
The setting is one-way because it decides who may issue keys for the account, and a key authenticates as the account it belongs to. A converted account stays converted and can no longer sign in with a password or SSO, so the change is immediately visible to the person who uses it. Every conversion is recorded in the audit log against the account, whoever made it, and the API key they used if they worked through the API.
Custom Permissions via Roles
API keys inherit all permissions from the user account they belong to, including its roles. To grant a service account (or any API key holder) a custom set of permissions, create a dedicated role in Settings → Access Roles and grant it only the capabilities that integration needs, then assign the role to the account. This lets you enforce least privilege: a SIEM connector role might hold only view capabilities on cases and indicators, while a SOAR playbook role could additionally hold create and edit capabilities on cases. See Users and roles → Editing roles.
dfire_ak_a1b2...) in the audit log, making it easy to trace which integration performed each action.
Authentication
API requests are authenticated using the Authorization header with a Bearer token:
Authorization: Bearer dfire_ak_your_key_here
Example: List Cases
curl -H "Authorization: Bearer dfire_ak_abc123..." \
https://your-dfire-instance.com/api/cases/
Example: Create a Case
curl -X POST \
-H "Authorization: Bearer dfire_ak_abc123..." \
-H "Content-Type: application/json" \
-d '{"title": "Phishing incident", "case_mode": "incident", "severity": "high"}' \
https://your-dfire-instance.com/api/cases/
Authentication Behavior
| Scenario | Result |
|---|---|
| Valid, enabled, non-expired key | Request proceeds with the key owner's permissions |
| Expired key | 401 Unauthorized |
| Disabled key | 401 Unauthorized |
| Invalid key value | 401 Unauthorized |
| Key owner's account is inactive | 401 Unauthorized |
| Too many failed attempts from same IP | 401 Unauthorized (rate limited) |
| No Authorization header | Falls through to session auth (browser login) |
Multi-Factor Authentication and API keys
An API key is a credential in its own right. DFIRe never asks it for a code, whether or not its owner has multi-factor authentication turned on. Treat a key as equal to the account it belongs to: give it an expiry, keep it out of shared storage, and disable it once it is no longer needed.
A key cannot set up, change or remove multi-factor authentication. DFIRe refuses those requests unless they come from a signed-in browser session. A key that could also enrol an authenticator would turn a leaked key into permanent control of the account.
Administering other people's accounts is different, and a key with the permission to change users can do it. That includes clearing a user's multi-factor authentication and restoring the sign-ins a tenant-wide requirement has used up.
API Documentation
Every DFIRe installation includes built-in API reference documentation generated from the live application. The documentation is always up-to-date and reflects the exact endpoints, parameters, and response formats available in your version.
Accessing the API Reference
| Resource | URL | Description |
|---|---|---|
| API Reference | /api/docs/ |
Interactive ReDoc documentation with endpoint descriptions, request/response schemas, and authentication details. |
| OpenAPI Schema | /api/docs/schema/ |
Raw OpenAPI 3.0 YAML schema. Import into Postman, Insomnia, or code generators. |
Both endpoints require authentication (browser session or API key). Links are also available in Settings > Global Settings under the API Documentation section.
Key Endpoint Groups
The API is organized into the following groups:
| Group | Base Path | Description |
|---|---|---|
| Cases | /api/cases/ |
Case CRUD, timers, indicators, timeline, exports |
| Items | /api/items/ |
Evidence item management |
| Attachments | /api/attachments/ |
Encrypted file uploads and downloads |
| IOC | /api/indicators/ |
Indicator registry, enrichment, bulk operations |
| API Keys | /api/api-keys/ |
API key management |
| Users | /api/users/ |
User management and profiles |
| Search | /api/search/ |
Full-text search across all entities |
| Webhooks | /api/webhooks/ |
Outgoing webhook configuration |
| Audit Log | /api/audit-logs/ |
Immutable audit trail |
| System | /api/system-settings/ |
Tenant configuration and admin operations |
See the built-in API reference at /api/docs/ for complete endpoint details, request/response schemas, and parameter documentation.
Security Best Practices
- Use service accounts for integrations. Avoid using personal API keys for automated systems. Service accounts make it clear which permissions are granted to which integration.
- Set short expiration dates. Rotate keys regularly. Use the shortest lifetime that is practical for your integration.
- Store keys in secrets managers. Never hardcode API keys in scripts, configuration files, or version control. Use your platform's secrets management (AWS Secrets Manager, HashiCorp Vault, environment variables).
- Apply least privilege. Create dedicated groups with minimal permissions for each integration. A SIEM connector that only reads cases should not have write access.
- Monitor usage. Review API key usage statistics and audit logs regularly. Disable keys that show unexpected activity or are no longer in use.
- Disable before deleting. If you suspect a key may be compromised, disable it first to immediately block access, then investigate before deciding whether to delete or regenerate.