geoserver

Geoserver : enable services for a specific workspace


I'm working on automation to fully configure my Geoserver intance. Thanks to the REST API (https://docs.geoserver.org/main/en/user/rest/api/workspaces.html) I'm able to create automatically my workspace.

Now I would like to automatically enable all the services:

enter image description here

I tried to use the endpoint /services/wms/workspaces/{workspace}/settings but it fails: I receive an error 500. In term of data, I just passed (as JSON): enabled: true

I have to admit that I don't understand how this endpoint works (and if it is the one I need).

Is someone has an idea how to enable these services please :-) ?

Thank you very much


Solution

  • Request the existing file from the server using GET and modify that file and send it back. If you continue to have issues with JSON, try XML and if that works consider asking for an enhancement.