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.
Version: 1.0.0
BasePath:/geoserver/rest
All rights reserved
http://apache.org/licenses/LICENSE-2.0.html
Access
[ Jump to Models ]
Table of Contents
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
(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
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 request header;
the media type will be conveyed by the response header.
application/xml
application/json
text/html
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
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
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 request header;
the media type will be conveyed by the response header.
text/html
application/json
application/xml
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)
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 request header:
application/json
application/xml
Request body
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 request header;
the media type will be conveyed by the response header.
text/html
application/json
application/xml
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 request header:
application/json
application/xml
Request body
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
(putWorkspaces)
Responses
405
Not permitted
[ Jump to Methods ]
Table of Contents
Workspace
- Workspace
WorkspaceResponse
- Workspace Response
WorkspacesResponse
- Workspaces
name (optional)
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