On Thu, May 14, 2020 at 1:42 PM Charaoui, Jérôme <
[email protected]> wrote:

> Hello,
>
> Following the unofficial REST API docs located at the URL below, I've been
> able to create connections and assign permisisons to those.
>
> https://github.com/ridvanaltun/guacamole-rest-api-documentation
>
> According to the documentation there doesn't seem to be an endpoint for
> managing group permissions. I haven't been able to find one either through
> trial-and-error, nor by looking at the source code.


I don't know if the documentation doesn't contain it or just doesn't
document it, but this is incorrect.  Everything is managed through the REST
API, including group permissions.


>
>
Is it possible to manage group permissions through the REST API?
>
>
Yes, it is possible. My best advice is to use one of the browser debug
consoles (Chrome Developer Tools, for example) and watch the traffic as you
adjust permissions.  This will give you a plain-text view of the API calls
made by the web application for managing these groups and permissions.

Group creation is a POST to the
https://guacamole.example.com/guacamole/api/session/data/<data
source>/userGroups endpoint with the "identifier" property as the name of
the group, and any attributes specified in the "attributes" property (by
default "disabled" is set to blank).

If you specify permissions during group creation, a PATCH request is sent
to the https://guacamole.example.com/guacamole/api/session/data/<data
source>/userGroups/<group name>/permissions endpoint with an array of
permissions to add that includes the "op" of "add", the relative path to
the connection item (connection or connect group), and the permission type
(READ).

Updating an existing group involves the same PATCH call to that endpoint
with any of the changes that should be made.

-Nick

Reply via email to