Retrieve tree elements using cdb_get_object() API

Yang data Model

container C1 {
list L1{
key K1;
leaf K1 {
type uint32;
}

  container C2 {
      list L2 {
          key K2;
          leaf K2 {
              type uint32;
             }

  container C3 {
      leaf XYZ {
          type uint32;
          }

		}
	}
}

}
}

I want to retrive this subtree element using cdb_get_object() API in one go.
is it possible to do that?

Yes, it is possible.

You can refer to the following two postings for more information on the cdb_get_object( ) API:

Most optimal way to read large quantity of statistics from confd with C++ API

get_object for containers within a list