Integrate RA connect via URL or hyperlink
Description
By passing query parameters, it is possible to:
- automatically search for an asset
- automatically connect to a service of that asset (if available / optional)
- automatically hide the sidebar
- automatically close the browser window, when the session ends
Parameters
Parameter search_asset
A wildcard search parameter is the same as when a search value is written directly into the search box inside remote management.
Parameter asset_action
The structure of the asset_action
paramter is as follows (seperated by a | (pipe char)):
- Action ("ssh.tty" for Terminal, "desktop" for Desktop, "ssh.sftp" for Filetransfer)
- A boolean value (true or false), if you want to connect to the first user session.
- If true, a logged on user session is used (if available)
- If false, the connection will be made to the login screen (if available)
- If omitted, the first connection will be used, regardless if logged on or not
- Additional information about the service.
- Currently only used in case of service type "ssh.tty"
- Can be "cmd" or "powershell"
Parameter asset_action_auto_close
If set to a truthy value (true | 1 | on | yes), the window automatically closes, once the session was ended.
This only works, if
- The asset and service passed were found and the session was created/connected to.
- The window was opened from a script using window.open or using a link with target _blank
Examples
- Open Connect and automatically search for assets starting with "Server":
https://connect.matrix42.com/?search_asset=test - Open Connect and automatically connect to the desktop session of the currently logged in user on the computer named "Test_PC1":
https://connect.matrix42.com/?search...n=desktop|true - Open Connect and automatically connect to a new "powershell" terminal session on the computer named "Test_PC1", but ask for the user credentials:
https://connect.matrix42.com/?search...lse|powershell - Open Connect and automatically connect to the first available desktop session on the computer named "Test_PC1" (regardless of whether a user is logged on) - After the session ends, try closing the browser tab:
https://connect.matrix42.com/?search...uto_close=true
HTML examples
Both of the following examples:
- Open the connection
- Search for an asset named "Test_PC1"
- Connect to a logged in desktop session
- Automatically close the window after the session ends
Link
<a href="https://connect.matrix42.com/?search_asset=test_pc1&asset_action=desktop|true&asset_action_auto_close=true" target="_blank">Click me</a>
Button
<button type="button" onclick="window.open('https://connect.matrix42.com/?search_asset=test_pc1&asset_action=desktop|true&asset_action_auto_close=true', '_blank')">Click me</button>