/api/v1/workspaces/{workspace}/services/{service}/layers/{layer} Updates layer configuration. Omitted/null title, description and dimensions preserve existing values; empty strings clear title/description and an empty dimensions array removes all dimensions. Enabling a regular layer validates its source.
Operation ID: updateLayer
Authentication
Use one of the following authentication options. Permissions and workspace scope still apply. See authentication and access control.
-
Authorization: Bearer YOUR_ACCESS_TOKEN -
X-API-Key: YOUR_API_KEY
Parameters
-
workspacepath required -
Workspace ID
string -
servicepath required -
Service ID
string -
layerpath required -
Layer ID
string
Request body
Required
Layer updates
Content type application/json
-
allowed_rolesarray of string -
crs_defaultinteger -
default_stylestring -
descriptionstring -
- Nullable
-
true
-
dimensionsarray of Dimension ↗ -
enabledboolean -
publicboolean -
public_idstring -
stylesarray of string -
titlestring
Responses
200 Updated layer
Content type application/json
400 Bad Request
Content type application/json
401 Unauthorized
Content type application/json
403 Forbidden
Content type application/json
404 Layer not found
Content type application/json
409 public_id conflicts or layer is referenced by a layer group
Content type application/json
413 Request body exceeds the configured limit
Content type application/json
422 Source layer is missing or unreadable
Content type application/json
426 HTTPS required
Content type application/json
429 Request rate exceeded
Content type application/json
503 Datasource unavailable
Content type application/json
OpenAPI operation definition
{
"description": "Updates layer configuration. Omitted/null title, description and dimensions preserve existing values; empty strings clear title/description and an empty dimensions array removes all dimensions. Enabling a regular layer validates its source.",
"operationId": "updateLayer",
"parameters": [
{
"description": "Workspace ID",
"in": "path",
"name": "workspace",
"required": true,
"schema": {
"type": "string"
}
},
{
"description": "Service ID",
"in": "path",
"name": "service",
"required": true,
"schema": {
"type": "string"
}
},
{
"description": "Layer ID",
"in": "path",
"name": "layer",
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"properties": {
"allowed_roles": {
"items": {
"type": "string"
},
"type": "array"
},
"crs_default": {
"type": "integer"
},
"default_style": {
"type": "string"
},
"description": {
"nullable": true,
"type": "string"
},
"dimensions": {
"items": {
"$ref": "#/components/schemas/Dimension"
},
"type": "array"
},
"enabled": {
"type": "boolean"
},
"public": {
"type": "boolean"
},
"public_id": {
"type": "string"
},
"styles": {
"items": {
"type": "string"
},
"type": "array"
},
"title": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "Layer updates",
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Layer"
}
}
},
"description": "Updated layer"
},
"400": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
},
"description": "Bad Request"
},
"401": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
},
"description": "Unauthorized"
},
"403": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
},
"description": "Forbidden"
},
"404": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
},
"description": "Layer not found"
},
"409": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
},
"description": "public_id conflicts or layer is referenced by a layer group"
},
"413": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
},
"description": "Request body exceeds the configured limit"
},
"422": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
},
"description": "Source layer is missing or unreadable"
},
"426": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
},
"description": "HTTPS required"
},
"429": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
},
"description": "Request rate exceeded"
},
"503": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
},
"description": "Datasource unavailable"
}
},
"summary": "Update layer",
"tags": [
"Layers"
]
}