Start a Conversation

Solved!

Go to Solution

Closed

2 Posts

806

May 3rd, 2023 01:00

REST API - obtaining the CID for a VM

HI all,

I'm reading through the REST API documentation and testing commands via swagger-ui, however pretty much all client commands require knowledge of the client's CID but for the use-case of this application we'd only know the client name, not it's CID.

Is there a simple way to pass the client name to REST API and obtain it's CID please?  The only option I'm seeing at the moment is performing a recursive GET Clients on the 1000+ clients in our estate and working out the CID from there.

TIA!

 

2 Posts

May 11th, 2023 08:00

To answer my own question, you need to use "Get Clients" (/v1/clients), which returns info for all Avamar clients in the given domain/etc..

The CID is returned in the "id" field.

So you could build an array or strip out what you want in a calling script, or to get details for a specific client use filter: name=="vmName"

1 Rookie

 • 

20.4K Posts

May 12th, 2023 07:00

yep, something like this:

 

/api/v1/clients?domain=/&recursive=true&size=100&filter=domainFqdn!=/MC_RETIRED&fields=id,name

If you have a lot of clients, you will need to "page" through them.

No Events found!

Top