All endpoints require an API key. Send it in the X-API-KEY request header (recommended) or in the api_key query parameter.
Base URL: https://<LOGSIGN_HOST>
Authentication
We recommend the X-API-KEY header. The header name is not case sensitive. A key in the URL is written in clear text to web server access logs and proxy logs, and a key in a header is not.
curl --location 'https://YOUR_HOST/test_api' --header 'X-API-KEY: YOUR_API_KEY'
The api_key query parameter still works, so existing integrations do not need any change. The examples in this article use the query parameter. You can move the key from any of them into the X-API-KEY header.
When a request contains the header, Logsign uses only the header. If the header value is wrong or empty, the request is refused with HTTP 403, even if the query parameter holds a valid key.
Header authentication is available only in Logsign versions that include this change. Older versions accept only the api_key query parameter and return HTTP 403 for a key sent in a header.
If your Logsign instance collects its own nginx logs, the nginx parser masks the key as api_key=*** in the URL.Path field of newly parsed events. Events stored before the update and the raw message (when raw message storage is enabled for the source) still contain the key. If a key appeared in your logs, rotate it.
Two kinds of key are accepted. The main API key (Settings › System › Security › Api Key) has access to every endpoint. Limited API keys can use only the endpoints you select for them. Both kinds are sent in the same way. See Limited API Keys below.
Limited API Keys
Limited API keys let you give each integration its own key with access to only the endpoints it needs. For example, one key can use only Get Events and another key can use only Get Incidents. The main API key does not change and keeps full access, so existing integrations continue to work.
Limited API Keys is a section of the Settings › System › Security page. This page is available only to super admin users.
Create a limited key
- Go to Settings › System › Security and find the Limited API Keys section.
- Click New API Key.
- Enter a Name for the key. The name can have up to 64 characters and must be different from the names of the other limited keys (the comparison ignores letter case).
- Select All endpoints, or select one or more endpoint permissions from the list. You must select at least one permission.
- Click Save.
- The API key created window shows the new key. Copy it and store it in a safe place, then click I copied the key.
The key is shown only once, at creation. Logsign stores only a SHA-256 digest of the key, so it cannot show the key again. If a key is lost, delete it and create a new one. In the list, the Key column shows only the last four characters of each key. Limited keys start with lsk_.
You can create up to 20 limited keys.
Permissions
Each permission allows one endpoint. All endpoints allows every endpoint in the table.
| Permission (as shown in the UI) | Endpoint |
|---|---|
| List data collections | GET /data_collection_list |
| Read feed lists | GET /feed_list |
| Add to feed lists | POST /feed_list |
| Count events (get_count) | GET /get_count |
| Search events (get_events) | GET /get_events |
| Search system events | GET /get_system_events |
| Read column values (get_columns) | GET /get_columns |
| Read incidents (get_incidents) | GET /get_incidents |
| Change incident status | POST /set_incident_status |
| Comment on incidents | POST /incident_comment |
| Read product version | GET /get_version |
| Read alert configurations | GET /get_alert_configs |
/test_api does not need a permission. It accepts every active limited key, so you can use it to check a new key. It does not tell you which endpoints the key can use.
A limited key that calls an endpoint it has no permission for gets HTTP 403 with the message API key is not permitted to use this endpoint.
Edit, disable or delete a limited key
- Edit: click Edit in the key's row to change its name or permissions. The key value does not change, so the integration that uses it does not need an update.
-
Disable: turn off the Active switch in the key's row. A disabled key gets HTTP 403 with the message
Invalid API keyon every endpoint, including/test_api. Turn the switch on again to enable the key. -
Delete: click Delete and confirm. Integrations that use the key stop working, because a deleted key gets HTTP 403 with the message
Invalid API key. A deleted key cannot be restored from this page.
Creating, editing and deleting a limited key writes an audit event. The event does not contain the key.
Table of Contents
1. Test API
Tests the API connection and validates the API key. It accepts the main API key and every active limited API key, whatever permissions the limited key has.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| api_key | string | Yes | API key. You can send it in the X-API-KEY header instead. |
Example Request
GET /test_api?api_key=YOUR_API_KEY
Example Response
{
"success": true
}
2. Get Version
Returns the current Logsign SIEM version.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| api_key | string | Yes | API key. You can send it in the X-API-KEY header instead. |
Example Request
GET /get_version?api_key=YOUR_API_KEY
Example Response
{
"success": true,
"version": "6.4.1"
}
3. Feed List (GET)
Returns all entries from the specified feed list.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| api_key | string | Yes | API key. You can send it in the X-API-KEY header instead. |
| list_name | string | Yes | Name of the feed list |
| format | string | No | Set to txt to return the response as plain text |
Example Request
GET /feed_list?api_key=YOUR_API_KEY&list_name=blocked_ips
4. Feed List (POST)
Adds a new entry to the specified feed list.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| api_key | string | Yes | API key. You can send it in the X-API-KEY header instead. |
| list_name | string | Yes | Name of the feed list |
Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| value | string | Yes | The value to add |
| expire_time | int | No | Expiration time in seconds (default: 0 = no expiry) |
Example Request
POST /feed_list?api_key=YOUR_API_KEY&list_name=blocked_ips
Content-Type: application/json
{
"value": "192.168.1.100",
"expire_time": 3600
}
5. Get Count
Returns a single number calculated on the grouped_column field of the events that match the query in the given time frame. The criteria parameter selects how that number is calculated.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| api_key | string | Yes | API key. You can send it in the X-API-KEY header instead. |
| query | string | Yes | Search query. Use * to match all events. |
| grouped_column | string | Yes | Logsign field the number is calculated on, for example Source.IP
|
| criteria | string | Yes |
unique returns the number of distinct values of grouped_column. value returns the number of events in which grouped_column has a value. No other values are supported. |
| time_frame | string | Yes | Time window in the format <number> <unit>, for example 1 hour. See the note below. |
time_frame format: a number and a unit separated by a space. The unit is min, hour or day (for example 10 min, 24 hour, 7 day), and the window is capped at 1440 min, 168 hour or 7 day. Encode the space as %20 in the URL. Values such as last_1_hour are not accepted. Since version 6.4.115 an invalid time_frame is rejected with HTTP 403 and an explanatory message; older versions return HTTP 500. The same format applies to Get Events, Get Columns, Get Incidents and Get System Events.
Example Request
GET /get_count?api_key=YOUR_API_KEY&query=*&grouped_column=Source.IP&criteria=unique&time_frame=1%20hour
Example Response
{
"success": true,
"count": 42
}
success is false when the calculated number is 0.
6. Get Events
Returns events matching the given query with pagination support. Results are sorted by Time.Generated, newest first.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| api_key | string | Yes | API key. You can send it in the X-API-KEY header instead. |
| query | string | Yes | Search query using Logsign field names, for example Source.IP:10.0.0.1. Use * to match all events. |
| time_frame | string | Yes | Time window in the format <number> <unit>, for example 1 hour. See the time_frame format note under Get Count. |
| page | int | No | Page number (default: 1) |
| size | int | No | Results per page (default: 100, max: 1000) |
Example Request
GET /get_events?api_key=YOUR_API_KEY&query=Source.IP:10.0.0.1&time_frame=1%20hour&page=1&size=50
Example Response
{
"success": true,
"events": [
{
"Time": { "Generated": "..." },
"Source": { "IP": "10.0.0.1" },
"...": "..."
}
],
"total_count": 1342,
"size": 50
}
Use total_count to calculate the number of pages: ceil(total_count / size).
7. Get Columns
Returns the distinct values of grouped_column across the events that match the query in the given time frame. Up to 1000 values are returned.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| api_key | string | Yes | API key. You can send it in the X-API-KEY header instead. |
| query | string | Yes | Search query. Use * to match all events. |
| grouped_column | string | Yes | Logsign field whose values are returned, for example Source.IP
|
| time_frame | string | Yes | Time window in the format <number> <unit>, for example 24 hour. See the time_frame format note under Get Count. |
Example Request
GET /get_columns?api_key=YOUR_API_KEY&query=*&grouped_column=Source.IP&time_frame=24%20hour
Example Response
{
"success": true,
"columns": ["10.0.0.1", "10.0.0.2"]
}
8. Get Incidents
By default this endpoint returns alert data (DataType:Alert) for backward compatibility. Since version 6.4.112, sending source=incident returns actual incident data instead, including incident status. This makes it possible to distinguish open and closed incidents.
Returns incidents created after the specified timestamp.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| api_key | string | Yes | API key. You can send it in the X-API-KEY header instead. |
| last_run | string | Yes | Timestamp; returns incidents created after this time |
| query | string | No | Filter query |
| source | string | No |
Data source to return. Set to incident to return incident data (with status). If omitted, alert data is returned (default). |
Example Request
GET /get_incidents?api_key=YOUR_API_KEY&last_run=2026-04-17T00:00:00Z&query=severity:high
GET /get_incidents?api_key=YOUR_API_KEY&last_run=2026-04-17T00:00:00Z&source=incident
time_frame
curl --location 'https://YOUR_HOST/get_incidents?api_key=YOUR_API_KEY&time_frame=10%20min&query=*&source=incident'
curl --location 'https://YOUR_HOST/get_incidents?api_key=YOUR_API_KEY&time_frame=1%20hour&query=*&source=incident'
9. Set Incident Status
Closes an incident with the given reason and comment.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| api_key | string | Yes | API key. You can send it in the X-API-KEY header instead. |
| incident_id | string | Yes |
Incident ID. Either the Incident.ID column value or the DocID shown in the incident URL can be used; both work |
Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| reason_id | int | Yes | Close reason. See the reason list below. |
| comment | string | Yes | Comment describing why the incident is being closed. |
reason_id values
| reason_id | Meaning |
| 1 | False Positive |
| 2 | True Positive |
| 3 | No Action |
| 4 | Resolved |
| 5 | Other |
Example Request
POST /set_incident_status?api_key=YOUR_API_KEY&incident_id=123
Content-Type: application/json
{
"reason_id": 4,
"comment": "close comment str"
}
For example, sending reason_id 4 closes the incident as Resolved.
10. Incident Comment
Adds a comment to an incident.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| api_key | string | Yes | API key. You can send it in the X-API-KEY header instead. |
Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| incident_id | string | Yes | Incident ID |
| message | string | Yes | Comment text |
Example Request
POST /incident_comment?api_key=YOUR_API_KEY
Content-Type: application/json
{
"incident_id": "INC-001",
"message": "Incident reviewed and closed as false positive."
}
11. Get Alert Configs
Returns all alert configurations grouped by alert blocks.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| api_key | string | Yes | API key. You can send it in the X-API-KEY header instead. |
Example Request
GET /get_alert_configs?api_key=YOUR_API_KEY
Example Response
[
{
"uid": "block-001",
"name": "Network Alerts",
"alerts": [
{
"uid": "alert-001",
"name": "High Traffic Alert",
"disabled": false,
"block_uid": "block-001"
}
]
}
]
Error Responses
| HTTP Code | Description |
|---|---|
| 403 |
Invalid API key: the key is wrong or empty, a wrong or empty X-API-KEY header was sent, or the limited API key is disabled or deleted. |
| 403 |
API key is not permitted to use this endpoint: the limited API key is valid but has no permission for this endpoint. Add the permission to the key under Settings › System › Security › Limited API Keys. |
| 403 | Missing or invalid required parameter. The message names the parameter, for example query cannot be empty. |
| 400 | Invalid request body (JSON parse error) |
| 429 | Rate limit exceeded |
| 503 | The API key could not be checked because a platform service was unavailable (API signing key is unavailable or API key store is unavailable). Retry later. |
12. Get System Events
Returns system events (DataType:system) matching the given query with pagination support.
GET/get_system_events 30/min
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| api_key | string | Yes | API key. You can send it in the X-API-KEY header instead. |
| time_frame | string | Yes | Time frame for the query (format: <number> <unit>) |
| query | string | No | Search query (if omitted, all system events are returned) |
| page | int | No | Page number (default: 1) |
| size | int | No | Results per page (default: 100, max: 1000) |
time_frame units
| Unit | Meaning | Upper bound |
|---|---|---|
| min | Minutes | 1440 (24 hours) |
| hour | Hours | 168 (7 days) |
| day | Days | 7 |
Example Request
GET /get_system_events?api_key=YOUR_API_KEY&time_frame=1 hourExample Response
{
"success": true,
"events": [
{
"Time": { "Generated": "..." },
"DataType": "system",
"...": "..."
}
],
"total_count": 1342
}Notes
- Results are sorted by
Time.Generateddescending (newest first). - Use
total_countto calculate total pages:ceil(total_count / size). - Unlike
/get_events, thequeryparameter is optional; omitting it returns all system events.
13. Data Collection List
Returns the list of data sources defined in the system: type, host, vendor/product (if set), logging state, enabled/disabled status and tags.
GET/data_collection_list 10/min
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| api_key | string | Yes | API key. You can send it in the X-API-KEY header instead. |
Example Request
GET /data_collection_list?api_key=YOUR_API_KEYExample Response
{
"success": true,
"data_collection": [
{
"type": "Windows",
"description": "DC01 Windows Event Log",
"host": "10.0.0.15",
"vendor": "Microsoft",
"product": "Windows",
"logging_state": "Active",
"status": "Enabled",
"tags": "Domain Controller, Critical"
},
{
"type": "Syslog",
"description": "Legacy Firewall",
"host": "10.0.0.20",
"logging_state": "Passive",
"status": "Enabled",
"tags": "-"
}
],
"total_count": 2
}Notes
- The response does not include a raw last-log timestamp. Instead,
logging_statereports whether the source is currentlyActive(received logs within its expected health-check period) orPassive. -
statusreflects the source's admin configuration (Enabled/Disabled), not its logging activity. -
vendorandproductare only present when both are set on the source configuration. -
tagsis a comma-separated list of tag descriptions attached to the source, or-if none.