Internal site. Jolli authentication required to view.
Skip to Content
API ReferenceOutput ConnectorsPOST /v0/pipelines/{pipeline_name}/egress/{table_name}

Subscribe to View

POST/v0/pipelines/{pipeline_name}/egress/{table_name}Output Connectors

Try it

POST/v0/pipelines/{pipeline_name}/egress/{table_name}
Authentication
Parameters

Subscribe to a stream of updates from a SQL view or table.

The pipeline responds with a continuous stream of changes to the specified table or view. The stream is configurable two ways:

  • Simple configuration of the format may be provided using query parameters. Use format to specify csv or json output and, for json only, array to specify whether to group updates into JSON arrays. Specify backpressure to specify behavior when the HTTP client cannot keep up.

  • Comprehensive configuration may be provided by providing a connector configuration as a JSON body. In this case, no query parameters are allowed.

Updates are split into Chunks.

The pipeline continues sending updates until the client closes the connection or the pipeline is stopped.

Authentication

  • JSON web token (JWT) or API keyBearer token

Parameters

Path parameters

NameTypeRequiredDescription
pipeline_namestringYesUnique pipeline name
table_namestringYesSQL table name. Unquoted SQL names have to be capitalized. Quoted SQL names have to exactly match the case from the SQL program.

Query parameters

NameTypeRequiredDescription
formatstringYesOutput data format, either 'csv' or 'json'.
arraybooleanNoSet to `true` to group updates in this stream into JSON arrays (used in conjunction with `format=json`). The default value is `false`
backpressurebooleanNoApply backpressure on the pipeline when the HTTP client cannot receive data fast enough. When this flag is set to false (the default), the HTTP connector drops data chunks if the client is not keeping up with its output. This prevents a slow HTTP client from slowing down the entire pipeline. When the flag is set to true, the connector waits for the client to receive each chunk and blocks the pipeline if the client cannot keep up.

Response

200Connection to the endpoint successfully established. The body of the response contains a stream of data chunks.application/json
  • object
    A set of updates to a SQL table or view. The `sequence_number` field stores the offset of the chunk relative to the start of the stream and can be used to implement reliable delivery. The payload is stored in the `bin_data`, `text_data`, or `json_data` field depending on the data format used.
    • bin_datastring (binary)
      Base64 encoded binary payload, e.g., bincode.
    • json_dataobject
      JSON payload.
    • sequence_numberinteger (int64)required
    • text_datastring
      Text payload, e.g., CSV.
400application/json
  • object
    Information returned by REST API endpoints on error.
    • detailsobjectrequired
      Detailed error metadata. The contents of this field is determined by `error_code`.
    • error_codestringrequired
      Error code is a string that specifies this error type.
    • messagestringrequired
      Human-readable error message.
404Pipeline and/or table/view with that name does not existapplication/json
  • object
    Information returned by REST API endpoints on error.
    • detailsobjectrequired
      Detailed error metadata. The contents of this field is determined by `error_code`.
    • error_codestringrequired
      Error code is a string that specifies this error type.
    • messagestringrequired
      Human-readable error message.
500application/json
  • object
    Information returned by REST API endpoints on error.
    • detailsobjectrequired
      Detailed error metadata. The contents of this field is determined by `error_code`.
    • error_codestringrequired
      Error code is a string that specifies this error type.
    • messagestringrequired
      Human-readable error message.
503application/json
  • object
    Information returned by REST API endpoints on error.
    • detailsobjectrequired
      Detailed error metadata. The contents of this field is determined by `error_code`.
    • error_codestringrequired
      Error code is a string that specifies this error type.
    • messagestringrequired
      Human-readable error message.
Request
curl -X POST 'https://api.example.com/v0/pipelines/{pipeline_name}/egress/{table_name}?format=<format>&array=<array>&backpressure=<backpressure>' \ -H 'Authorization: Bearer YOUR_TOKEN'