---
title: "Send a list of partitions to a stream layer"
method: POST
path: "/layers/{layerId}/partitions"
tags: ["ingestion"]
---

# Send a list of partitions to a stream layer

`POST /layers/{layerId}/partitions`

Upload partitions to the given layer. For better performance batch your partitions (e.g. 1000 per request), rather than uploading them individually.

## Path parameters

- `layerId` string, required

## Query parameters

- `billingTag` string

## Headers

- `X-HERE-TraceId` string

## Request body

- PublishPartitions
  - `partitions` PublishPartition[] — Array of partitions.
    - `partition` string, required — A key that specifies the partition that the content is related to. It is required. If the layer's partitioning scheme is set to `heretile`, the partition key is the tile key. The maximum length of the partition key is 500 characters. Partition field is used as a `key` field within Kafka message.
    - `checksum` string, [0-9a-fA-F]+ — The checksum of the content when published to Blob API. The algorithm used to calculate the checksum is user specific which is defined in catalog configuration for the layer. Algorithms that you can use are, for example, MD5 or SHA1. This is not a secure hash, so you should only use it to detect changes in content. Checksum is passed as `dsChecksum` kafka record header.
    - `compressedDataSize` integer — The compressed size in bytes of the content published to Blob API. Applicable when Content-Encoding is set to gzip when uploading and downloading data in the Blob API. CompressedDataSize is passed as `dsCompressedDataSize` kafka record header.
    - `dataSize` integer — The nominal size in bytes of the content published to Blob API. When compression is enabled, this is the size of the uncompressed content. DataSize is passed as `dsDataSize` kafka record header.
    - `data` string, byte — The content published directly in the metadata and encoded in base64. The size of the content is limited to 1MB before base64 encryption. Either `data` or `dataHandle` must be present. Data is passed as `value` field kafka record.
    - `dataHandle` string — The handle created when uploading the content to the Blob API, that is used to retrieve the content at a later stage. Either `data` or `dataHandle` must be present. DataHandle is passed as `dsDataHandle` kafka record header.
    - `timestamp` integer — The timestamp of the content, in milliseconds since the Unix epoch. The format of the timestamp is user specific. If the content contains multiple elements each having its own timestamp, we recommend setting the metadata timestamp to the earliest of them. This field if present is used as kafka record timestamp.
    - `crc` string — User provided CRC of the partition data in bytes. Should be lowercase. Crc is passed as `dsCrc` kafka record header.

## Response `200`

OK

- ResponseOk
  - `traceId` object
    - `parentId` string — A unique ID for the messages list. This can be a user-defined trace ID included in the request. If a trace ID was not included in the request, one is generated during ingestion and included in the response. You can use this ID to track your request and identify the message in the catalog.
    - `generatedIds` string[]

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `404` — No handler found
- `413` — Payload Too Large
- `415` — Unsupported Media Type
- `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)
