---
title: "Mvt tile from the cache if possible, otherwise gets data from the database and caches it in valkey"
method: GET
path: "/layers/tile/{layer_slug}/{view_slug}/{z}/{x}/{y}"
tags: ["layers"]
---

# Mvt tile from the cache if possible, otherwise gets data from the database and caches it in valkey

`GET /layers/tile/{layer_slug}/{view_slug}/{z}/{x}/{y}`

## Request

- Base URL: `https://demo.osrd.fr/api`
- URL: `https://demo.osrd.fr/api/layers/tile/{layer_slug}/{view_slug}/{z}/{x}/{y}`
- Auth: none declared

## Path parameters

- `layer_slug` string, required
- `view_slug` string, required
- `x` integer, required
- `y` integer, required
- `z` integer, required

## Query parameters

- `infra` integer, required

## Response `200`

---

[API](https://skmtc.dev/openrailassociation/apis/osrd-editoast.md) - [All operations](https://skmtc.dev/openrailassociation/apis/osrd-editoast/llms.txt) - [OpenAPI document](https://skmtc.dev/openrailassociation/apis/osrd-editoast/revisions/7c72c5e1bc0e?raw)
