0

When I insert this below link like GeoServer 2.17.1 RESTful API I got only: userName%

curl -u admin:@dmin9901 -X POST http://localhost:8080/geoserver/rest/security/usergroup/users/ -H  "accept: application/json" -H  "content-type: application/json" -d "{  \"userName\": \"test\",  \"password\": \"test1234\",  \"enabled\": true}"

It can't create new user in my GeoServer, it would be bug?

enter image description here

1 Answer 1

1

Looking at the API docs it looks like the API endpoint you are hitting is incorrect.

GeoServer API

Based on this I would expect the call to be:

curl -u admin:@dmin9901 -X POST http://localhost:8080/geoserver/rest/usergroup/users/ -H  "accept: application/json" -H  "content-type: application/json" -d "{  \"userName\": \"test\",  \"password\": \"test1234\",  \"enabled\": true}"

If that is not the issue I'd look in the geoserver log file (by default it will be in $GEOSERVER_DATA_DIR/logs. As well as adding the -v option to the curl command to see what the response headers look like.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.