---
search:
  tags:
    - Embeddings
    - POST
seo:
  description: >-
    Page through one space's rows at one level across the given sessions,
    ordered by… Reference for the POST /v1/embeddings/rows endpoint in the
    Roboto REST API.
sidebar:
  label: Get embedding rows
  badge: POST
title: Get embedding rows
type: openapi-operation
---
Page through one space's rows at one level across the given sessions, ordered by session and start.

Every page also describes the space, from the registry ``GET v1/embeddings/spaces`` lists. A request may also ask
for each row's distance to a seed, label columns, a 2-D projection or a stable sample; boards read all of these.
:py:func:`~roboto_service.domain.embeddings.rows_read.read_rows_page` reads the page.

Raises:
    RobotoInvalidRequestException: The request names more sessions than it may, ``where`` or a label column
        names something the store cannot filter or label by, the space has no rows at ``level``, ``page_token``
        is malformed or continues another request, or the projection cannot be fitted.
    RobotoNotFoundException: A session in ``session_ids`` belongs to another org, or ``space_id`` is not
        a live space of the org.
    RobotoUnauthorizedException: The request reads events or names a custom field the caller may not read, or
        gives a ``scope`` the caller may not search.
    RobotoFeatureNotAvailableException: The deployment does not run the pgvector embeddings store.

#### Access control
 - requires_org
 - Restricted tokens need the API scope `api.everything_else`

`POST /v1/embeddings/rows`

**Request body** (`application/json`, required)

- `space_id` (string, required)
- `level` (string, required)
- `session_ids` (string[] | null)
- `scope` (EmbeddingSessionScope | null)
- `where` (object | null)
- `start_ns` (integer | null)
- `end_ns` (integer | null)
- `include_vector` (boolean)
- `projection` (EmbeddingRowsProjection | null)
- `distance_to` (EmbeddingRowsDistanceTo | null)
- `attributes` (string[] | null)
- `sample` (EmbeddingRowsSample | null)

Request body example:

```json
{
  "space_id": "string",
  "level": "window",
  "session_ids": null,
  "scope": null,
  "where": null,
  "start_ns": null,
  "end_ns": null,
  "include_vector": false,
  "projection": null,
  "distance_to": null,
  "attributes": null,
  "sample": null
}
```

**Responses**

- `200` — OK
- `400` — Thrown when the conversation context (messages, system prompt, tool results) exceeds the model's context window limit. The token estimate and the model's context limit are not carried on the exception, so a caller cannot read usage numbers off it.
- `401` — Thrown when authentication fails
- `403` — Thrown if an operation would exceed a user or org level limit.
- `404` — Thrown if a user is attempting to perform an action unrecognized by the Roboto platform.
- `409` — Thrown if there is a conflict between a resource you're creating and another existing resource
- `410` — Thrown if a resource is missing or expired.
- `500` — An error the platform reported that this SDK release cannot resolve to a specific exception class. Reported for an element of a :py:class:\`\~roboto.http.BatchResponse\` whose error names a code this release defines no class for, or that arrived without a code, without a message, or as text that is not an error envelope at all. It carries whatever code and message the platform sent, so a caller handling the failure still learns what went wrong; when no message could be read, the message is the error's raw text. The error envelope carries no status code, so \`\`http\_status\_code\`\` reports the 500 inherited from :py:class:\`RobotoDomainException\` rather than the status the failure actually had.
- `501` — Thrown by shimmed out APIs which have not yet been implemented
- `503` — Thrown when a service is unavailable, such as when it's under heavy load and can't accept new requests. This is expected to be transient and ought to be retried.
- `504` — Thrown when the service times out while processing a request. This is exepcted to be transient and ought to be retried.
- `507` — Thrown when the server cannot complete the request because the response payload exceeds a storage or transport capacity limit (e.g., Lambda response size). This is NOT expected to be transient and should NOT be retried.

Response example, 200:

```json
{
  "data": {
    "items": [
      {
        "session_id": "string",
        "event_id": "string",
        "start_ns": 0,
        "end_ns": 0,
        "activity": 0,
        "n_samples": 0,
        "vector": null,
        "distance": null,
        "attributes": null
      }
    ],
    "next_token": null,
    "total_count": null,
    "space": {
      "space_id": "string",
      "name": "string",
      "is_map": true,
      "dim": 0
    },
    "projection": null,
    "coverage": null,
    "distance_to": null,
    "attributes": null,
    "sample": null
  }
}
```
