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}.
Test a Security Lake source's connection
Reads the subscriber queue's backlog without taking a message. Settings and keys in the body are tested over the stored ones and not saved; an empty body tests the stored source. ok is false with the AWS error code when the queue refused or could not be reached.
Try this endpoint
app.langwatch.ai
API key · Authorization
Kept in this tab. Cleared when you reload.
This sends a live request to app.langwatch.ai.
Request and response examples
import osimport requestsorigin = "https://app.langwatch.ai"path = "/api/v1/governance/security-lake/sources/<sourceId>/test"api_key = os.environ["LANGWATCH_API_KEY"]headers = { "Authorization": "Bearer " + api_key,}response = requests.post( origin + path, headers=headers,)print(response.json())const url = "https://app.langwatch.ai/api/v1/governance/security-lake/sources/<sourceId>/test";const response = await fetch(url, { method: "POST", headers: { "Authorization": "Bearer " + process.env.LANGWATCH_API_KEY, },});const data = await response.json();curl --request POST \ --url 'https://app.langwatch.ai/api/v1/governance/security-lake/sources/<sourceId>/test' \ --header "Authorization: Bearer $LANGWATCH_API_KEY"Call the LangWatch API from this project: Test a Security Lake source's connection.Request: POST https://app.langwatch.ai/api/v1/governance/security-lake/sources/<sourceId>/testReference: https://langwatch.ai/docs/api-reference/governance-security-lake/test-a-security-lake-source-s-connection.mdAuthentication: send the Authorization header as a Bearer token, read from the LANGWATCH_API_KEY environment variable. Never hard-code the key.Use the HTTP client this project already uses, handle non-2xx responses, and show me the parsed result.Success
application/json · Generated from schema
{ "ok": false, "waiting": -9007199254740991, "inFlight": -9007199254740991, "error": "string"}Bad Request
application/json · Generated from schema
{ "type": "string", "code": "string", "message": "string", "retryable": false, "meta": {}, "trace_id": "string", "span_id": "string", "trace": { "traceId": "string", "spanId": "string", "traceUrl": "string", "logsUrl": "string" }, "tips": [ "string" ], "docs_url": "string", "fault": "customer", "reasons": [ null ]}Unauthorized
application/json · Generated from schema
{ "type": "string", "code": "string", "message": "string", "retryable": false, "meta": {}, "trace_id": "string", "span_id": "string", "trace": { "traceId": "string", "spanId": "string", "traceUrl": "string", "logsUrl": "string" }, "tips": [ "string" ], "docs_url": "string", "fault": "customer", "reasons": [ null ]}Forbidden
application/json · Generated from schema
{ "type": "string", "code": "string", "message": "string", "retryable": false, "meta": {}, "trace_id": "string", "span_id": "string", "trace": { "traceId": "string", "spanId": "string", "traceUrl": "string", "logsUrl": "string" }, "tips": [ "string" ], "docs_url": "string", "fault": "customer", "reasons": [ null ]}Internal Server Error
application/json · Generated from schema
{ "type": "string", "code": "string", "message": "string", "retryable": false, "meta": {}, "trace_id": "string", "span_id": "string", "trace": { "traceId": "string", "spanId": "string", "traceUrl": "string", "logsUrl": "string" }, "tips": [ "string" ], "docs_url": "string", "fault": "customer", "reasons": [ null ]}Path parameters
sourceIdstringrequiredRequest body
application/json
configobjectcredentialsobjectResponses
200Success
application/json
okbooleanrequiredwaitinginteger | nullrequiredinFlightinteger | nullrequirederrorstring | nullrequired400Bad Request
application/json
typestringrequiredcodestringrequiredmessagestringrequiredretryablebooleanrequiredmetaobjecttrace_idstringspan_idstringtraceobjecttipsstring[]docs_urlstringfaultstring"customer""platform""provider""presumed_platform"reasonsany[]401Unauthorized
application/json
typestringrequiredcodestringrequiredmessagestringrequiredretryablebooleanrequiredmetaobjecttrace_idstringspan_idstringtraceobjecttipsstring[]docs_urlstringfaultstring"customer""platform""provider""presumed_platform"reasonsany[]403Forbidden
application/json
typestringrequiredcodestringrequiredmessagestringrequiredretryablebooleanrequiredmetaobjecttrace_idstringspan_idstringtraceobjecttipsstring[]docs_urlstringfaultstring"customer""platform""provider""presumed_platform"reasonsany[]500Internal Server Error
application/json
typestringrequiredcodestringrequiredmessagestringrequiredretryablebooleanrequiredmetaobjecttrace_idstringspan_idstringtraceobjecttipsstring[]docs_urlstringfaultstring"customer""platform""provider""presumed_platform"reasonsany[]