---
title: "Seek to predefined offset."
method: PUT
path: "/layers/{layerId}/seek"
tags: ["stream"]
---

# Seek to predefined offset.

`PUT /layers/{layerId}/seek`

Enables you to start reading data from a specified offset. You can move the message pointer to any offset in the layer (topic). Message consumption will start from that offset. Once you seek to an offset, there is no returning to the initial offset, unless the initial offset is saved. The base path to use is the value of 'nodeBaseURL' returned from /subscribe POST request.

## Path parameters

- `layerId` string, required

## Query parameters

- `subscriptionId` string
- `mode` 'serial' | 'parallel'

## Request body

- SeekOffsetsRequest
  - `offsets` StreamOffset[]
    - `partition` integer, required — The partition of the stream layer for which this offset applies. It is not the same as [Partitions object](https://heremaps.github.io/here-workspace-examples-java-scala/scala/com/here/platform/data/client/scaladsl/Partition.html).
    - `offset` integer, required — The offset in the partition of the stream layer.

## Response `200`

OK, seek successful

## Other responses

- `400` — Bad Request
- `401` — Unauthorized - the request didn't provide correct authentication details
- `403` — Forbidden - the specific account doesn't have correct privileges to perform the operation
- `404` — Not found
- `500` — Internal Server Error

---

[API](https://skmtc.dev/here/apis/query-api-v1.md) · [All operations](https://skmtc.dev/here/apis/query-api-v1/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/here/query-api-v1/revisions/30e5d2645407/schema)
