---
title: "Tiles API"
description: "Tiles API for MapTiler Server Admin API."
---

> For AI agents: a documentation index is available at [/llms.txt](https://docs.maptiler.com/llms.txt). Markdown versions of all pages are available by appending .md to any URL.

# Tiles API

## Tiles API reference

  Scalar API Reference

-   [
    
    Introduction
    
    ](#description/introduction)
-   [
    
    Tiles
    
    ](#tag/tiles)
    
    Close Group - Tiles
    
    -   [
        
        List the tiles
        
        HTTP Method:  GET](#tag/tiles/GET/tiles)
    -   [
        
        Rescan the tiles
        
        HTTP Method:  POST](#tag/tiles/POST/tiles/rescan)
    -   [
        
        Reload the tiles
        
        HTTP Method:  POST](#tag/tiles/POST/tiles/reload)
    -   [
        
        Add remote tile
        
        HTTP Method:  POST](#tag/tiles/POST/tiles/add)
    -   [
        
        Detail of the tileset
        
        HTTP Method:  GET](#tag/tiles/GET/tiles/{id})
    -   [
        
        Change metadata of the given tileset
        
        HTTP Method:  POST](#tag/tiles/POST/tiles/{id})
    -   [
        
        Delete the tileset
        
        HTTP Method:  DEL](#tag/tiles/DELETE/tiles/{id})
    -   [
        
        Publish the tileset
        
        HTTP Method:  POST](#tag/tiles/POST/tiles/{id}/publish)
    -   [
        
        Unpublish the tileset
        
        HTTP Method:  POST](#tag/tiles/POST/tiles/{id}/unpublish)

[Powered by Scalar](https://www.scalar.com)

v4.9.0

OpenAPI 3.1.0

# MapTiler Server Admin API

[Support](mailto:support@maptiler.com)

[](https://docs.maptiler.com)

[MapTiler Server License Agreement](https://www.maptiler.com/server/license/)

[Terms of Service](https://www.maptiler.com/server/license/)

Server

Server:http://{host}/api/v1/admin

host

MapTiler Server Admin API

Client Libraries

Shell

Ruby

Node.js

PHP

Python

MoreSelect from all clients

Shell Curl

## Tiles

​Copy link

Manage self-hosted tilesets.

Tiles Operations

-   get/tiles
-   post/tiles/rescan
-   post/tiles/reload
-   post/tiles/add
-   get/tiles/{id}
-   post/tiles/{id}
-   delete/tiles/{id}
-   post/tiles/{id}/publish
-   post/tiles/{id}/unpublish

### List the tiles

​Copy link

Auth Required

Lists the tilesets from the tiles directory. Can be paginated with offset and limit parameters, otherwise first 50 items are returned.

Query Parameters

-   offsetCopy link to offset
    
    Type: integer
    
    Default
    
    0
    
    Example
    
    10
    
    The starting position of returned list of items.
    
-   limitCopy link to limit
    
    Type: integer
    
    Default
    
    50
    
    Example
    
    50
    
    Maximum number of items which will be returned.
    

Responses

-   200
    
    OK
    
    application/json
    
-   400
    
    Invalid request
    
    application/json
    

Request Example for get/tiles

Shell Curl

```curl
curl http://localhost:3650/api/v1/admin/tiles \
  --header 'Authorization: Basic username:password'
```

cURLCopy

cURLCopy

Status: 200Status: 400

Show Schema 

```json
{
  "items": [
    {
      "id": "b142543e-ffa2-4994-acbc-825012e75a97",
      "name": "maptiler-osm",
      "title": "Maptiler OSM Data",
      "fileName": "maptiler-osm.mbtiles",
      "published": true,
      "type": "mbtiles",
      "tileType": "vector"
    }
  ]
}
```

JSONCopy

JSONCopy

OK

### Rescan the tiles

​Copy link

Auth Required

Rescans tiles directory. Does NOT remove dead files.

Responses

-   200
    
    OK
    
    application/json
    
-   400
    
    Invalid request
    
    application/json
    

Request Example for post/tiles/rescan

Shell Curl

```curl
curl http://localhost:3650/api/v1/admin/tiles/rescan \
  --request POST \
  --header 'Authorization: Basic username:password'
```

cURLCopy

cURLCopy

Status: 200Status: 400

Show Schema 

```json
{
  "items": [
    {
      "id": "b142543e-ffa2-4994-acbc-825012e75a97",
      "name": "maptiler-osm",
      "title": "Maptiler OSM Data",
      "fileName": "maptiler-osm.mbtiles",
      "published": true,
      "type": "mbtiles",
      "tileType": "vector"
    }
  ]
}
```

JSONCopy

JSONCopy

OK

### Reload the tiles

​Copy link

Auth Required

Rescans the tiles directory and automatically removes dead files. Optionally may remove remote tile records.

Query Parameters

-   removeRemoteCopy link to removeRemote
    
    Type: boolean
    
    Default
    
    false
    
    Example
    
    true
    
    Removes remote tile records. Does not remove files from the remote server.
    

Responses

-   200
    
    OK
    
    application/json
    
-   400
    
    Invalid request
    
    application/json
    

Request Example for post/tiles/reload

Shell Curl

```curl
curl http://localhost:3650/api/v1/admin/tiles/reload \
  --request POST \
  --header 'Authorization: Basic username:password'
```

cURLCopy

cURLCopy

Status: 200Status: 400

Show Schema 

```json
{
  "removed": [
    "maptiler-osm"
  ]
}
```

JSONCopy

JSONCopy

OK

### Add remote tile

​Copy link

Auth Required

Adds MTPKG remote tile record.

Body·TileAdd

application/json

A JSON object containing storage and url for remote tile

-   storageCopy link to storage
    
    Type: string enum
    
    Example
    
    http
    
    Storage type of remote server
    
    values
    
    -   http
        
    -   s3
        
    
-   urlCopy link to url
    
    Type: string
    
    Example
    
    https://data.maptiler.com/downloads/tileset/europe/switzerland/zurich.mtpkg
    
    URL of remote file
    

Responses

-   200
    
    OK
    
    application/json
    
-   400
    
    Invalid request
    
    application/json
    
-   404
    
    Requested item not found
    
    application/json
    

Request Example for post/tiles/add

Shell Curl

```curl
curl http://localhost:3650/api/v1/admin/tiles/add \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Basic username:password' \
  --data '{
  "storage": "http",
  "url": "https://data.maptiler.com/downloads/tileset/europe/switzerland/zurich.mtpkg"
}'
```

cURLCopy

cURLCopy

Status: 200Status: 400Status: 404

Show Schema 

```json
{
  "id": "b142543e-ffa2-4994-acbc-825012e75a97",
  "name": "maptiler-osm",
  "title": "Maptiler OSM Data",
  "fileName": "maptiler-osm.mbtiles",
  "published": true,
  "type": "mbtiles",
  "tileType": "vector"
}
```

JSONCopy

JSONCopy

OK

### Detail of the tileset

​Copy link

Auth Required

Gets information about the given tileset.

Path Parameters

-   idCopy link to id
    
    Type: string
    
    required
    
    Example
    
    b142543e-ffa2-4994-acbc-825012e75a97
    
    Identifier of the tileset
    

Responses

-   200
    
    OK
    
    application/json
    
-   400
    
    Invalid request
    
    application/json
    
-   404
    
    Requested item not found
    
    application/json
    

Request Example for get/tiles/_{id}_

Shell Curl

```curl
curl http://localhost:3650/api/v1/admin/tiles/b142543e-ffa2-4994-acbc-825012e75a97 \
  --header 'Authorization: Basic username:password'
```

cURLCopy

cURLCopy

Status: 200Status: 400Status: 404

Show Schema 

```json
{
  "id": "b142543e-ffa2-4994-acbc-825012e75a97",
  "name": "maptiler-osm",
  "title": "Maptiler OSM Data",
  "fileName": "maptiler-osm.mbtiles",
  "published": true,
  "type": "mbtiles",
  "tileType": "vector",
  "urls": {
    "embeddable": "http://localhost:3650/api/tiles/maptiler-osm",
    "ogcTiles": "http://localhost:3650/api/tiles/maptiler-osm/tiles",
    "tilejson": "http://localhost:3650/api/tiles/maptiler-osm/tiles.json",
    "wmts": "http://localhost:3650/api/tiles/maptiler-osm/WMTSCapabilities.xml",
    "xyz": "http://localhost:3650/api/tiles/maptiler-osm/{z}/{x}/{y}"
  }
}
```

JSONCopy

JSONCopy

OK

### Change metadata of the given tileset

​Copy link

Auth Required

Changes metadata (name, published) of the given tileset.

Path Parameters

-   idCopy link to id
    
    Type: string
    
    required
    
    Example
    
    b142543e-ffa2-4994-acbc-825012e75a97
    
    Identifier of the tileset
    

Body·TileChange

application/json

A JSON object containing metadata information

-   nameCopy link to name
    
    Type: string
    
    Example
    
    maptiler-osm
    
    New name
    
-   publishedCopy link to published
    
    Type: boolean
    
    Example
    
    true
    
    New state of the tile serving
    

Responses

-   200
    
    OK
    
    application/json
    
-   400
    
    Invalid request
    
    application/json
    
-   404
    
    Requested item not found
    
    application/json
    

Request Example for post/tiles/_{id}_

Shell Curl

```curl
curl http://localhost:3650/api/v1/admin/tiles/b142543e-ffa2-4994-acbc-825012e75a97 \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Basic username:password' \
  --data '{
  "name": "maptiler-osm",
  "published": true
}'
```

cURLCopy

cURLCopy

Status: 200Status: 400Status: 404

Show Schema 

```json
{
  "id": "b142543e-ffa2-4994-acbc-825012e75a97",
  "name": "maptiler-osm",
  "title": "Maptiler OSM Data",
  "fileName": "maptiler-osm.mbtiles",
  "published": true,
  "type": "mbtiles",
  "tileType": "vector",
  "urls": {
    "embeddable": "http://localhost:3650/api/tiles/maptiler-osm",
    "ogcTiles": "http://localhost:3650/api/tiles/maptiler-osm/tiles",
    "tilejson": "http://localhost:3650/api/tiles/maptiler-osm/tiles.json",
    "wmts": "http://localhost:3650/api/tiles/maptiler-osm/WMTSCapabilities.xml",
    "xyz": "http://localhost:3650/api/tiles/maptiler-osm/{z}/{x}/{y}"
  }
}
```

JSONCopy

JSONCopy

OK

### Delete the tileset

​Copy link

Auth Required

Deletes the given tileset. Before deleting, it is automatically unpublished and cannot be served anymore.

Path Parameters

-   idCopy link to id
    
    Type: string
    
    required
    
    Example
    
    b142543e-ffa2-4994-acbc-825012e75a97
    
    Identifier of the tileset
    

Query Parameters

-   forceCopy link to force
    
    Type: boolean
    
    Default
    
    false
    
    Example
    
    true
    
    Enables cascading deletion. When true, automatically deletes this tileset when used by other resources (virtual tilesets).
    

Responses

-   200
    
    OK
    
    application/json
    
-   400
    
    Invalid request
    
    application/json
    
-   404
    
    Requested item not found
    
    application/json
    

Request Example for delete/tiles/_{id}_

Shell Curl

```curl
curl http://localhost:3650/api/v1/admin/tiles/b142543e-ffa2-4994-acbc-825012e75a97 \
  --request DELETE \
  --header 'Authorization: Basic username:password'
```

cURLCopy

cURLCopy

Status: 200Status: 400Status: 404

Show Schema 

```json
{
  "removed": [
    "maptiler-osm"
  ]
}
```

JSONCopy

JSONCopy

OK

### Publish the tileset

​Copy link

Auth Required

Publishes the given tileset. Does nothing, if the tileset is already published.

Path Parameters

-   idCopy link to id
    
    Type: string
    
    required
    
    Example
    
    b142543e-ffa2-4994-acbc-825012e75a97
    
    Identifier of the tileset
    

Responses

-   200
    
    OK
    
    application/json
    
-   400
    
    Invalid request
    
    application/json
    
-   404
    
    Requested item not found
    
    application/json
    

Request Example for post/tiles/_{id}_/publish

Shell Curl

```curl
curl http://localhost:3650/api/v1/admin/tiles/b142543e-ffa2-4994-acbc-825012e75a97/publish \
  --request POST \
  --header 'Authorization: Basic username:password'
```

cURLCopy

cURLCopy

Status: 200Status: 400Status: 404

Show Schema 

```json
{
  "id": "b142543e-ffa2-4994-acbc-825012e75a97",
  "name": "maptiler-osm",
  "title": "Maptiler OSM Data",
  "fileName": "maptiler-osm.mbtiles",
  "published": true,
  "type": "mbtiles",
  "tileType": "vector",
  "urls": {
    "embeddable": "http://localhost:3650/api/tiles/maptiler-osm",
    "ogcTiles": "http://localhost:3650/api/tiles/maptiler-osm/tiles",
    "tilejson": "http://localhost:3650/api/tiles/maptiler-osm/tiles.json",
    "wmts": "http://localhost:3650/api/tiles/maptiler-osm/WMTSCapabilities.xml",
    "xyz": "http://localhost:3650/api/tiles/maptiler-osm/{z}/{x}/{y}"
  }
}
```

JSONCopy

JSONCopy

OK

### Unpublish the tileset

​Copy link

Auth Required

Unpublishes the given tileset. Does nothing, if the tileset is already unpublished.

Path Parameters

-   idCopy link to id
    
    Type: string
    
    required
    
    Example
    
    b142543e-ffa2-4994-acbc-825012e75a97
    
    Identifier of the tileset
    

Responses

-   200
    
    OK
    
    application/json
    
-   400
    
    Invalid request
    
    application/json
    
-   404
    
    Requested item not found
    
    application/json
    

Request Example for post/tiles/_{id}_/unpublish

Shell Curl

```curl
curl http://localhost:3650/api/v1/admin/tiles/b142543e-ffa2-4994-acbc-825012e75a97/unpublish \
  --request POST \
  --header 'Authorization: Basic username:password'
```

cURLCopy

cURLCopy

Status: 200Status: 400Status: 404

Show Schema 

```json
{
  "id": "b142543e-ffa2-4994-acbc-825012e75a97",
  "name": "maptiler-osm",
  "title": "Maptiler OSM Data",
  "fileName": "maptiler-osm.mbtiles",
  "published": true,
  "type": "mbtiles",
  "tileType": "vector",
  "urls": {
    "embeddable": "http://localhost:3650/api/tiles/maptiler-osm",
    "ogcTiles": "http://localhost:3650/api/tiles/maptiler-osm/tiles",
    "tilejson": "http://localhost:3650/api/tiles/maptiler-osm/tiles.json",
    "wmts": "http://localhost:3650/api/tiles/maptiler-osm/WMTSCapabilities.xml",
    "xyz": "http://localhost:3650/api/tiles/maptiler-osm/{z}/{x}/{y}"
  }
}
```

JSONCopy

JSONCopy

OK

![](https://docs.maptiler.com/assets/img/open-api.png)

Using the OpenAPI Specification?

Get the [openapi.yaml](https://docs.maptiler.com/_data/server/admin-api/openapi.yml)
