Skip to main content
Question

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

  • March 30, 2021
  • 2 replies
  • 2638 views

Forum|alt.badge.img+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.

This topic has been closed for replies.

2 replies

Forum|alt.badge.img+1
  • Author
  • Adventurer
  • March 30, 2021

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
}