Maps API

Maps API reference

Scalar API Reference
v4.8.0
OpenAPI 3.1.0
Server:http://{host}/api/v1/admin

MapTiler Server Admin API

Client Libraries

Maps

​

List maps

​

Lists maps from maps directory. It 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
  • application/json
Request Example for get/maps
curl http://localhost:3650/api/v1/admin/maps \
  --header 'Authorization: Basic username:password'
{
  "items": [
    {
      "id": "streets",
      "name": "streets",
      "title": "Streets",
      "published": true,
      "format": "jpeg"
    }
  ]
}

Detail of the map

​

Gets information about the given map.

Path Parameters
  • id
    Type: string
    required

    Identifier of the map.

Responses
  • application/json
  • application/json
  • application/json
Request Example for get/maps/{id}
curl http://localhost:3650/api/v1/admin/maps/streets \
  --header 'Authorization: Basic username:password'
{
  "id": "streets",
  "name": "streets",
  "title": "Streets",
  "published": true,
  "format": "jpeg",
  "quality": 92,
  "urls": {
    "embeddable": "http://localhost:3650/api/maps/streets",
    "ogcTiles": "http://localhost:3650/api/maps/streets/tiles",
    "stylejson": "http://localhost:3650/api/maps/streets/style.json",
    "tilejson": "http://localhost:3650/api/maps/streets/tiles.json",
    "tilejson256": "http://localhost:3650/api/maps/streets/256/tiles.json",
    "wms": "http://localhost:3650/api/maps/streets/wms?service=WMS&request=GetCapabilities",
    "wmts": "http://localhost:3650/api/maps/streets/WMTSCapabilities.xml",
    "xyz": "http://localhost:3650/api/maps/streets/{z}/{x}/{y}.jpg",
    "xyz256": "http://localhost:3650/api/maps/streets/256/{z}/{x}/{y}.jpg",
    "staticAuto": "http://localhost:3650/api/maps/streets/static/auto/{width}x{height}.jpg",
    "staticBounds": "http://localhost:3650/api/maps/streets/static/{minx},{miny},{maxx},{maxy}/{width}x{height}.jpg",
    "staticCenter": "http://localhost:3650/api/maps/streets/static/{lon},{lat},{zoom}/{width}x{height}.jpg",
    "tmsRaster": "http://localhost:3650/api/maps/streets/raster/tms",
    "tmsVector": "http://localhost:3650/api/maps/streets/vector/tms",
    "wmsGlobal": "http://localhost:3650/api/maps/wms?service=WMS&request=GetCapabilities",
    "wmtsGlobal": "http://localhost:3650/api/WMTSCapabilities.xml"
  }
}

Change metadata of the map

​

Changes metadata (format, quality, published) of the given map.

Path Parameters
  • id
    Type: string
    required

    Identifier of the map.

Body·MapChange
application/json

A JSON object containing metadata information

  • format
    Type: string enum

    New format

    values
    • jpeg
    • png
    • webp
  • published
    Type: boolean

    New state of the map serving

  • quality
    Type: integer
    min:  
    0
    max:  
    100

    New quality in percent

Responses
  • application/json
  • application/json
  • application/json
Request Example for post/maps/{id}
curl http://localhost:3650/api/v1/admin/maps/streets \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Basic username:password' \
  --data '{
  "format": "jpeg",
  "quality": 92,
  "published": true
}'
{
  "id": "streets",
  "name": "streets",
  "title": "Streets",
  "published": true,
  "format": "jpeg",
  "quality": 92,
  "urls": {
    "embeddable": "http://localhost:3650/api/maps/streets",
    "ogcTiles": "http://localhost:3650/api/maps/streets/tiles",
    "stylejson": "http://localhost:3650/api/maps/streets/style.json",
    "tilejson": "http://localhost:3650/api/maps/streets/tiles.json",
    "tilejson256": "http://localhost:3650/api/maps/streets/256/tiles.json",
    "wms": "http://localhost:3650/api/maps/streets/wms?service=WMS&request=GetCapabilities",
    "wmts": "http://localhost:3650/api/maps/streets/WMTSCapabilities.xml",
    "xyz": "http://localhost:3650/api/maps/streets/{z}/{x}/{y}.jpg",
    "xyz256": "http://localhost:3650/api/maps/streets/256/{z}/{x}/{y}.jpg",
    "staticAuto": "http://localhost:3650/api/maps/streets/static/auto/{width}x{height}.jpg",
    "staticBounds": "http://localhost:3650/api/maps/streets/static/{minx},{miny},{maxx},{maxy}/{width}x{height}.jpg",
    "staticCenter": "http://localhost:3650/api/maps/streets/static/{lon},{lat},{zoom}/{width}x{height}.jpg",
    "tmsRaster": "http://localhost:3650/api/maps/streets/raster/tms",
    "tmsVector": "http://localhost:3650/api/maps/streets/vector/tms",
    "wmsGlobal": "http://localhost:3650/api/maps/wms?service=WMS&request=GetCapabilities",
    "wmtsGlobal": "http://localhost:3650/api/WMTSCapabilities.xml"
  }
}

Delete the map

​

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

Path Parameters
  • id
    Type: string
    required

    Identifier of the map.

Responses
  • application/json
  • application/json
  • application/json
Request Example for delete/maps/{id}
curl http://localhost:3650/api/v1/admin/maps/streets \
  --request DELETE \
  --header 'Authorization: Basic username:password'
{
  "removed": [
    "streets"
  ]
}

Publish the map

​

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

Path Parameters
  • id
    Type: string
    required

    Identifier of the map.

Responses
  • application/json
  • application/json
  • application/json
Request Example for post/maps/{id}/publish
curl http://localhost:3650/api/v1/admin/maps/streets/publish \
  --request POST \
  --header 'Authorization: Basic username:password'
{
  "id": "streets",
  "name": "streets",
  "title": "Streets",
  "published": true,
  "format": "jpeg",
  "quality": 92,
  "urls": {
    "embeddable": "http://localhost:3650/api/maps/streets",
    "ogcTiles": "http://localhost:3650/api/maps/streets/tiles",
    "stylejson": "http://localhost:3650/api/maps/streets/style.json",
    "tilejson": "http://localhost:3650/api/maps/streets/tiles.json",
    "tilejson256": "http://localhost:3650/api/maps/streets/256/tiles.json",
    "wms": "http://localhost:3650/api/maps/streets/wms?service=WMS&request=GetCapabilities",
    "wmts": "http://localhost:3650/api/maps/streets/WMTSCapabilities.xml",
    "xyz": "http://localhost:3650/api/maps/streets/{z}/{x}/{y}.jpg",
    "xyz256": "http://localhost:3650/api/maps/streets/256/{z}/{x}/{y}.jpg",
    "staticAuto": "http://localhost:3650/api/maps/streets/static/auto/{width}x{height}.jpg",
    "staticBounds": "http://localhost:3650/api/maps/streets/static/{minx},{miny},{maxx},{maxy}/{width}x{height}.jpg",
    "staticCenter": "http://localhost:3650/api/maps/streets/static/{lon},{lat},{zoom}/{width}x{height}.jpg",
    "tmsRaster": "http://localhost:3650/api/maps/streets/raster/tms",
    "tmsVector": "http://localhost:3650/api/maps/streets/vector/tms",
    "wmsGlobal": "http://localhost:3650/api/maps/wms?service=WMS&request=GetCapabilities",
    "wmtsGlobal": "http://localhost:3650/api/WMTSCapabilities.xml"
  }
}

Unpublish the map

​

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

Path Parameters
  • id
    Type: string
    required

    Identifier of the map.

Responses
  • application/json
  • application/json
  • application/json
Request Example for post/maps/{id}/unpublish
curl http://localhost:3650/api/v1/admin/maps/streets/unpublish \
  --request POST \
  --header 'Authorization: Basic username:password'
{
  "id": "streets",
  "name": "streets",
  "title": "Streets",
  "published": true,
  "format": "jpeg",
  "quality": 92,
  "urls": {
    "embeddable": "http://localhost:3650/api/maps/streets",
    "ogcTiles": "http://localhost:3650/api/maps/streets/tiles",
    "stylejson": "http://localhost:3650/api/maps/streets/style.json",
    "tilejson": "http://localhost:3650/api/maps/streets/tiles.json",
    "tilejson256": "http://localhost:3650/api/maps/streets/256/tiles.json",
    "wms": "http://localhost:3650/api/maps/streets/wms?service=WMS&request=GetCapabilities",
    "wmts": "http://localhost:3650/api/maps/streets/WMTSCapabilities.xml",
    "xyz": "http://localhost:3650/api/maps/streets/{z}/{x}/{y}.jpg",
    "xyz256": "http://localhost:3650/api/maps/streets/256/{z}/{x}/{y}.jpg",
    "staticAuto": "http://localhost:3650/api/maps/streets/static/auto/{width}x{height}.jpg",
    "staticBounds": "http://localhost:3650/api/maps/streets/static/{minx},{miny},{maxx},{maxy}/{width}x{height}.jpg",
    "staticCenter": "http://localhost:3650/api/maps/streets/static/{lon},{lat},{zoom}/{width}x{height}.jpg",
    "tmsRaster": "http://localhost:3650/api/maps/streets/raster/tms",
    "tmsVector": "http://localhost:3650/api/maps/streets/vector/tms",
    "wmsGlobal": "http://localhost:3650/api/maps/wms?service=WMS&request=GetCapabilities",
    "wmtsGlobal": "http://localhost:3650/api/WMTSCapabilities.xml"
  }
}
Using the OpenAPI Specification?
Get the openapi.yaml
Was this helpful?