I have a new role in GeoServer I called name "Company" moreover some workspaces with different name also, I am going to know how I can associate my workspaces with "Company" role but only through GeoServer REST API not web admin GUI?
As is usual with the REST API the solution to this is hard to work out from the documentation (which is automatically generated) but relatively easy to work out by studying the responses from the REST API itself, after you have tried the process in the GUI.
Basically you need to POST a new rule to
/rest/security/acl/layers - the new rule looks like:
topp is the workspace you want to associate with the
company role. The
* applies to all layers or you could specify a named layer there, if you want to allow write access then use
w instead of