Skip to main content
Question

Using API to query a specific jump client by hostname

  • December 31, 2025
  • 8 replies
  • 27 views

I would like to connect to a specific computer by hostname to perform queries via API. The problem I’m running into is the API requires the jump client ID, not the host name. And there is no server side filtering for the hosts to find the jump client ID. I then tried to pull a list of all hosts and jump client IDs to filter on my end, but the maximum number of results I get is 13. 

I have extensively consulted with chatgpt and it came to this conclusion:

Ah — that clarifies things. The reason your earlier scripts didn’t work is the Command API only supports listing all connected clients; it does not support a server-side filter by hostname. That’s why trying to query a single host returns nothing — the API only gives batches of connected clients, and without paging through, your host might not be in the first page.

Ah — now it’s clear why you’re still only seeing 13 Jump Clients: the BeyondTrust Cloud Command API get_connected_client_list does not return all connected clients at once. On cloud tenants, it has additional undocumented limits, and even with pagination parameters (start / limit), it often caps at a very small number, like 10–20 clients per call.
I searched official BeyondTrust documentation, community forums, and general web sources — and the consensus from users and the official API docs is unfortunately that there is no supported way to pull a full list of all online Jump Clients (with their internal IDs) from BeyondTrust Cloud via a single API call.

 

 

How the heck do I get a full list of the jump client IDs in order to query my hosts?

8 replies

Forum|alt.badge.img+1
  • Veteran
  • December 31, 2025

Unless something has changed, you have to go through page by page.

 

Below is a rough example. Loops through until it finds the client. It does also sort based on last connection time in case there are duplicates for that jump client. (Please productionize this and add whatever error handling you want. This is simply an example) - 

    $PageIndex = 1
do{
Write-Host "PAGE $PageIndex"
$JumpClientList = Invoke-RestMethod -Method Get -Headers @{"authorization"="Bearer $Token"; "Accept"="application/json"} -Uri "https://[Redacted]/api/config/v1/jump-client?current_page=$PageIndex"
$JumpClient = $JumpClientList | Where-Object {$_.HostName -eq 'YourHostname'}
if($JumpClient){
$JumpClientID = $JumpClient | Sort-Object last_connect_timestamp -Descending | Select-Object -First 1 -ExpandProperty "id"
Write-Host "Found jump client [$($JumpClient.hostname)] with ID [$JumpClientID)]"
}
$PageIndex++
}while($JumpClientList.count -eq 100 -AND $null -eq $JumpClientID)

 


  • Author
  • Rising Star
  • December 31, 2025

Thank you. That worked to get the jump client ID. Now I’m running into a new issue. I’m able to connect, but I’m unable to query the computer’s uptime. Is it possible to do that?


  • Author
  • Rising Star
  • December 31, 2025

 


Forum|alt.badge.img+1
  • Veteran
  • December 31, 2025

BeyondTrust provides great documentation. I would recommend that over ChatGPT, or try pointing your LLM to the documentation - Get a Jump Client.

That data might not be available for the API. I don’t see it at first glance.


  • Author
  • Rising Star
  • December 31, 2025

I looked through the documentation and didn’t see a way to do it there either. I was trying to script a remote support session that would provide the computer uptime. I figured since the jump client could be contacted it would be able to run a script on the machine and provide the result. Unfortunately that doesn't appear to be the case.


Forum|alt.badge.img+1
  • Veteran
  • December 31, 2025

Maybe this would be better suited for the endpoint automation within the tool? You could write a script to get uptime then run it on the online machines. 


  • Author
  • Rising Star
  • December 31, 2025

That’s a good thought too, but the API doesn’t allow me to run the endpoint automation job. I could schedule it, but then it wouldn’t be accurate when we want to query it.


  • Author
  • Rising Star
  • December 31, 2025

And I even if I run the endpoint automation I can’t retrieve the results through the API.