Styles¶
A style describes how a resource (feature type or coverage) should be symbolized or rendered by the Web Map Service. In GeoServer styles are specified with SLD.
/styles[.<format>]¶
Controls all styles.
Method | Action | Status code | Formats | Default Format | Parameters |
---|---|---|---|---|---|
GET | Return all styles | 200 | HTML, XML, JSON | HTML | |
POST | Create a new style | 201 with Location header | SLD, XML, JSON See note below | name | |
PUT | 405 | ||||
DELETE | 405 | purge |
When executing a POST or PUT request with an SLD style, the Content-type header should be set to application/vnd.ogc.sld+xml.
/styles/<s>[.<format>]¶
Controls a given style.
Method | Action | Status code | Formats | Default Format |
---|---|---|---|---|
GET | Return style s | 200 | SLD, HTML, XML, JSON | HTML |
POST | 405 | |||
PUT | Modify style s | 200 | SLD, XML, JSON, See note above | |
DELETE | Delete style s | 200 |
Exceptions¶
Exception | Status code |
---|---|
GET for a style that does not exist | 404 |
PUT that changes name of style | 403 |
DELETE against style which is referenced by existing layers | 403 |
/workspaces/<ws>/styles[.<format>]¶
Controls all styles in a given workspace.
Method | Action | Status code | Formats | Default Format | Parameters |
---|---|---|---|---|---|
GET | Return all styles within workspace ws | 200 | HTML, XML, JSON | HTML | |
POST | Create a new style within workspace ws | 201 with Location header | SLD, XML, JSON, See note above | name | |
PUT | 405 | ||||
DELETE | 405 | purge |
/workspaces/<ws>/styles/<s>[.<format>]¶
Controls a particular style in a given workspace.
Method | Action | Status code | Formats | Default Format |
---|---|---|---|---|
GET | Return style s within workspace ws | 200 | SLD, HTML, XML, JSON | HTML |
POST | 405 | |||
PUT | Modify style s within workspace ws | 200 | SLD, XML, JSON See note above | |
DELETE | Delete style s within workspace ws | 200 |