Tiles API

List the tiles

Added in v4.2.0
GET http://localhost:3650/api/v1/admin/tiles

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

Request

Query Parameters

Parameters Type Description
offset
integer
The starting position of returned list of items.
Example: 10
Default: 0
Added in v4.2.0
limit
integer
Maximum number of items which will be returned.
Example: 50
Default: 50
Added in v4.2.0

Responses

Code Content Description
200 application/json TileList Object

Rescan the tiles

Added in v4.2.0
POST http://localhost:3650/api/v1/admin/tiles/rescan

Rescans tiles directory. Does NOT remove dead files.

Request

Responses

Code Content Description
200 application/json TileList Object

Reload the tiles

Added in v4.2.0
POST http://localhost:3650/api/v1/admin/tiles/reload

Rescans the tiles directory and automatically removes dead files.

Request

Responses

Code Content Description
200 application/json TileRemove Object

Detail of the tileset

Added in v4.2.0
GET http://localhost:3650/api/v1/admin/tiles/{id}

Gets information about the given tileset.

Request

Path Parameters

Parameters Type Description
id
string
Identifier of the tileset
Example: b142543e-ffa2-4994-acbc-825012e75a97
Added in v4.2.0

Responses

Code Content Description
200 application/json TileItemDetail Object
400 application/json Errors Object
404 application/json Errors Object

Change metadata of the given tileset

Added in v4.2.0
POST http://localhost:3650/api/v1/admin/tiles/{id}

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

Request

Path Parameters

Parameters Type Description
id
string
Identifier of the tileset
Example: b142543e-ffa2-4994-acbc-825012e75a97
Added in v4.2.0

Body

Content-Type Data
application/json

Responses

Code Content Description
200 application/json TileItemDetail Object
400 application/json Errors Object
404 application/json Errors Object

Delete the tileset

Added in v4.2.0
DELETE http://localhost:3650/api/v1/admin/tiles/{id}

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

Request

Path Parameters

Parameters Type Description
id
string
Identifier of the tileset
Example: b142543e-ffa2-4994-acbc-825012e75a97
Added in v4.2.0

Responses

Code Content Description
200 application/json TileRemove Object
400 application/json Errors Object
404 application/json Errors Object

Publish the tileset

Added in v4.2.0
POST http://localhost:3650/api/v1/admin/tiles/{id}/publish

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

Request

Path Parameters

Parameters Type Description
id
string
Identifier of the tileset
Example: b142543e-ffa2-4994-acbc-825012e75a97
Added in v4.2.0

Responses

Code Content Description
200 application/json TileItemDetail Object
400 application/json Errors Object
404 application/json Errors Object

Unpublish the tileset

Added in v4.2.0
POST http://localhost:3650/api/v1/admin/tiles/{id}/unpublish

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

Request

Path Parameters

Parameters Type Description
id
string
Identifier of the tileset
Example: b142543e-ffa2-4994-acbc-825012e75a97
Added in v4.2.0

Responses

Code Content Description
200 application/json TileItemDetail Object
400 application/json Errors Object
404 application/json Errors Object

TileList Object

Property Type Description
items
array [ TileItem Object]

TileItem Object

Tile item

Property Type Description
id
string
Identifier of the tileset
Example: b142543e-ffa2-4994-acbc-825012e75a97
name
string
Name of the tileset
Example: maptiler-osm
title
string
Title of the tileset
Example: Maptiler OSM Data
fileName
string
File name
Example: maptiler-osm.mbtiles
published
boolean
Says whether the tileset is published
Example: true
type
string
Type of the data
Example: mbtiles
Allowed values: composite geopackage mbtiles postgis
tileType
string
File type of the data
Example: vector
Allowed values: raster terrain vector

example


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

TileRemove Object

Property Type Description
removed
array [string]
The names of removed tilesets

example


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

TileItemDetail Object

Tile details

Property Type Description
id
string
Identifier of the tileset
Example: b142543e-ffa2-4994-acbc-825012e75a97
name
string
Name of the tileset
Example: maptiler-osm
title
string
Title of the tileset
Example: Maptiler OSM Data
fileName
string
File name
Example: maptiler-osm.mbtiles
published
boolean
Says whether the tileset is published
Example: true
type
string
Type of the data
Example: mbtiles
Allowed values: composite geopackage mbtiles postgis
tileType
string
File type of the data
Example: vector
Allowed values: raster terrain vector
urls
TileItemDetailUrls Object

example


    {
  "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",
    "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}"
  }
}
  

TileItemDetailUrls Object

Accessible URLs for the tileset

Property Type Description
embeddable
string
URL for embeddable viewer
Example: http://localhost:3650/api/tiles/maptiler-osm
tilejson
string
URL for tileJSON / layerJSON
Example: http://localhost:3650/api/tiles/maptiler-osm/tiles.json
wmts
string
URL for WMTS
Example: http://localhost:3650/api/tiles/maptiler-osm/WMTSCapabilities.xml
xyz
string
URL for XYZ
Example: http://localhost:3650/api/tiles/maptiler-osm/{z}/{x}/{y}

example


    {
  "embeddable": "http://localhost:3650/api/tiles/maptiler-osm",
  "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}"
}
  

Errors Object

Property Type Description
errors
Error

Error Object

Error message

Property Type Description
message
string
Example: Error message

example


    {"message": "Error message"}
  

TileChange Object

Property Type Description
name
string
New name
Example: maptiler-osm
published
boolean
New state of the tile serving
Example: true

example


    {"name": "maptiler-osm", "published": true}
  

TileItemDetailUrls Object

Accessible URLs for the tileset

Property Type Description
embeddable
string
URL for embeddable viewer
Example: http://localhost:3650/api/tiles/maptiler-osm
tilejson
string
URL for tileJSON / layerJSON
Example: http://localhost:3650/api/tiles/maptiler-osm/tiles.json
wmts
string
URL for WMTS
Example: http://localhost:3650/api/tiles/maptiler-osm/WMTSCapabilities.xml
xyz
string
URL for XYZ
Example: http://localhost:3650/api/tiles/maptiler-osm/{z}/{x}/{y}

example


    {
  "embeddable": "http://localhost:3650/api/tiles/maptiler-osm",
  "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}"
}