You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Executes a Query using the given parameters. By default, this executes the latest version of the query.
11
12
12
-
Optional parameters do not need to be supplied.
13
+
This endpoint is maintained for backward compatibility only.
14
+
15
+
For all new implementations, use the `streamingExecute` endpoint, which supports all function types
16
+
and provides enhanced functionality.
13
17
14
18
15
19
### Parameters
@@ -190,3 +194,105 @@ See [README](../../../README.md#authorization)
190
194
191
195
[[Back to top]](#)[[Back to API list]](../../../README.md#apis-v2-link)[[Back to Model list]](../../../README.md#models-v2-link)[[Back to README]](../../../README.md)
192
196
197
+
# **streaming_execute**
198
+
Executes a Query using the given parameters, returning results as an NDJSON stream. By default, this executes the latest version of the query.
199
+
200
+
This endpoint supports all Query functions. The endpoint name 'streamingExecute' refers to the NDJSON
201
+
streaming response format. Both streaming and non-streaming functions can use this endpoint.
202
+
Non-streaming functions return a single-line NDJSON response, while streaming functions return multi-line NDJSON responses.
203
+
This is the recommended endpoint for all query execution.
204
+
205
+
The response is returned as a binary stream in NDJSON (Newline Delimited JSON) format, where each line
206
+
is a StreamingExecuteQueryResponse containing either a data batch or an error.
207
+
208
+
For a function returning a list of 5 records with a batch size of 3, the response stream would contain
209
+
two lines. The first line contains the first 3 items, and the second line contains the remaining 2 items:
Each line is a separate JSON object followed by a newline character. Clients should parse the stream
217
+
line-by-line to process results as they arrive. If an error occurs during execution, the stream will
218
+
contain an error line:
219
+
220
+
```
221
+
{"type":"error","errorCode":"INVALID_ARGUMENT","errorName":"QueryRuntimeError","errorInstanceId":"3f8a9c7b-2e4d-4a1f-9b8c-7d6e5f4a3b2c","errorDescription":"Division by zero","parameters":{}}
**ontology** | Optional[OntologyIdentifier] | Optional ontology identifier (RID or API name). When provided, executes an ontology-scoped function. When omitted, executes a global function. | [optional] |
233
+
**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] |
# Optional[OntologyIdentifier] | Optional ontology identifier (RID or API name). When provided, executes an ontology-scoped function. When omitted, executes a global function.
257
+
ontology ="example-ontology"
258
+
# Optional[PreviewMode] | Enables the use of preview functionality.
[[Back to top]](#)[[Back to API list]](../../../README.md#apis-v2-link)[[Back to Model list]](../../../README.md#models-v2-link)[[Back to README]](../../../README.md)
**ontology** | Optional[OntologyIdentifier] | No | Optional ontology identifier (RID or API name). When provided, executes an ontology-scoped function. When omitted, executes a global function. |
[[Back to Model list]](../../../../README.md#models-v2-link)[[Back to API list]](../../../../README.md#apis-v2-link)[[Back to README]](../../../../README.md)
Each line is a separate JSON object followed by a newline character. Clients should parse the stream
5428
+
line-by-line to process results as they arrive. If an error occurs during execution, the stream will
5429
+
contain an error line:
5430
+
5431
+
```
5432
+
{"type":"error","errorCode":"INVALID_ARGUMENT","errorName":"QueryRuntimeError","errorInstanceId":"3f8a9c7b-2e4d-4a1f-9b8c-7d6e5f4a3b2c","errorDescription":"Division by zero","parameters":{}}
0 commit comments