veeam provide api to enterprise manger or to b&r ?

RESTful knowledge exchange

veeam provide api to enterprise manger or to b&r ?

Veeam Logoby SmithJohn » Sat Aug 31, 2013 12:20 pm

Hi,

I would like to ask 2 questions:
1) would veeam 7 provide restful api to the veeam B&R or only to the enterprise manger
2)if it only provide api to enterprise manger, would it able to support all the functions include 1)create job 2) start backup 3)restore
SmithJohn
Enthusiast
 
Posts: 47
Liked: never
Joined: Thu Jan 31, 2013 3:36 am
Full Name: charles

Re: veeam provide api to enterprise manger or to b&r ?

Veeam Logoby tsightler » Sat Aug 31, 2013 4:59 pm

The RESTful API in V7 is layered on top of Enterprise Manager and exposes all functions of EM. You can create jobs by using the "Clone Job" function with the general idea being to create a master template job that you can clone and then edit the VMs included, VSS/Indexing options, etc. Full VM restore and FLR of indexed Windows guests is available via the API just like EM.
tsightler
Veeam Software
 
Posts: 4768
Liked: 1737 times
Joined: Fri Jun 05, 2009 12:57 pm
Full Name: Tom Sightler

Re: veeam provide api to enterprise manger or to b&r ?

Veeam Logoby v.Eremin » Mon Sep 02, 2013 8:10 am

More information regarding RESTFul API can be found in the corresponding User Guide; so, kindly take a look. Thanks.
v.Eremin
Veeam Software
 
Posts: 13266
Liked: 968 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: veeam provide api to enterprise manger or to b&r ?

Veeam Logoby SmithJohn » Thu Sep 19, 2013 9:35 am

As mentioned, I am developing a backup and restore portal by the API
I would like to know the VM ID in the backup guide is the UUID from VMware?
Could the schedule backup be set in the "edit" option ?

For restore, is the below api enough ?
(POST) /vmRestorePoints/{ID}?action=restore (Ref. P.184)
SmithJohn
Enthusiast
 
Posts: 47
Liked: never
Joined: Thu Jan 31, 2013 3:36 am
Full Name: charles

Re: veeam provide api to enterprise manger or to b&r ?

Veeam Logoby Vitaliy S. » Thu Sep 19, 2013 10:53 am

Hi Charles,

SmithJohn wrote:I would like to know the VM ID in the backup guide is the UUID from VMware?

For object identification we are using IDs from HierrchyObjRef. See page 329 of the UG for more details.
SmithJohn wrote:Could the schedule backup be set in the "edit" option ?

Yes, you can set the desired scheduling options using PUT command.
SmithJohn wrote:For restore, is the below api enough ?
(POST) /vmRestorePoints/{ID}?action=restore (Ref. P.184)

The User Guide provides basic information on the restore procedure, to see full specification of the VM restore operation, please take a look at RestAPI.xsd. You can find the XSD file in the installation folder for Veeam Backup Enterprise Manager:
Code: Select all
%Program Files%\Veeam\Backup and Replication\Enterprise Manager\schemas\RestAPI.xsd.

Hope this helps!
Vitaliy S.
Veeam Software
 
Posts: 19558
Liked: 1102 times
Joined: Mon Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov

Re: veeam provide api to enterprise manger or to b&r ?

Veeam Logoby SmithJohn » Mon Sep 23, 2013 4:19 am

sorry. I still don't understand how to get the job ID and the vm ID.
and could I use the following command (POST) /jobs/{ID}?action=edit (Ref. P.92) for edit job and its schedule.
SmithJohn
Enthusiast
 
Posts: 47
Liked: never
Joined: Thu Jan 31, 2013 3:36 am
Full Name: charles

Re: veeam provide api to enterprise manger or to b&r ?

Veeam Logoby v.Eremin » Mon Sep 23, 2013 9:16 am

Hi, Charles.

and the vm ID.

I believe, you should utilize the /lookupSvc in order to get a reference to an object in the Virtual infrastructure. The resulting reference, gotten via /lookupSvc, will contain a virtual machine identifier: be it MorefID in case of VMware environment, or VM ID in case of Hyper-V one.

You can use the example given at page 300, changing variables (VM names, host ID) in accordance with your environment.

job ID

If you want to list all jobs created on backup server that are managed by a given Enterprise Manager, you will have to send the following HTTP request (p.80):

Code: Select all
GET http://<Enterprise-Manager>:9399/api/jobs


Among other listed parameters you will see the job UID.

Thanks.
v.Eremin
Veeam Software
 
Posts: 13266
Liked: 968 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: veeam provide api to enterprise manger or to b&r ?

Veeam Logoby SmithJohn » Tue Sep 24, 2013 2:12 am

Thanks. Now I could get the job ID through the api.
But I still need to use api to edit the job ( as to change the VM to be backup). May I know what would be the VM id( which is the VM found in vCenter). Could I use the UUID from VMware?
SmithJohn
Enthusiast
 
Posts: 47
Liked: never
Joined: Thu Jan 31, 2013 3:36 am
Full Name: charles

Re: veeam provide api to enterprise manger or to b&r ?

Veeam Logoby v.Eremin » Tue Sep 24, 2013 6:26 am

As far as I know, VM id in case of VMware environment is represented by VM MorefID. Though, to be on the safe side I’d recommend running /lookupSvc call in order to get VM reference that contains the VM ID. Thanks.
v.Eremin
Veeam Software
 
Posts: 13266
Liked: 968 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: veeam provide api to enterprise manger or to b&r ?

Veeam Logoby abqstu » Mon Sep 30, 2013 10:31 am

tsightler wrote:You can create jobs by using the "Clone Job" function with the general idea being to create a master template job that you can clone and then edit the VMs included

Is a template job different to a normal job ? If so, how do you create one ?
I'd like to create a template with no VMs added to it, but the Backup & Replication GUI won't allow me to create a job with no VMs.
abqstu
Influencer
 
Posts: 11
Liked: never
Joined: Tue Aug 27, 2013 11:37 am

Re: veeam provide api to enterprise manger or to b&r ?

Veeam Logoby Vitaliy S. » Mon Sep 30, 2013 10:46 am

Cloned job has the same configuration and VMs added, but by default this job is disabled.
abqstu wrote:I'd like to create a template with no VMs added to it, but the Backup & Replication GUI won't allow me to create a job with no VMs.

Yes, that's expected. Any job should have at least one VM added, so please create any temp VM and add it to the job to create a master job template.
Vitaliy S.
Veeam Software
 
Posts: 19558
Liked: 1102 times
Joined: Mon Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov

Re: veeam provide api to enterprise manger or to b&r ?

Veeam Logoby tsightler » Mon Sep 30, 2013 1:54 pm

A job only needs a single object, so I usually suggest simply creating an empty folder and including that in the job. Then when you create new jobs from this you can always delete the folder once additional backup objects have been added.
tsightler
Veeam Software
 
Posts: 4768
Liked: 1737 times
Joined: Fri Jun 05, 2009 12:57 pm
Full Name: Tom Sightler


Return to RESTful API



Who is online

Users browsing this forum: No registered users and 3 guests