Maps API

Maps 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

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

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

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

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"
  }
}
Using the OpenAPI Specification?
Get the openapi.yaml
Was this helpful?
MapTiler Server Admin API
Maps API | MapTiler Server Admin API
Maps API