# getStream

## HTTP Request

```http
GET /readStreams/:streamId
```

## Path parameters

| Parameter |                                                                                                  |
| --------- | ------------------------------------------------------------------------------------------------ |
| streamId  | The id of the stream to consume, as returned in the [ReadSession.post](#response-body) response. |

## Query parameters

| Parameter |                                                                                                                                                                                                                                                              |
| --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| offset    | <p><strong>Optional.</strong> Used for resuming interrupted streams. </p><p></p><p>If specified, will start reading the stream at the provided numeric offset. Note that you cannot provide an offset beyond what has already been read from the stream.</p> |

{% hint style="info" %}
This endpoint extends the [general API structure](/api/rest-api/general-structure.md).
{% endhint %}

## Authorization

By default, only the user who created the stream's read session can consume its streams. If the data in the stream is not public, your access token must have one of the following scopes:

* data.data
* data.edit

However, if the stream's readSession was created with the [allowAnonymousAccess](/api/rest-api/readsessions/post.md#request-body) option, no authorization is required.

[Learn more about authorization.](/api/rest-api/authorization.md)

## Request body

The request body must be empty.

## Response body

The response body contains the streams data, in the format specified by the [ReadSession.post](/api/rest-api/readsessions/post.md) request:

{% tabs %}
{% tab title="arrow" %}

```
Arrow data is returned in the binary Arrow IPC Stream format
```

{% endtab %}

{% tab title="jsonl" %}
The response is returned in the [JSON Lines format](https://jsonlines.org/), with each row represented as an object of key:value pairs.&#x20;

<pre class="language-javascript"><code class="lang-javascript"><strong>// e.g.: ...table_ref/rows?selectedVariables=id,date,decimal,text
</strong>{"id":1, "date":"2012-01-01", "decimal":4.2, "text":"Some text"]
{"id":2, "date":"2012-01-01", "decimal":3.14, "text":"More text"]
...
</code></pre>

Please note the following regarding response data formats:

* Date variables are formatted as `YYYY-MM-DD`
* DateTime variables are formatted at `YYYY-MM-DD HH:MM:SS[.DDDDDD]`&#x20;
* Time variables are formatted as `HH:MM:SS[.DDDDDD]`
* Geography variables are formatted as [well-known text (WKT)](https://en.wikipedia.org/wiki/Well-known_text_representation_of_geometry)
  {% endtab %}

{% tab title="csv" %}
The response is returned as a comma-separated file.

<pre class="language-csv"><code class="lang-csv"><strong>// e.g.: table_ref/rows?format=csv&#x26;selectedVariables=id,date,decimal,text
</strong>"1","2012-01-01","4.2","Some text"
"2","2012-02-02","3.14","Some other text"
"3", ...
</code></pre>

Please note the following regarding response data formats:

* Date variables are formatted as `YYYY-MM-DD`
* DateTime variables are formatted at `YYYY-MM-DD HH:MM:SS[.DDDDDD]`&#x20;
* Time variables are formatted as `HH:MM:SS[.DDDDDD]`
* Geography variables are formatted as [well-known text (WKT)](https://en.wikipedia.org/wiki/Well-known_text_representation_of_geometry)
  {% endtab %}
  {% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.redivis.com/api/rest-api/readsessions/get.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
