Skip to contentSkip to page list

Docs

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.

POST/api/v1/governance/security-lake/sources/{sourceId}/test
Request and response examples
request.py
import osimport requests​origin = "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())

Success

application/json · Generated from schema

{  "ok": false,  "waiting": -9007199254740991,  "inFlight": -9007199254740991,  "error": "string"}
api-reference/governance-security-lake/test-a-security-lake-source-s-connection

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

Request body

application/json

configobject
regionstring
Pattern ^[a-z]{2}(-[a-z]+)+-\d$
subscriberRoleArnstring
Pattern ^arn:aws[a-z-]*:iam::\d{12}:role\/.+$
queueUrlstring (uri)
sourcesstring[]
maxMessagesPerRuninteger
Minimum 1Maximum 1000
maxReceivesinteger
Minimum 1Maximum 20
s3Endpointstring (uri) | null
sqsEndpointstring (uri) | null
schedulestring
credentialsobject
aws_access_key_idstringrequired
At least 1 character
aws_secret_access_keystringrequired
At least 1 character
aws_session_tokenstring
At least 1 character

Responses

200

Success

application/json

okbooleanrequired
waitinginteger | nullrequired
Option 1integer
Option 2null
inFlightinteger | nullrequired
Option 1integer
Option 2null
errorstring | nullrequired
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