node-saucelabs
node-saucelabs copied to clipboard
Fetching list of active tunnels by user
Hello,
While using the Rest API I could able to pull the active tunnels by username
Request: rest/v1/USERNAME/tunnels
Response: ['tunnel-id-1','tunnel-id-2']
But while using the node module, I'm getting the information from all the users under the organization. Is it because of the user being admin?
Request: api.listAvailableTunnels(USERNAME)
Response:
{ "user-1": [], "user-2":[]}
Reference picture of fetching available tunnels https://share.getcloudapp.com/BluJkZOJ
Is it because of the user being admin?
Yeah most likely. I can double check on that.
Sure. As we are expecting SAUCE_USERNAME
from env (or) user
during constructor initialization, Asking for username to be mentioned while fetching listOfAvailableTunnels
might not be needed I believe.
Everything resides in a single process and object-level scope.
might not be needed I believe.
It is though since you can pull the data not only for your user but also for your sub-accounts.
Yeah. I agreed. Then we should give the list of tunnels of the specified user instead of listing all the sub-accounts. If the user doesn't provide username
, We can list all tunnels including sub-accounts.
If the user doesn't provide
username
, We can list all tunnels including sub-accounts.
This is more difficult. As you can see all API commands are generated based on the Swagger definition and all special behaviors need to be implemented separately.