Question

List VM UUID via vm-name search via REST API 3

  • 30 March 2021
  • 2 replies
  • 1937 views

Badge +1

Hi,

 Using REST API 3 ,i want to list vm uuid by providing vm name in search criteria.

But i am unable to find any search filter to provide vm name.

I am using PUT /vm/list, these are the body model

{
"kind": "vm",
"sort_attribute": "string",
"filter": "string",
"length": 0,
"sort_order": "string",
"offset": 0
}

Please suggest where to put vm name search criteria.

Also, suggest if there is another call for it to list vm uuid by vm name search.


2 replies

Badge +1

I have tried with  

"filter": "vm_name==.*clone*",

results none 

But not helping

Try this

 

{
  "kind": "vm",
  "sort_attribute": "string",
  "filter": "vm_name==*clone",
  "length": 5,
  "sort_order": "ASCENDING",
  "offset": 0
}

Reply