Hi All,

I'writing a start-up script file, and I want to update users configuration
using the REST API.

First thing I noted, that the SECURITY/USERGROUP API (
https://docs.geoserver.org/latest/en/api/#1.0.0/usergroup.yaml)
allows only application/xml format, but id odes not work when asking for or
posting application/json data.


I'm able to create an new user:
curl -i -u 'admin:geoserver' -X POST -H 'Accept: application/xml' -H
'Content-Type: application/xml' -d '<?xml version="1.0"
encoding="UTF-8"?><user><userName>foobar</userName><password>test_1234</password><enabled>true</enabled></user>'
http://127.0.0.1:8080/geoserver/rest/security/usergroup/users

then assign the ADMIN role to the new user:
curl -i -u 'admin:geoserver' -X POST
http://127.0.0.1:8080/geoserver/rest/security/roles/role/ADMIN/user/foobar

But when i try to execute a GET/POST/DELETE against the
.../usergroup/users/{user} or the
.../usergroup/service/{serviceName}/users/{user}
I got always a 404 - NOT FOUND message.

example
curl -i -u 'admin:geoserver' -X GET -H 'Accept: application/xml'
http://127.0.0.1:8080/geoserver/rest/security/usergroup/users/foobar


Where am I wrong? Any suggestion? Or is it a bug?


Kind Regards


Davide.
_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this 
list:
- Earning your support instead of buying it, but Ian Turton: 
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: 
http://geoserver.org/comm/userlist-guidelines.html

If you want to request a feature or an improvement, also see this: 
https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer


Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to