---
title: "Read next batch from cursor"
method: PUT
path: "/_fabric/{fabric}/_api/cursor/{cursor-identifier}"
tags: ["Query"]
---

# Read next batch from cursor

`PUT /_fabric/{fabric}/_api/cursor/{cursor-identifier}`

## Request

- The document declares no server URL.
- Auth: one of:
  - API key in header `Authorization`
  - HTTP bearer
- TypeScript: <https://skmtc.dev/macrometa/apis/macrometa-api-reference/docs/_fabric/:fabric/_api/cursor/:cursor-identifier/put.ts> (a function with typed inputs; its response is checked against the schema)

If the cursor has not been deleted, fetch an object with the following attributes:

- *id*: the *cursor-identifier*
- *result*: a list of documents for the current batch
- *hasMore*: *false* if this was the last batch
- *count*: if present the total number of elements

If *hasMore* returns *true*, the next call might still return no documents. If *hasMore* is *false*, the cursor is exhausted. Once the *hasMore* attribute has a value of *false*, the client can stop.

## Path parameters

- `fabric` string, string, required
- `cursor-identifier` string, string, required

## Response `200`

Successfully fetched JSON object.

- ApiCursorRc200
  - `code` integer: HTTP response code.
  - `error` boolean, required: Flag if there is an error in response. *False* for this response.
  - `count` integer: Total number of result documents available if the *count* attribute was used.
  - `extra` object: (Optional) A JSON object with extra information about the query result contained in the *stats* sub-attribute. For data-modification queries, the *extra.stats* sub-attribute contains the number of modified documents. If the *ignoreErrors* query option was specified, *extra.stats* also includes the number of documents that could not be modified due to an error.
  - `hasMore` boolean: *True* indicates there are more results available for the cursor on the server. *False* indicates there are no more results available.
  - `id` string: (Optional) ID of temporary cursor created on the server.
  - `cached` boolean: *True* indicates results are cached. *False* indicates results are not cached.
  - `result` unknown[]: An array of result documents (might be empty if query has no results).
    - unknown

## Other responses

- `400`: Failed due to missing or malformed data. Verify that all parameters are complete.
- `404`: Failed to find specified cursor.

---

[API](https://skmtc.dev/macrometa/apis/macrometa-api-reference.md) - [All operations](https://skmtc.dev/macrometa/apis/macrometa-api-reference/llms.txt) - [OpenAPI document](https://skmtc.dev/macrometa/apis/macrometa-api-reference/revisions/2006b6d7f31d?raw)
