Skip to contentSkip to page list

Docs

Read a Security Lake source's health

The source's last read time, lag (from the oldest event written in the last run to that run), running counts of messages, objects, rows, events written and dropped, the last run's error, and the latest poison objects the reader gave up on.

GET/api/v1/governance/security-lake/sources/{sourceId}/health
Request and response examples
request.py
import osimport requests​origin = "https://app.langwatch.ai"path = "/api/v1/governance/security-lake/sources/<sourceId>/health"api_key = os.environ["LANGWATCH_API_KEY"]headers = {    "Authorization": "Bearer " + api_key,}​response = requests.get(    origin + path,    headers=headers,)print(response.json())

Success

application/json · Generated from schema

{  "sourceId": "string",  "status": "string",  "lastError": "string",  "health": {    "lastReadAt": 0,    "lagMs": 0,    "runs": 0,    "messages": 0,    "objects": 0,    "rows": 0,    "written": 0,    "dropped": 0,    "invalid": 0,    "retried": 0,    "poisonCount": 0,    "poison": [      {        "messageId": "string",        "key": "string",        "reason": "string",        "at": 0      }    ]  }}
api-reference/governance-security-lake/read-a-security-lake-source-s-health

Authorization

Authorizationstringheaderrequired

Admin API key for organization-level operations (managing projects, API keys). Create one in Settings > API Keys or via POST /api/api-keys. Format: sk-lw-{id}_{secret}.

Path parameters

sourceIdstringrequired
At least 1 character

Responses

200

Success

application/json

sourceIdstringrequired
statusstringrequired
lastErrorstring | nullrequired
healthobjectrequired
lastReadAtnumber | nullrequired
lagMsnumber | nullrequired
runsintegerrequired
Minimum 0Maximum 9007199254740991
messagesintegerrequired
Minimum 0Maximum 9007199254740991
objectsintegerrequired
Minimum 0Maximum 9007199254740991
rowsintegerrequired
Minimum 0Maximum 9007199254740991
writtenintegerrequired
Minimum 0Maximum 9007199254740991
droppedintegerrequired
Minimum 0Maximum 9007199254740991
invalidintegerrequired
Minimum 0Maximum 9007199254740991
retriedintegerrequired
Minimum 0Maximum 9007199254740991
poisonCountintegerrequired
Minimum 0Maximum 9007199254740991
poisonobject[]required
400

Bad Request

application/json

typestringrequired
codestringrequired
messagestringrequired
retryablebooleanrequired
metaobject
trace_idstring
span_idstring
traceobject
traceIdstring
spanIdstring
traceUrlstring
logsUrlstring
tipsstring[]
docs_urlstring
faultstring
One of"customer""platform""provider""presumed_platform"
reasonsany[]
401

Unauthorized

application/json

typestringrequired
codestringrequired
messagestringrequired
retryablebooleanrequired
metaobject
trace_idstring
span_idstring
traceobject
traceIdstring
spanIdstring
traceUrlstring
logsUrlstring
tipsstring[]
docs_urlstring
faultstring
One of"customer""platform""provider""presumed_platform"
reasonsany[]
403

Forbidden

application/json

typestringrequired
codestringrequired
messagestringrequired
retryablebooleanrequired
metaobject
trace_idstring
span_idstring
traceobject
traceIdstring
spanIdstring
traceUrlstring
logsUrlstring
tipsstring[]
docs_urlstring
faultstring
One of"customer""platform""provider""presumed_platform"
reasonsany[]
500

Internal Server Error

application/json

typestringrequired
codestringrequired
messagestringrequired
retryablebooleanrequired
metaobject
trace_idstring
span_idstring
traceobject
traceIdstring
spanIdstring
traceUrlstring
logsUrlstring
tipsstring[]
docs_urlstring
faultstring
One of"customer""platform""provider""presumed_platform"
reasonsany[]

Documentation