Managing workspaces

We will use REST operations with workspaces. In this section, as in the others contained in this chapter, we will use both cURL and Python to perform the same operation.

The examples are shown in a Linux shell, but cURL and Python syntaxes are identical in a Windows shell.

  1. We want to retrieve which workspaces are defined in your GeoServer instance. This requires a GET operation. The following piece of code shows you the syntax. cURL has a lot of options; you can take a look at all of them, by running it with the curl --help command from Linux and Windows. On Linux, you can also take a look at the manual with the man curl command. Let's look at the different options we use:
    • The first option we use is -u. It stands for ...

Get GeoServer Beginner's Guide - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.