Tiles API

Tiles API reference

Scalar API Reference
v4.8.0
OpenAPI 3.0.2

MapTiler Server Admin API

Server:http://localhost:3650/api/v1/admin

MapTiler Server Admin API

Client Libraries

Tiles

List the tiles

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

Query Parameters
  • offset
    Type: integer

    The starting position of returned list of items.

  • limit
    Type: integer

    Maximum number of items which will be returned.

Responses
  • application/json
Request Example for get/tiles
curl http://localhost:3650/api/v1/admin/tiles \
  --header 'Authorization: Basic username:password'
{
  "items": [
    {
      "id": "b142543e-ffa2-4994-acbc-825012e75a97",
      "name": "maptiler-osm",
      "title": "Maptiler OSM Data",
      "fileName": "maptiler-osm.mbtiles",
      "published": true,
      "type": "mbtiles",
      "tileType": "vector"
    }
  ]
}

Rescan the tiles

Rescans tiles directory. Does NOT remove dead files.

Responses
  • application/json
Request Example for post/tiles/rescan
curl http://localhost:3650/api/v1/admin/tiles/rescan \
  --request POST \
  --header 'Authorization: Basic username:password'
{
  "items": [
    {
      "id": "b142543e-ffa2-4994-acbc-825012e75a97",
      "name": "maptiler-osm",
      "title": "Maptiler OSM Data",
      "fileName": "maptiler-osm.mbtiles",
      "published": true,
      "type": "mbtiles",
      "tileType": "vector"
    }
  ]
}

Reload the tiles

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

Query Parameters
  • removeRemote
    Type: boolean

    Removes remote tile records. Does not remove files from the remote server.

Responses
  • application/json
Request Example for post/tiles/reload
curl http://localhost:3650/api/v1/admin/tiles/reload \
  --request POST \
  --header 'Authorization: Basic username:password'
{
  "removed": [
    "maptiler-osm"
  ]
}

Add remote tile

Adds MTPKG remote tile record.

Body·TileAdd
application/json

A JSON object containing storage and url for remote tile

  • storage
    Type: string enum

    Storage type of remote server

    values
    • http
    • s3
  • url
    Type: string

    URL of remote file

Responses
  • application/json
  • application/json
  • application/json
Request Example for post/tiles/add
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"
}'
{
  "id": "b142543e-ffa2-4994-acbc-825012e75a97",
  "name": "maptiler-osm",
  "title": "Maptiler OSM Data",
  "fileName": "maptiler-osm.mbtiles",
  "published": true,
  "type": "mbtiles",
  "tileType": "vector"
}

Detail of the tileset

Gets information about the given tileset.

Path Parameters
  • id
    Type: string
    required

    Identifier of the tileset

Responses
  • application/json
  • application/json
  • application/json
Request Example for get/tiles/{id}
curl http://localhost:3650/api/v1/admin/tiles/b142543e-ffa2-4994-acbc-825012e75a97 \
  --header 'Authorization: Basic username:password'
{
  "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}"
  }
}

Change metadata of the given tileset

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

Path Parameters
  • id
    Type: string
    required

    Identifier of the tileset

Body·TileChange
application/json

A JSON object containing metadata information

  • name
    Type: string

    New name

  • published
    Type: boolean

    New state of the tile serving

Responses
  • application/json
  • application/json
  • application/json
Request Example for post/tiles/{id}
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
}'
{
  "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}"
  }
}

Delete the tileset

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

Path Parameters
  • id
    Type: string
    required

    Identifier of the tileset

Responses
  • application/json
  • application/json
  • application/json
Request Example for delete/tiles/{id}
curl http://localhost:3650/api/v1/admin/tiles/b142543e-ffa2-4994-acbc-825012e75a97 \
  --request DELETE \
  --header 'Authorization: Basic username:password'
{
  "removed": [
    "maptiler-osm"
  ]
}

Publish the tileset

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

Path Parameters
  • id
    Type: string
    required

    Identifier of the tileset

Responses
  • application/json
  • application/json
  • application/json
Request Example for post/tiles/{id}/publish
curl http://localhost:3650/api/v1/admin/tiles/b142543e-ffa2-4994-acbc-825012e75a97/publish \
  --request POST \
  --header 'Authorization: Basic username:password'
{
  "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}"
  }
}

Unpublish the tileset

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

Path Parameters
  • id
    Type: string
    required

    Identifier of the tileset

Responses
  • application/json
  • application/json
  • application/json
Request Example for post/tiles/{id}/unpublish
curl http://localhost:3650/api/v1/admin/tiles/b142543e-ffa2-4994-acbc-825012e75a97/unpublish \
  --request POST \
  --header 'Authorization: Basic username:password'
{
  "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}"
  }
}
Using the OpenAPI Specification?
Get the openapi.yaml
Was this helpful?
MapTiler Server Admin API
Tiles API | MapTiler Server Admin API
Tiles API