SigSentrySigSentry
Log Sources

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}/test

Path parameters

ParamTypeNotes
idUUIDThe 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"
      }
    ]
  }
}
FieldTypeNotes
connectedbooleanWhether the credentials authenticated
messagestringHuman-readable status from the platform
sampleLogsarrayA handful of normalized entries from a small recent window; long messages may be truncated
sampleLogs[].timestampISO 8601When the log was emitted
sampleLogs[].levelstringNormalized log level (INFO, WARN, ERROR, etc.)
sampleLogs[].servicestringService name (when available)
sampleLogs[].messagestringThe 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

Statuserror.codeWhen
400VALIDATION_ERRORid is not a UUID
401UNAUTHORIZEDMissing or invalid API key
403FORBIDDENKey lacks config:read
404NOT_FOUNDNo 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.