---
title: "List data in view"
method: POST
path: "/v1/tools/list_data_in_view"
---

# List data in view

`POST /v1/tools/list_data_in_view`

## Request

- Base URL: `https://api.ploti.ai`
- URL: `https://api.ploti.ai/v1/tools/list_data_in_view`
- Auth: HTTP bearer

List every dataset the session's viewport offers (layers, tables, documents, scanned maps): the same list the Ploti map shows for this view and zoom, unranked, as titles. Use it when find_data doesn't find what you need or you are unsure it found the right thing. Rows (type, title, id, and a lock with what opens it) come grouped by place: the view's own places first, then state and national data. The header counts everything in view by place, category and type. Narrow it with types or categories to what the question needs, then page with offset until no next offset is given; leaving them out lists everything, which in a dense view runs to many pages. Pass ids from the rows to read those datasets in detail: description, category and how to read each. Then check a few rows (tools.schema, SQL) or a document's sections before using one.

## Request body

- object
  - `sessionId` string, required: The id start_session returned. Lost it? get_session without an id lists this workspace's open sessions.
  - `types` string[]: Kinds of data to keep: map layers queried with SQL, tables, documents (ordinances, plans, reports) or scanned maps. Every kind when left out.
  - `categories` string[]: Dataset categories to keep (zoning, hazards, and so on), spelled as the listing's header names them; every category when left out.
  - `ids` string[]: Dataset ids from the listing, or layer ids from find_data, to read in detail.
  - `limit` integer: Rows per page; 300 when left out. Narrowing types or categories usually beats a bigger page.
  - `offset` integer: Where the page starts: the next offset the previous page reported, or the first row when left out. Ignored with ids.

## Response `200`

What the tool returned: its text, any images, and structured data.

- object
  - `text` string, required
  - `images` object[], required
    - `mimeType` string
    - `data` string, byte
  - `data` unknown

## Other responses

- `400`: invalid_input: the arguments do not fit the tool's input schema.
- `403`: insufficient_scope: the credential may not use this tool.
- `404`: not_found: there is no such tool.
- `413`: payload_too_large: the body is over 256 KB (2 MB for /v1/tools).
- `415`: unsupported_media_type: a body was sent without Content-Type: application/json.
- `422`: tool_error: the tool refused or failed; error.message says why.
- `429`: rate_limited: this credential is over its rate. Retry after the Retry-After header's seconds.
- `500`: internal: Ploti failed. Retry; if it keeps happening, contact support.

---

[API](https://skmtc.dev/ploti/apis/ploti-api.md) · [All operations](https://skmtc.dev/ploti/apis/ploti-api/llms.txt) · [OpenAPI document](https://skmtc.dev/ploti/apis/ploti-api/revisions/8c2c91c72d52?raw)
