How to get dynamic container name for the particular VDB

  • 0
  • 1
  • Question
  • Updated 2 years ago
  • Answered
Hi Guys,

Could you please tell us how to get the container name for that particular VDB.While we are working on the API we are searching the entire database code to get the list of container available.
It is possible to get it or we can list out the detail of the selected VDB?


Photo of Swathy Sukumar

Swathy Sukumar

  • 886 Points 500 badge 2x thumb

Posted 2 years ago

  • 0
  • 1
Photo of Adam Bowen

Adam Bowen, Official Rep

  • 18,596 Points 10k badge 2x thumb
Official Response

When you create the VDB, it returns the container name in the response. If you need to grab the container name for a VDB at a different time, like in another job, then you would get the list of VDB's and use logic to grab the one for your name. In our github repo, you can leverage the find_obj_by_name class. For example:

Then your container reference is the reference of that object. 

So in the example at that link, the following would print the container id:

print vdb_obj.reference