Skip to navigation

Run a read-only query on a knowledge store

View as Markdown

Runs one statement as a read-only role through the deployment’s portal. The audit log records the statement.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

idstringRequired
Deployment ID
namestringRequired
Knowledge entry name

Request

This endpoint expects an object.
sqlstringOptional

One SQL statement, at most 4096 bytes. It runs read-only, for at most 5 seconds, and returns at most 500 rows or 1 MiB.

Response

OK
columnslist of objectsOptional
duration_mslongOptional
errorobjectOptional
row_countintegerOptional
rowslist of lists of stringsOptional
Cells as Postgres prints them, null for NULL
truncatedbooleanOptional
True when the row or byte limit cut the result short

Errors

400
Bad Request Error
404
Not Found Error
409
Conflict Error
504
Gateway Timeout Error