Hi Fernando, To create a new role I am using the following endpoint:
POST Headers: Accept: application/json Content-Type: application/x-www-form-urlencoded Authorization: Basic your-authorization https://www.your.geoserver.url.com/rest/security/roles/role/<your-role-name> Hope this helps. Cheers. On Thu, Feb 20, 2020 at 5:28 PM Jody Garnett <[email protected]> wrote: > That documentation is not provided by the community, we would welcome the > contribution of an example once you get it working. > > I encourage you to check the test cases, for that specific rest end point, > as a good place to find a working/tested example. > -- > Jody Garnett > > > On Thu, 20 Feb 2020 at 20:56, Fernando Quadro <[email protected]> wrote: > >> Hi All, >> >> I am trying to create security rules on GeoServer through the REST API, I >> am trying to create the tutorial steps of the link below via REST, however, >> I am not getting success. >> >> >> https://docs.boundlessgeo.com/suite/1.1.1/sysadmin/security/multiuser/index.html >> >> I was able to create users and workspaces without problems, but when I >> get to the ROLES, it gives an error. The closest to creating that I got was >> this way: >> >> curl -v -u admin:geoserver -XPOST -H "Content-type: text/xml" -d >> "<roles><role>ROLE_EDIT</role></roles>" >> http://localhost:8080/geoserver/rest/security/roles >> >> And the GeoServer returned the following message to me: HTTP / 1.1 405 >> Method Not Allowed >> >> What am I doing wrong? Is it possible to create ROLES and set permissions >> via REST? >> >> Best Regards, >> >> Fernando Quadro >> http://www.fernandoquadro.com.br >> https://www.linkedin.com/in/fernandoquadro/ >> _______________________________________________ >> 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 >> >> >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/geoserver-users >> > _______________________________________________ > 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 > > > [email protected] > https://lists.sourceforge.net/lists/listinfo/geoserver-users > -- Samy Otero *PSD |* Software Developer www.psdrcs.com *London |* 148 Fullarton St. 9th floor. *Burlington |* 5045 South Service Rd.
_______________________________________________ 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 [email protected] https://lists.sourceforge.net/lists/listinfo/geoserver-users
