GeoServer Namespace

A namespace is a uniquely identifiable grouping of feature types. It is identified by a prefix and a URI.
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

Namespaces

Namespaces

Up
delete /namespaces/{namespaceName}
Delete a namespace (deleteNamespace)

Path parameters

namespaceName (required)
Path Parameter — Name of the namespace

Responses

200

Success. Namespace deleted

403

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

404

Namespace doesn't exist

405

Can't delete default namespace

Up
delete /namespaces
(deleteNamespaces)

Responses

405

Not permitted

Up
get /namespaces/{namespaceName}
Retrieve a namespace (getNamespace)
Retrieves a single namespace definition. Use the "Accept:" header to specify format or append an extension to the endpoint (example "/namespaces/{namespace}.xml" for XML).

Path parameters

namespaceName (required)
Path Parameter — The name of the namespace to fetch, or "default" to get the default namespace.

Return type

NamespaceResponse

Example data

Content-Type: application/xml
" topp http://www.openplans.org/topp    "

Example data

Content-Type: application/json
"{ \"namespace\": { \"prefix\": \"topp\", \"uri\": \"http://www.openplans.org/topp\", \"featureTypes\": \"http://localhost:8080/geoserver/rest/workspaces/topp/featuretypes.json\" } }"

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 NamespaceResponse

Example data

Content-Type: application/xml
 topp http://www.openplans.org/topp    

Example data

Content-Type: application/json
{ "namespace": { "prefix": "topp", "uri": "http://www.openplans.org/topp", "featureTypes": "http://localhost:8080/geoserver/rest/workspaces/topp/featuretypes.json" } }

404

namespace does not exist

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

Return type

NamespacesResponse

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  \"namespaces\": {\n    \"namespace\": [\n      {\n      \"name\": \"topp\",\n      \"href\": \"http://localhost:8080/geoserver/rest/namespaces/topp.json\"\n      },\n      {\n      \"name\": \"it.geosolutions\",\n      \"href\": \"http://localhost:8080/geoserver/rest/namespaces/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 NamespacesResponse

Example data

Content-Type: application/xml

  
    topp
    
  
  
    it.geosolutions
    
  

Example data

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

401

Unauthorized

Up
post /namespaces/{namespaceName}
(postNamespace)

Responses

405

Forbidden to post to an existing namespace (use PUT)

Up
post /namespaces
Add a new namespace to GeoServer (postNamespaces)
Adds a new namespace to the server

Consumes

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

Request body

namespaceBody Namespace (required)
Body Parameter — The layer group body information to upload.

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

401

Unable to add namespace as it already exists

Up
put /namespaces/{namespaceName}
Update a namespace (putNamespace)
Takes the body of the put and modifies the namespace from it.

Path parameters

namespaceName (required)
Path Parameter — Name of namespace, or "default" to set the default namespace using the namespace prefix in the body of the post.

Consumes

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

Responses

200

Modified

404

Namespace not found

405

Forbidden to change the name of the namespace

Up
put /namespaces
(putNamespaces)

Responses

405

Not permitted

Models

[ Jump to Methods ]

Table of Contents

  1. Namespace - Namespace
  2. NamespaceResponse - Namespace Response
  3. NamespacesResponse - Namespaces

Namespace - Namespace Up

prefix (optional)
String Name/prefix of the namespace
uri (optional)
String URI that identifies the namespace

NamespaceResponse - Namespace Response Up

prefix (optional)
String Name of namespace
uri (optional)
String URI of the namespace
featureTypes (optional)
String URL to featureTypes associated with this namespace

NamespacesResponse - Namespaces Up

namespaces (optional)