new module:WorkspaceClient(url, auth)
Creates a GeoServer REST WorkspaceClient instance.
WARNING: For most cases the 'NameSpaceClient' seems to fit better.
Parameters:
Name | Type | Description |
---|---|---|
url |
String | The URL of the GeoServer REST API endpoint |
auth |
String | The Basic Authentication string |
- Source:
Methods
(async) create(name) → {String}
Creates a new workspace.
Parameters:
Name | Type | Description |
---|---|---|
name |
String | Name of the new workspace |
- Source:
Throws:
Error if request fails
Returns:
The name of the created workspace
- Type
- String
(async) delete(name, recurse)
Deletes a workspace.
Parameters:
Name | Type | Description |
---|---|---|
name |
String | Name of the workspace to delete |
recurse |
Boolean | Flag to enable recursive deletion |
- Source:
Throws:
Error if request fails
(async) get(name) → {Object}
Returns a workspace.
Parameters:
Name | Type | Description |
---|---|---|
name |
String | Name of the workspace |
- Source:
Throws:
Error if request fails
Returns:
An object describing the workspaces
- Type
- Object
(async) getAll() → {Object}
Returns all workspaces.
- Source:
Throws:
Error if request fails
Returns:
An Object describing the workspaces
- Type
- Object