v8 and v9 REST API changes?

RESTful knowledge exchange

v8 and v9 REST API changes?

Veeam Logoby kosov.janko » Tue Feb 23, 2016 4:46 pm

Hello all,

I’ve been successfully using v8 REST API. After the upgrade of EM I’m trying to use v9 API.

Has there been changes from v8 to v9 for this particular call: (POST) /jobs/{ID}/includes: https://helpcenter.veeam.com/backup/res ... ludes.html ?

Below is my request, which worked for v8.

•POST:/jobs/2969abe3-f684-4b5b-859d-0002755068da/includes

Code: Select all
<CreateObjectInJobSpec xmlns="http://www.veeam.com/ent/v1.0">
  <HierarchyObjRef>urn:VMware:Vm:c2d7cab5-7187-4d69-b772-891c3391a29a.vm-1381</HierarchyObjRef>
  <HierarchyObjName>VM1</HierarchyObjName>
</CreateObjectInJobSpec>


Checking the task status it fails with below error:

•GET:/tasks/task-9

Code: Select all
<Task Type="Task" Href="https://veeam-em:9398/api/tasks/task-9" xmlns="http://www.veeam.com/ent/v1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Links>
    <Link Href="https://veeam-em:9398/api/tasks/task-9" Type="Task" Rel="Delete"/>
  </Links>
  <TaskId>task-9</TaskId>
  <State>Finished</State>
  <Operation>UpdateJob</Operation>
  <Result Success="false">
    <Message>Object reference not set to an instance of an object.</Message>                                <<< ERROR?
  </Result>
</Task>


I do not see anything being changed in the documentation – according to the documentation I’m still sending a valid request call/content.

Where else and what else can I check to further troubleshoot this issue?
kosov.janko
Novice
 
Posts: 8
Liked: 1 time
Joined: Wed Oct 07, 2015 12:58 pm

Re: v8 and v9 REST API changes?

Veeam Logoby PTide » Tue Feb 23, 2016 4:55 pm

Hi,

Please provide your support case ID number, if you want to keep this thread open, as it is requested if post about errors/technical issues (right when you click New Topic).

Thanks.
PTide
Veeam Software
 
Posts: 3019
Liked: 246 times
Joined: Tue May 19, 2015 1:46 pm

Re: v8 and v9 REST API changes?

Veeam Logoby kosov.janko » Wed Feb 24, 2016 7:41 am

Oh... sorry I missed that requirement. I'll open a case and let you know the case #.
kosov.janko
Novice
 
Posts: 8
Liked: 1 time
Joined: Wed Oct 07, 2015 12:58 pm

Re: v8 and v9 REST API changes?

Veeam Logoby kosov.janko » Wed Feb 24, 2016 10:42 am

Support case # 01708198.
kosov.janko
Novice
 
Posts: 8
Liked: 1 time
Joined: Wed Oct 07, 2015 12:58 pm

Re: v8 and v9 REST API changes?

Veeam Logoby v.Eremin » Wed Feb 24, 2016 1:59 pm

Just checked on my v9 installation and the said query seems to be working properly. So, keep working with our support team on addressing that.

By the way are you authenticating the latest version (v1_2) of logon session manager?

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

Re: v8 and v9 REST API changes?

Veeam Logoby kosov.janko » Thu Feb 25, 2016 11:06 am

I've received the answer from Veeam Doc team regarding the issue:

We have contacted our QA team and they say the GuestProcessingOptions element is obligatory in v9. This is reflected now in the element description, in the Min/Max Occurrence column:
https://helpcenter.veeam.com/backup/res ... ludes.html

You can use the following request so that the task completes successfully:

<?xml version="1.0" encoding="utf-8"?>
<CreateObjectInJobSpec xmlns="http://www.veeam.com/ent/v1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<HierarchyObjRef>urn:VMware:%5BObjectType%5D:00000000-0000-0000-0000-000000000000.%5BObjectRef%5D</HierarchyObjRef>
<HierarchyObjName>[ObjectName]</HierarchyObjName>
<GuestProcessingOptions/>
</CreateObjectInJobSpec>

Thank you,
Veeam Documentation Team


After updating this parameter, request was successful.
kosov.janko
Novice
 
Posts: 8
Liked: 1 time
Joined: Wed Oct 07, 2015 12:58 pm

Re: v8 and v9 REST API changes?

Veeam Logoby v.Eremin » Thu Feb 25, 2016 11:40 am

Got it, thank you for taking your time and updating the topic with the found resolution; appreciated. Thanks.
v.Eremin
Veeam Software
 
Posts: 13266
Liked: 968 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin


Return to RESTful API



Who is online

Users browsing this forum: No registered users and 2 guests