---
title: "Inserts index data to an index layer"
method: POST
path: "/layers/{layerID}"
tags: ["index"]
---

# Inserts index data to an index layer

`POST /layers/{layerID}`

Adds index data for a given data blob to an index layer. For more information, see [Publish to an Index Layer](https://www.here.com/docs/bundle/data-api-developer-guide/page/rest/publishing-data-index.html).

## Path parameters

- `layerID` string, required

## Request body

- Index[]
  - `checksum` string, byte — The checksum of the data being indexed by this index record.
  - `crc` string, byte — The cyclic redundancy check (CRC) of the data being indexed by this index record.
  - `fields` object — The indexing attributes for the data being indexed by this index record. The attributes must match the indexing attributes defined for the index layer. To get or set the index attributes for an index layer, use the `config` API.
  - `id` string, [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12} — The unique identifier (UUID) of the data being indexed by this index record.
  - `metadata` object — User-defined fields that can store extra metadata about this index record.
  - `size` integer — The size of the data being indexed by this index record.

## Response `201`

OK - The index was successfully created.

## Other responses

- `400` — Bad Request - The request is invalid. Verify and retry.
- `401` — Unauthorized - The credentials can't be authenticated by the system.
- `403` — Forbidden - The user is not authorized to create indexes.
- `404` — Not Found - A layer with the given name does not exist.
- `409` — Conflict - An index with the given ID already exists.

---

[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)
