---
title: "List of layers"
method: POST
path: "/spacemesh.v2alpha1.LayerService/List"
tags: ["LayerService"]
---

# List of layers

`POST /spacemesh.v2alpha1.LayerService/List`

## Request

- Base URL: `https://testnet-api.spacemesh.network`
- URL: `https://testnet-api.spacemesh.network/spacemesh.v2alpha1.LayerService/List`
- Auth: none declared
- TypeScript: <https://skmtc.dev/spacemesh/apis/spacemesh-api/docs/spacemesh.v2alpha1.LayerService/List/post.ts> (a function with typed inputs; its response is checked against the schema)

List is a method that takes a "LayerRequest" body and returns an "LayerList".
This method is used to retrieve a list of layers based on the provided request parameters.

## Request body

- Spacemeshv2alpha1LayerRequest
  - `endLayer` integer
  - `limit` string, uint64
  - `offset` string, uint64
  - `sortOrder` 'ASC' | 'DESC'
  - `startLayer` integer

## Response `200`

A successful response.

- Spacemeshv2alpha1LayerList
  - `layers` Spacemeshv2alpha1Layer[]
    - `block` Spacemeshv2alpha1Block
      - `id` string, byte
    - `consensusHash` string
    - `cumulativeStateHash` string, byte
    - `number` integer
    - `stateHash` string, byte
    - `status` 'LAYER_STATUS_UNSPECIFIED' | 'LAYER_STATUS_APPLIED' | 'LAYER_STATUS_VERIFIED'

## Other responses

- `default`: An unexpected error response.

---

[API](https://skmtc.dev/spacemesh/apis/spacemesh-api.md) - [All operations](https://skmtc.dev/spacemesh/apis/spacemesh-api/llms.txt) - [OpenAPI document](https://skmtc.dev/spacemesh/apis/spacemesh-api/revisions/427c8b53574b?raw)
