The REST endpoint allows user to connect to SQL Gateway with REST API.
Overview of SQL Processing
When the client connects to the SQL Gateway, the SQL Gateway creates a
Session as the context to store the users-specified information
during the interactions between the client and SQL Gateway. After the creation of the
Session, the SQL Gateway server returns an identifier named
SessionHandle for later interactions.
After the registration of the
Session, the client can submit the SQL to the SQL Gateway server. When submitting the SQL,
the SQL is translated to an
Operation and an identifier named
OperationHandle is returned for fetch results later. The Operation has
its lifecycle, the client is able to cancel the execution of the
Operation or close the
Operation to release the resources used by the
OperationHandle, the client can fetch the results from the
Operation. If the
Operation is ready, the SQL Gateway will return a batch
of the data with the corresponding schema and a URI that is used to fetch the next batch of the data. When all results have been fetched, the
SQL Gateway will fill the
resultType in the response with value
EOS and the URI to the next batch of the data is null.
||The address that should be used by clients to connect to the sql gateway server.
||The address that the sql gateway server binds itself.
||The port that the sql gateway server binds itself. Accepts a list of ports (“50100,50101”), ranges (“50100-50200”) or a combination of both. It is recommended to set a range of ports to avoid collisions when multiple sql gateway servers are running on the same machine.
||The port that the client connects to. If bind-port has not been specified, then the sql gateway server will bind to this port.
The OpenAPI specification is still experimental.
Data Type Mapping
Currently, REST endpoint uses JSON format to serialize the Table Objects. Please refer
JSON format to the mappings.
Back to top