Docs API reference

neoserver 0.1.2

Update style

PUT /api/v1/workspaces/{workspace}/styles/{style} · Styles

← All operations and schemas
PUT /api/v1/workspaces/{workspace}/styles/{style}

Updates an existing style.

Operation ID: updateStyle

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

workspace path required

Workspace ID

string
style path required

Style name

string

Request body

Required

Style updates

Content type application/json

object
body string

Authored style content

description string
format string
Allowed values
["sld_1.0.0","sld_1.1.0","se_1.1.0","css","ysld","mapbox"]
name string
sld_body string

SLD XML content

title string

Responses

200 Updated style

Content type application/json

400 Bad Request - invalid SLD

Content type application/json

401 Unauthorized

Content type application/json

403 Forbidden

Content type application/json

404 Style not found

Content type application/json

409 Conflict - style name already exists

Content type application/json

413 Request body exceeds the configured limit

Content type application/json

426 HTTPS required

Content type application/json

429 Request rate exceeded

Content type application/json

503 Service temporarily unavailable

Content type application/json

OpenAPI operation definition
{
  "description": "Updates an existing style.",
  "operationId": "updateStyle",
  "parameters": [
    {
      "description": "Workspace ID",
      "in": "path",
      "name": "workspace",
      "required": true,
      "schema": {
        "type": "string"
      }
    },
    {
      "description": "Style name",
      "in": "path",
      "name": "style",
      "required": true,
      "schema": {
        "type": "string"
      }
    }
  ],
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "properties": {
            "body": {
              "description": "Authored style content",
              "type": "string"
            },
            "description": {
              "type": "string"
            },
            "format": {
              "enum": [
                "sld_1.0.0",
                "sld_1.1.0",
                "se_1.1.0",
                "css",
                "ysld",
                "mapbox"
              ],
              "type": "string"
            },
            "name": {
              "type": "string"
            },
            "sld_body": {
              "description": "SLD XML content",
              "type": "string"
            },
            "title": {
              "type": "string"
            }
          },
          "type": "object"
        }
      }
    },
    "description": "Style updates",
    "required": true
  },
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/StyleWithBody"
          }
        }
      },
      "description": "Updated style"
    },
    "400": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      },
      "description": "Bad Request - invalid SLD"
    },
    "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": "Style not found"
    },
    "409": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      },
      "description": "Conflict - style name already exists"
    },
    "413": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      },
      "description": "Request body exceeds the configured limit"
    },
    "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": "Service temporarily unavailable"
    }
  },
  "summary": "Update style",
  "tags": [
    "Styles"
  ]
}

Search documentation

Type to search guides and reference pages.