It is possible to get sharing profiles using Java API. First, you need to make sure you are using an authentication extension that supports sharing. The database extensions under guacamole-auth-jdbc
supports sharing.
To get sharing profiles, you need to call the following API:
GET <base-url>/api/session/tunnels/<extension-id>/activeConnection/connection/sharingProfiles?token=<token>
where:
base-url
is the application base url
extension-id
is the ID of the particular extension (it may be mysql or sqlserver etc...). You can get this ID in the AuthenticationProvider.java source file in the extension code.
token
is access token, you can get one using api/tokens
call; the token should be the first thing to get, as it is used for all API calls.
The JS example for using sharing API you can find in the guacamole/src/main/webapp/app/rest/services/tunnelService.js
file, and for getting token in the guacamole/src/main/webapp/app/auth/service/authenticationService.js
file. Converting example from JS to Java shouldn't be a problem, those files are simple service that just use the Java API.