Programmatic Endpoint Status

13 views
Skip to first unread message

Bill Shirey

unread,
Jan 13, 2022, 4:04:24 PM1/13/22
to Discuss
Does anyone know of a programmatic/API way of querying the status of an endpoint given the UUID of the endpoint?  In my case I need to find out if a GCP client is running/can be connected to.

Thanks,

-Bill

Wagner, Richard

unread,
Jan 13, 2022, 7:52:21 PM1/13/22
to Bill Shirey, Discuss
Hi Bill,

The  CLI has a call to get a local endpoint if it’s available. I didn’t see a corresponding method in the SDK so you may need to look at the CLI’s source if you want to implement this in your own code.

—Rick


CLI


(pretty sure this is the right call

On Jan 13, 2022, at 1:04 PM, Bill Shirey <bill....@gmail.com> wrote:


Does anyone know of a programmatic/API way of querying the status of an endpoint given the UUID of the endpoint?  In my case I need to find out if a GCP client is running/can be connected to.

Thanks,

-Bill

--
You received this message because you are subscribed to the Google Groups "Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss+u...@globus.org.

Derek Furst

unread,
Jan 14, 2022, 10:07:50 AM1/14/22
to Discuss, rpwa...@ucsd.edu, Discuss
If i'm reading their question correctly, I think they're looking to do the equivalent of "./globusconnectpersonal -status" but with the globus cli or an api 

Stephen Rosen

unread,
Jan 14, 2022, 12:43:43 PM1/14/22
to Bill Shirey, Discuss
On Thu, Jan 13, 2022 at 4:04 PM Bill Shirey <bill....@gmail.com> wrote:
Does anyone know of a programmatic/API way of querying the status of an endpoint given the UUID of the endpoint?

In the general case -- for all endpoint types -- the best test is to try to do a filesystem operation like `ls`.
It requires credentials, but if the endpoint responds to `ls`, you know with certainty that it's online.
 
  In my case I need to find out if a GCP client is running/can be connected to.

For the specific case of GCP, there is something a little bit nicer.

If you do a get endpoint call (in the CLI, `globus endpoint show --format json`), you get back an endpoint document:

Specifically, there are two fields in there:

gcp_connected
    If is_globus_connect is "true", this indicates if the Globus Connect Personal (GCP) software is running and connected to Globus. "null" for other endpoint types.

gcp_paused
    If is_globus_connect is "true", this indicates if the Globus Connect Personal (GCP) has been paused. "null" for other endpoint types.


If you are using the CLI, you can use the `--jq/--jmespath` option to parse out this value. e.g.
  $ globus endpoint show "$(globus endpoint local-id)" --jq "gcp_connected"


I hope all of that helps. If you have questions, please let us know!
Best,
-Stephen


Thanks,

-Bill
Reply all
Reply to author
Forward
0 new messages