You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@guacamole.apache.org by Abhinav Jain <ab...@gmail.com> on 2020/02/26 20:26:37 UTC

Getting shared link using Rest APIs

Hi all,

I’m trying to get the shared link using Rest APIs. I can get it using UI
but while doing the same thing via POSTMAN I’m getting the following error.

{
    "message": "No such tunnel.",
    "translatableMessage": {
        "key": "No such tunnel.",
        "variables": null
    },
    "statusCode": null,
    "expected": null,
    "type": "NOT_FOUND"
}


I’m using the following api call

https://IP/api/session/tunnels/UID/activeConnection/sharingCredentials/3?token=xxxx
<https://ip/api/session/tunnels/UID/activeConnection/sharingCredentials/3?token=xxxx>

It seems I need to click on the connection via UI to make it active then
only I can generate the UID. Is there any way I can activate the connection
using Rest APIs. I’m stuck on this issue for sometime. Any help would be
really appreciated.


Thanks,
Abhinav

Re: Getting shared link using Rest APIs

Posted by Mike Jumper <mj...@apache.org>.
On Wed, Feb 26, 2020 at 7:11 PM Abhinav Jain <ab...@gmail.com> wrote:

> Hi all,
>
>
Please do not post the same thread to multiple lists:

https://www.apache.org/dev/contrib-email-tips#rightlist

As you are not subscribed to either list, the user@ list automatically
rejected your post and the dev@ list sent it to the moderation queue, so
ultimately only one thread was created after all. Since you're not
subscribed, I'm explicitly CC'ing you on this message so you will see this,
but *beware that you will need to subscribe to the relevant mailing list
(in this case dev@) to receive responses to your post*.

I’m trying to get the shared link using Rest APIs. I can get it using UI
> but while doing the same thing via POSTMAN I’m getting the following error.
>
> {
>     "message": "No such tunnel.",
>     "translatableMessage": {
>         "key": "No such tunnel.",
>         "variables": null
>     },
>     "statusCode": null,
>     "expected": null,
>     "type": "NOT_FOUND"
> }
>
>
> I’m using the following api call
>
>
> https://IP/api/session/tunnels/UID/activeConnection/sharingCredentials/3?token=xxxx
>
> It seems I need to click on the connection via UI to make it active then
> only I can generate the UID. Is there any way I can activate the connection
> using Rest APIs.
>

It's not a matter of some sort of activation; you simply can't share a
connection that isn't being used.

If you want to provide access to a single connection for a particular user,
what you need is to grant that user access to that connection, not attempt
to generate sharing credentials. Without some user already using the
connection in question, there is nothing to be shared.

- Mike