Parchment Docs

Layers

Map layers and style management

Get all layers

GET
/library/layers

Response Body

curl -X GET "https://example.com/library/layers"
fetch("https://example.com/library/layers")
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {
  url := "https://example.com/library/layers"

  req, _ := http.NewRequest("GET", url, nil)
  
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
import requests

url = "https://example.com/library/layers"

response = requests.request("GET", url)

print(response.text)
Empty

Create a layer

POST
/library/layers

Request Body

application/jsonRequired
nameRequiredstring
typestring
enginearray<string>
showInLayerSelectorboolean
visibleboolean
iconstring
orderRequirednumber
groupIdstring | null | null
configurationRequiredunknown

Response Body

curl -X POST "https://example.com/library/layers" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "string",
    "type": "string",
    "engine": [
      "string"
    ],
    "showInLayerSelector": true,
    "visible": true,
    "icon": "string",
    "order": 0,
    "groupId": "string",
    "configuration": null
  }'
const body = JSON.stringify({
  "name": "string",
  "type": "string",
  "engine": [
    "string"
  ],
  "showInLayerSelector": true,
  "visible": true,
  "icon": "string",
  "order": 0,
  "groupId": "string",
  "configuration": null
})

fetch("https://example.com/library/layers", {
  body
})
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
  "strings"
)

func main() {
  url := "https://example.com/library/layers"
  body := strings.NewReader(`{
    "name": "string",
    "type": "string",
    "engine": [
      "string"
    ],
    "showInLayerSelector": true,
    "visible": true,
    "icon": "string",
    "order": 0,
    "groupId": "string",
    "configuration": null
  }`)
  req, _ := http.NewRequest("POST", url, body)
  req.Header.Add("Content-Type", "application/json")
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
import requests

url = "https://example.com/library/layers"
body = {
  "name": "string",
  "type": "string",
  "engine": [
    "string"
  ],
  "showInLayerSelector": true,
  "visible": true,
  "icon": "string",
  "order": 0,
  "groupId": "string",
  "configuration": null
}
response = requests.request("POST", url, json = body, headers = {
  "Content-Type": "application/json"
})

print(response.text)
Empty

Delete a layer

DELETE
/library/layers/{id}

Path Parameters

idRequiredstring

Response Body

curl -X DELETE "https://example.com/library/layers/string"
fetch("https://example.com/library/layers/string")
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {
  url := "https://example.com/library/layers/string"

  req, _ := http.NewRequest("DELETE", url, nil)
  
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
import requests

url = "https://example.com/library/layers/string"

response = requests.request("DELETE", url)

print(response.text)
Empty

Update a layer

PUT
/library/layers/{id}

Request Body

application/jsonRequired
namestring
typestring
enginearray<string>
showInLayerSelectorboolean
visibleboolean
iconstring
ordernumber
groupIdstring | null | null
configurationunknown

Path Parameters

idRequiredstring

Response Body

curl -X PUT "https://example.com/library/layers/string" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "string",
    "type": "string",
    "engine": [
      "string"
    ],
    "showInLayerSelector": true,
    "visible": true,
    "icon": "string",
    "order": 0,
    "groupId": "string",
    "configuration": null
  }'
const body = JSON.stringify({
  "name": "string",
  "type": "string",
  "engine": [
    "string"
  ],
  "showInLayerSelector": true,
  "visible": true,
  "icon": "string",
  "order": 0,
  "groupId": "string",
  "configuration": null
})

fetch("https://example.com/library/layers/string", {
  body
})
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
  "strings"
)

func main() {
  url := "https://example.com/library/layers/string"
  body := strings.NewReader(`{
    "name": "string",
    "type": "string",
    "engine": [
      "string"
    ],
    "showInLayerSelector": true,
    "visible": true,
    "icon": "string",
    "order": 0,
    "groupId": "string",
    "configuration": null
  }`)
  req, _ := http.NewRequest("PUT", url, body)
  req.Header.Add("Content-Type", "application/json")
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
import requests

url = "https://example.com/library/layers/string"
body = {
  "name": "string",
  "type": "string",
  "engine": [
    "string"
  ],
  "showInLayerSelector": true,
  "visible": true,
  "icon": "string",
  "order": 0,
  "groupId": "string",
  "configuration": null
}
response = requests.request("PUT", url, json = body, headers = {
  "Content-Type": "application/json"
})

print(response.text)
Empty

Get all layer groups

GET
/library/layers/groups

Response Body

curl -X GET "https://example.com/library/layers/groups"
fetch("https://example.com/library/layers/groups")
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {
  url := "https://example.com/library/layers/groups"

  req, _ := http.NewRequest("GET", url, nil)
  
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
import requests

url = "https://example.com/library/layers/groups"

response = requests.request("GET", url)

print(response.text)
Empty

Create a layer group

POST
/library/layers/groups

Request Body

application/jsonRequired
nameRequiredstring
showInLayerSelectorboolean
visibleboolean
iconstring
orderRequirednumber

Response Body

curl -X POST "https://example.com/library/layers/groups" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "string",
    "showInLayerSelector": true,
    "visible": true,
    "icon": "string",
    "order": 0
  }'
const body = JSON.stringify({
  "name": "string",
  "showInLayerSelector": true,
  "visible": true,
  "icon": "string",
  "order": 0
})

fetch("https://example.com/library/layers/groups", {
  body
})
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
  "strings"
)

func main() {
  url := "https://example.com/library/layers/groups"
  body := strings.NewReader(`{
    "name": "string",
    "showInLayerSelector": true,
    "visible": true,
    "icon": "string",
    "order": 0
  }`)
  req, _ := http.NewRequest("POST", url, body)
  req.Header.Add("Content-Type", "application/json")
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
import requests

url = "https://example.com/library/layers/groups"
body = {
  "name": "string",
  "showInLayerSelector": true,
  "visible": true,
  "icon": "string",
  "order": 0
}
response = requests.request("POST", url, json = body, headers = {
  "Content-Type": "application/json"
})

print(response.text)
Empty

Delete a layer group

DELETE
/library/layers/groups/{id}

Path Parameters

idRequiredstring

Response Body

curl -X DELETE "https://example.com/library/layers/groups/string"
fetch("https://example.com/library/layers/groups/string")
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {
  url := "https://example.com/library/layers/groups/string"

  req, _ := http.NewRequest("DELETE", url, nil)
  
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
import requests

url = "https://example.com/library/layers/groups/string"

response = requests.request("DELETE", url)

print(response.text)
Empty

Update a layer group

PUT
/library/layers/groups/{id}

Request Body

application/jsonRequired
namestring
showInLayerSelectorboolean
visibleboolean
iconstring
ordernumber

Path Parameters

idRequiredstring

Response Body

curl -X PUT "https://example.com/library/layers/groups/string" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "string",
    "showInLayerSelector": true,
    "visible": true,
    "icon": "string",
    "order": 0
  }'
const body = JSON.stringify({
  "name": "string",
  "showInLayerSelector": true,
  "visible": true,
  "icon": "string",
  "order": 0
})

fetch("https://example.com/library/layers/groups/string", {
  body
})
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
  "strings"
)

func main() {
  url := "https://example.com/library/layers/groups/string"
  body := strings.NewReader(`{
    "name": "string",
    "showInLayerSelector": true,
    "visible": true,
    "icon": "string",
    "order": 0
  }`)
  req, _ := http.NewRequest("PUT", url, body)
  req.Header.Add("Content-Type", "application/json")
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
import requests

url = "https://example.com/library/layers/groups/string"
body = {
  "name": "string",
  "showInLayerSelector": true,
  "visible": true,
  "icon": "string",
  "order": 0
}
response = requests.request("PUT", url, json = body, headers = {
  "Content-Type": "application/json"
})

print(response.text)
Empty

Move a layer

PUT
/library/layers/{id}/move

Request Body

application/jsonRequired
targetGroupIdstring | null | null
targetOrderRequirednumber

Path Parameters

idRequiredstring

Response Body

curl -X PUT "https://example.com/library/layers/string/move" \
  -H "Content-Type: application/json" \
  -d '{
    "targetGroupId": "string",
    "targetOrder": 0
  }'
const body = JSON.stringify({
  "targetGroupId": "string",
  "targetOrder": 0
})

fetch("https://example.com/library/layers/string/move", {
  body
})
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
  "strings"
)

func main() {
  url := "https://example.com/library/layers/string/move"
  body := strings.NewReader(`{
    "targetGroupId": "string",
    "targetOrder": 0
  }`)
  req, _ := http.NewRequest("PUT", url, body)
  req.Header.Add("Content-Type", "application/json")
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
import requests

url = "https://example.com/library/layers/string/move"
body = {
  "targetGroupId": "string",
  "targetOrder": 0
}
response = requests.request("PUT", url, json = body, headers = {
  "Content-Type": "application/json"
})

print(response.text)
Empty

Move a layer group

PUT
/library/layers/groups/{id}/move

Request Body

application/jsonRequired
targetOrderRequirednumber

Path Parameters

idRequiredstring

Response Body

curl -X PUT "https://example.com/library/layers/groups/string/move" \
  -H "Content-Type: application/json" \
  -d '{
    "targetOrder": 0
  }'
const body = JSON.stringify({
  "targetOrder": 0
})

fetch("https://example.com/library/layers/groups/string/move", {
  body
})
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
  "strings"
)

func main() {
  url := "https://example.com/library/layers/groups/string/move"
  body := strings.NewReader(`{
    "targetOrder": 0
  }`)
  req, _ := http.NewRequest("PUT", url, body)
  req.Header.Add("Content-Type", "application/json")
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
import requests

url = "https://example.com/library/layers/groups/string/move"
body = {
  "targetOrder": 0
}
response = requests.request("PUT", url, json = body, headers = {
  "Content-Type": "application/json"
})

print(response.text)
Empty

Reorder layers

PUT
/library/layers/reorder

Request Body

application/jsonRequired
itemsRequiredarray<object>

Response Body

curl -X PUT "https://example.com/library/layers/reorder" \
  -H "Content-Type: application/json" \
  -d '{
    "items": [
      {
        "id": "string",
        "order": 0,
        "groupId": "string"
      }
    ]
  }'
const body = JSON.stringify({
  "items": [
    {
      "id": "string",
      "order": 0,
      "groupId": "string"
    }
  ]
})

fetch("https://example.com/library/layers/reorder", {
  body
})
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
  "strings"
)

func main() {
  url := "https://example.com/library/layers/reorder"
  body := strings.NewReader(`{
    "items": [
      {
        "id": "string",
        "order": 0,
        "groupId": "string"
      }
    ]
  }`)
  req, _ := http.NewRequest("PUT", url, body)
  req.Header.Add("Content-Type", "application/json")
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
import requests

url = "https://example.com/library/layers/reorder"
body = {
  "items": [
    {
      "id": "string",
      "order": 0,
      "groupId": "string"
    }
  ]
}
response = requests.request("PUT", url, json = body, headers = {
  "Content-Type": "application/json"
})

print(response.text)
Empty

Restore default layers

POST
/library/layers/restore-defaults

Response Body

curl -X POST "https://example.com/library/layers/restore-defaults"
fetch("https://example.com/library/layers/restore-defaults")
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {
  url := "https://example.com/library/layers/restore-defaults"

  req, _ := http.NewRequest("POST", url, nil)
  
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
import requests

url = "https://example.com/library/layers/restore-defaults"

response = requests.request("POST", url)

print(response.text)
Empty