Class: module:NamespaceClient

module:NamespaceClient(url, auth)

new module:NamespaceClient(url, auth)

Creates a GeoServer REST NamespaceClient instance.
Parameters:
Name Type Description
url String The URL of the GeoServer REST API endpoint
auth String The Basic Authentication string
Source:

Methods

(async) create(prefix, uri) → {String}

Creates a new namespace.
Parameters:
Name Type Description
prefix String Prefix of the new namespace
uri String Uri of the new namespace
Source:
Throws:
Error if request fails
Returns:
The name of the created namespace
Type
String

(async) delete(name)

Deletes a namespace.
Parameters:
Name Type Description
name String Name of the namespace to delete
Source:
Throws:
Error if request fails

(async) get(name) → {Object}

Returns a namespace.
Parameters:
Name Type Description
name String Name of the namespace
Source:
Throws:
Error if request fails
Returns:
An object describing the namespace or undefined if it cannot be found
Type
Object

(async) getAll() → {Object}

Returns all namespaces.
Source:
Throws:
Error if request fails
Returns:
An object describing the namespace
Type
Object