Proper way to specify a VM template ID through API call

Through API we should use one.vm.allocate function to instantiate a VM. At least that’s what I think.

But there is no input argument that specifies the template id. Only “string containing the template for the vm”. Should we include this ID information in the whole template we are sending through API? For instance, must we include a line similar to this one:


inside that string?

I am trying to find a proper way of specifying the exact template ID from which some VM should be made of.