RESTful knowledge exchange
Post Reply
abqstu
Influencer
Posts: 11
Liked: never
Joined: Aug 27, 2013 11:37 am
Contact:

Adding new VMs to a job

Post by abqstu »

Can you tell me how I would add a new VM to an existing job.
I've seen the (POST) /jobs/{ID}/includes command but this requires a hierarchyObjRef and hierarchyObjName to be specified. If I was moving a VM from one job to another, then I could get this information from the Includes section of the job's BackupJobInfo, but where would I get this information for a VM that has never been added to a job ?

Stuart
veremin
Product Manager
Posts: 20270
Liked: 2252 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Adding new VMs to a job

Post by veremin »

Hi, Stuart. The type of the HierarchyObjRef element is HierarchyObjRefType. The HierarchyObjRefType object can be either created manually or obtained using /lookupSvc. More detailed information regarding it can be found in the corresponding User Guide (p. 329).

Thanks.
abqstu
Influencer
Posts: 11
Liked: never
Joined: Aug 27, 2013 11:37 am
Contact:

Re: Adding new VMs to a job

Post by abqstu »

Thanks Vladimir. That's just what I was looking for.
veremin
Product Manager
Posts: 20270
Liked: 2252 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Adding new VMs to a job

Post by veremin »

Glad to hear that my input was helpful. Should any additional help be needed, don’t hesitate to let us know. Thanks.
RGrehan83
Novice
Posts: 3
Liked: never
Joined: Aug 08, 2013 12:55 pm
Full Name: Robert Grehan
Contact:

Re: Adding new VMs to a job

Post by RGrehan83 »

Hello,

Apologies for hijacking this thread - I have asked this before (relating to v6.5), but could you please advise if it is possible to automate the adding of new vApps or VMs to an existing backup job? Specifically vApps that are named a certain way (i.e a prefix), to avoid having to manually add them to a job each time.

Thanks,

Robert JG
Vitaliy S.
VP, Product Management
Posts: 27055
Liked: 2710 times
Joined: Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov
Contact:

Re: Adding new VMs to a job

Post by Vitaliy S. »

Hello Robert,

I'm not great in scripting, but I believe you can use hierarchyRoots to get the list of ESXi servers added to the backup console and then leverage lookupSvc to search for the new VMs/vApps (using the prefix you need) in the hierarchy returned in the first step.

Thank you!
sirinech
Influencer
Posts: 23
Liked: 1 time
Joined: Mar 21, 2014 3:06 pm
Full Name: sirine chadly
Contact:

[MERGED] : Add VM to JOB

Post by sirinech »

Hello,
I want to add a new VM to a job, but I don't know how to get the UID of the VM since it has never been added to a job. I tried to use the lookup but it's not working, is there any other way?
PS:
Request:

Code: Select all

http://localhost/api/lookup?host=urn:veeam:HierarchyRoot:b6bf37f7-6eb4-4d96-872e-111f37c67a48&name=test&type=Vm 
Error: 404 Not found (even though the Host and the VM both exist)
sirinech
Influencer
Posts: 23
Liked: 1 time
Joined: Mar 21, 2014 3:06 pm
Full Name: sirine chadly
Contact:

Re: Adding new VMs to a job

Post by sirinech »

Hello, how do I use the lookup request looking for a VM if there's no type VM?
veremin
Product Manager
Posts: 20270
Liked: 2252 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Adding new VMs to a job

Post by veremin »

The corresponding request should contain "Get" expression. Is the b6bf37f7-6eb4-4d96-872e-111f37c67a48 host UID? From my perspective, the right version should be similar to the following:

Code: Select all

GET http://localhost:9399/web/#/api/lookup?host=urn%3aveeam%3aHierarchyRoot%b6bf37f7-6eb4-4d96-872e-111f37c67a48&name=test&type=VM
Thanks.
sirinech
Influencer
Posts: 23
Liked: 1 time
Joined: Mar 21, 2014 3:06 pm
Full Name: sirine chadly
Contact:

Re: Adding new VMs to a job

Post by sirinech »

I did use that request but it didn't work . it says not enough parameters
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests