REST API knowledge exchange
Post Reply
kosov.janko
Influencer
Posts: 18
Liked: 1 time
Joined: Oct 07, 2015 12:58 pm
Contact:

v8 and v9 REST API changes?

Post by kosov.janko »

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?
PTide
Product Manager
Posts: 6551
Liked: 765 times
Joined: May 19, 2015 1:46 pm
Contact:

Re: v8 and v9 REST API changes?

Post by PTide »

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.
kosov.janko
Influencer
Posts: 18
Liked: 1 time
Joined: Oct 07, 2015 12:58 pm
Contact:

Re: v8 and v9 REST API changes?

Post by kosov.janko »

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

Re: v8 and v9 REST API changes?

Post by kosov.janko »

Support case # 01708198.
veremin
Product Manager
Posts: 20406
Liked: 2298 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: v8 and v9 REST API changes?

Post by veremin »

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.
kosov.janko
Influencer
Posts: 18
Liked: 1 time
Joined: Oct 07, 2015 12:58 pm
Contact:

Re: v8 and v9 REST API changes?

Post by kosov.janko »

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.
veremin
Product Manager
Posts: 20406
Liked: 2298 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: v8 and v9 REST API changes?

Post by veremin »

Got it, thank you for taking your time and updating the topic with the found resolution; appreciated. Thanks.
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests