POST /v1/config/log-sources/{id}/test
Verify connectivity to a saved log source and fetch a few sample lines
Tests the connection to a saved log source and returns a few recent log lines. Useful after saving a source for the first time, after rotating credentials, or when troubleshooting why an analysis turned up empty.
The test queries a small recent window and returns a handful of sample entries.
Authentication
API key with config:read permission.
Endpoint
POST /v1/config/log-sources/{id}/testPath parameters
| Param | Type | Notes |
|---|---|---|
id | UUID | The log source id |
Request body
None.
Response
200 OK — connection succeeded
{
"success": true,
"data": {
"connected": true,
"message": "Connected successfully",
"sampleLogs": [
{
"timestamp": "2026-04-25T14:29:51Z",
"level": "INFO",
"service": "checkout-api",
"message": "POST /checkout 200 18ms"
},
{
"timestamp": "2026-04-25T14:29:48Z",
"level": "ERROR",
"service": "checkout-api",
"message": "ConnectionPoolExhausted: timeout acquiring connection"
}
]
}
}| Field | Type | Notes |
|---|---|---|
connected | boolean | Whether the credentials authenticated |
message | string | Human-readable status from the platform |
sampleLogs | array | A handful of normalized entries from a small recent window; long messages may be truncated |
sampleLogs[].timestamp | ISO 8601 | When the log was emitted |
sampleLogs[].level | string | Normalized log level (INFO, WARN, ERROR, etc.) |
sampleLogs[].service | string | Service name (when available) |
sampleLogs[].message | string | The log line; long messages may be truncated |
sampleLogs may be empty even when connected is true — a quiet
service won't have emitted anything during the test window.
200 OK — connection failed
{
"success": false,
"data": {
"connected": false,
"message": "Invalid credentials: AWS Access Key ID is required",
"sampleLogs": []
}
}When credentials don't authenticate, the response uses
success: false at the top level but still returns
200 OK so callers can branch on the data.connected flag without
catching exceptions.
Error responses
| Status | error.code | When |
|---|---|---|
| 400 | VALIDATION_ERROR | id is not a UUID |
| 401 | UNAUTHORIZED | Missing or invalid API key |
| 403 | FORBIDDEN | Key lacks config:read |
| 404 | NOT_FOUND | No log source with that id in your tenant |
Example
curl -X POST https://api.sigsentry.com/v1/config/log-sources/ls_a1b2c3/test \
-H "Authorization: Bearer ss_secret_..."Idempotency
Test calls have no side-effects on stored data. Replay-safe; no
Idempotency-Key needed.
