---
title: "Gets changes for the version range."
method: GET
path: "/layers/{layerId}/changes"
tags: ["metadata"]
---

# Gets changes for the version range.

`GET /layers/{layerId}/changes`

Gets the latest partition metadata in a version range for a versioned layer or a time range for a volatile layer. For versioned layers the range is expressed as a start and end version and returns only the latest changes for the partitions which were added and removed inbetween the specified start and end versions. If a partition was created and deleted between the versions specified in the `startVersion` and `endVersion` parameters, the partition is included in the response with an empty `dataHandle` value. For example, if you request versions `0` to `10`, and a partition was created in version `3` and then deleted in version `7`, it is included in the response with an empty `dataHandle` value.

## Path parameters

- `layerId` string, required

## Query parameters

- `startVersion` integer
- `endVersion` integer
- `sinceTime` integer
- `part` string
- `context` 'default' | 'extension' | 'super'
- `additionalFields` AdditionalFieldsEnum[]
- `billingTag` string

## Headers

- `Range` string

## Response `200`

OK

- Partitions — Describes a list of partitions for a given layer and layer version.
  - `partitions` Partition[], required
    - `layer` string — Id of the layer this partition belongs to.
    - `checksum` string — The checksum field is optional. The response includes the checksum only if `checksum` is specified in the `additionalFields` query parameter, and if a checksum was specified in the partition metadata when it was published. The algorithm used to calculate the checksum is user-specific. Algorithms that can be used are, for example, MD5 or SHA1. The algorithm is defined in the layer configuration. And if it is not defined in the catalog configuration, consumers cannot make any assumptions on the algorithm that was used to calculate the checksum. The checksum of the data content can be used if data comparison needs to be working for this catalog. The maximum length of the checksum field is 128 characters. In the case of the compressed data, the checksum is calculated for the uncompressed data.
    - `compressedDataSize` integer — Optional value for the size of the compressed partition data in bytes. The response only includes the compressed data size if `compressedDataSize` is specified in the `additionalFields` query parameter, and if compression is enabled, and if `compressedDataSize` was specified in the partition metadata when it was published.
    - `dataHandle` string — The data handle is used when retrieving the data that relates to this partition. The data handle identifies a specific blob so that the blob's contents can be requested with the Blob API. When requesting data from the Blob API, the catalog ID, layer ID and the dataHandle must be specified. An empty data handle indicates the removal of this partition.
    - `dataSize` integer — Optional value for the size of the partition data in bytes. The response only includes the data size if `dataSize` specified in the `additionalFields` query parameter, and if `dataSize` was specified in the partition metadata when it was published.
    - `crc` string — Optional value for the CRC of the partition data in bytes. The response only includes the data size if `crc` is specified in the `additionalFields` query parameter, and if `crc` was specified in the partition metadata when it was published.
    - `partition` string, required — The partition key. This is a unique key for a partition within a layer. If the layer's partitioning scheme is set to `heretile`, the partition key is equivalent to the tile key. The partition key cannot be empty. The maximum length of the partition key is 500 characters.
    - `version` integer, required — For active versioned partitions, the version of the catalog when this partition was last changed. For volatile partitions this will always be -1
  - `next` string, uri — If the number of results exceeds the limit, then this uri will be present and will provide the path to the next batch of results.

## Other responses

- `206` — Partial response in case the server provides and accepts range query parameter or Content-Range header
- `400` — Required parameters are missing
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Catalog or layer does not exist
- `416` — Range Not Satisfiable, invalid range query parameter or Content-Range header
- `500` — Internal Server Error
- `503` — Service Unavailable

---

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