GeoServer Workspace

A workspace is a grouping of data stores. Similar to a namespace, it is used to group data that is related in some way.
More information: http://geoserver.org/comm/
Contact Info: geoserver-users@sourceforge.net
Version: 1.0.0
BasePath:/geoserver/rest
All rights reserved
http://apache.org/licenses/LICENSE-2.0.html

Access

Methods

[ Jump to Models ]

Table of Contents

Workspaces

Workspaces

Up
delete /workspaces/{workspaceName}
(deleteWorkspace)

Path parameters

workspaceName (required)
Path Parameter — name of workspace

Query parameters

recurse (optional)
Query Parameter — delete workspace contents (default false)

Responses

200

Success workspace deleted

403

Workspace or related Namespace is not empty (and recurse not true)

404

Workspace doesn't exist

Up
delete /workspaces
(deleteWorkspaces)

Responses

405

Not permitted

Up
get /workspaces/{workspaceName}
Retrieve a layer group (getWorkspace)
Retrieves a single workspace definition. Use the "Accept:" header to specify format or append an extension to the endpoint (example "/workspaces/{workspace}.xml" for XML).

Path parameters

workspaceName (required)
Path Parameter — the name of the workspace to fetch

Query parameters

quietOnNotFound (optional)
Query Parameter — The quietOnNotFound parameter avoids logging an exception when the workspace is not present. Note that 404 status code will still be returned.

Return type

WorkspaceResponse

Example data

Content-Type: application/xml
"\n  topp\n  \n    \n  \n  \n    \n  \n  \n    \n  \n\n"

Example data

Content-Type: application/json
"{\n\"workspace\": {\n  \"name\": \"topp\",\n  \"dataStores\": \"http://localhost:8080/geoserver/rest/workspaces/topp/datastores.json\",\n  \"coverageStores\": \"http://localhost:8080/geoserver/rest/workspaces/topp/coveragestores.json\",\n  \"wmsStores\": \"http://localhost:8080/geoserver/rest/workspaces/topp/wmsstores.json\"\n}\n}\n"

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

OK WorkspaceResponse

Example data

Content-Type: application/xml

  topp
  
    
  
  
    
  
  
    
  

Example data

Content-Type: application/json
{
"workspace": {
  "name": "topp",
  "dataStores": "http://localhost:8080/geoserver/rest/workspaces/topp/datastores.json",
  "coverageStores": "http://localhost:8080/geoserver/rest/workspaces/topp/coveragestores.json",
  "wmsStores": "http://localhost:8080/geoserver/rest/workspaces/topp/wmsstores.json"
}
}

404

workspace does not exist

Up
get /workspaces
Get a list of workspaces (getWorkspaces)
Displays a list of all workspaces on the server. Use the "Accept:" header to specify format or append an extension to the endpoint (example "/workspaces.xml" for XML)

Return type

WorkspacesResponse

Example data

Content-Type: application/xml
"\n  \n    topp\n    \n  \n  \n    it.geosolutions\n    \n  \n\n"

Example data

Content-Type: application/json
"{\n  \"workspaces\": {\n  \"workspace\": [\n    {\n     \"name\": \"topp\",\n     \"href\": \"http://localhost:8080/geoserver/rest/workspaces/topp.json\"\n    },\n    {\n      \"name\": \"it.geosolutions\",\n      \"href\": \"http://localhost:8080/geoserver/rest/workspaces/it.geosolutions.json\"\n    }\n  ]\n  }\n}\n"

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

OK WorkspacesResponse

Example data

Content-Type: application/xml

  
    topp
    
  
  
    it.geosolutions
    
  

Example data

Content-Type: application/json
{
  "workspaces": {
  "workspace": [
    {
     "name": "topp",
     "href": "http://localhost:8080/geoserver/rest/workspaces/topp.json"
    },
    {
      "name": "it.geosolutions",
      "href": "http://localhost:8080/geoserver/rest/workspaces/it.geosolutions.json"
    }
  ]
  }
}

401

Unauthorized

Up
post /workspaces/{workspaceName}
(postWorkspace)

Responses

405

Forbidden to post to an existing workspace (use PUT)

Up
post /workspaces
add a new workspace to GeoServer (postWorkspaces)
Adds a new workspace to the server

Consumes

This API call consumes the following media types via the Content-Type request header:

Request body

workspaceBody Workspace (required)
Body Parameter — The layer group body information to upload.

Query parameters

default (optional)
Query Parameter — New workspace will be the used as the default. Allowed values are true or false, The default value is false. default: false

Return type

String

Example data

Content-Type: application/json
""

Example data

Content-Type: application/xml
aeiou

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

201

Created String

409

Unable to add workspace as it already exists

Up
put /workspaces/{workspaceName}
Update a workspace (putWorkspace)
takes the body of the post and modifies the workspace from it.

Path parameters

workspaceName (required)
Path Parameter — name of workspace

Consumes

This API call consumes the following media types via the Content-Type request header:

Request body

workspaceBody Workspace (required)
Body Parameter — The layer group body information to upload.

Responses

200

Modified

404

Workspace not found

405

Forbidden to change the name of the workspace

Up
put /workspaces
(putWorkspaces)

Responses

405

Not permitted

Models

[ Jump to Methods ]

Table of Contents

  1. Workspace - Workspace
  2. WorkspaceResponse - Workspace Response
  3. WorkspacesResponse - Workspaces

Workspace - Workspace Up

name (optional)
String name of the workspace

WorkspaceResponse - Workspace Response Up

name (optional)
String Name of workspace
dataStores (optional)
String URL to Datas tores in this workspace
coverageStores (optional)
String URL to Coverage stores in this workspace
wmsStores (optional)
String URL to WMS stores in this workspace

WorkspacesResponse - Workspaces Up

workspaces (optional)