api code version

Post Reply
PhilB
Senior
Posts: 224
Joined: Sun May 11, 2014 6:23 pm
Great Britain

api code version

Post by PhilB » Fri Apr 17, 2015 7:35 am

I see that remove recorded is deprecated in favour of delete recording as from version 2.1 of the api code and there is a further change at version 6.
How can a program determine which version is in use in order to issue the right call?
Can it be determined from (myth) <version> or <Protover>
Regards
Phil

User avatar
stuartm
Developer
Posts: 125
Joined: Wed Feb 05, 2014 5:17 pm
Great Britain

Re: api code version

Post by stuartm » Fri Apr 17, 2015 8:32 am

The version information is present in the xsdl for each endpoint, although I've just noticed that it could be made more machine readable.

PhilB
Senior
Posts: 224
Joined: Sun May 11, 2014 6:23 pm
Great Britain

Re: api code version

Post by PhilB » Sat Apr 18, 2015 5:09 am

Sorry Stuart, would you expand on that please?
Do you mean the first line of an api call eg to get channel list?

<ChannelInfoList xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0" serializerVersion="1.1">

Is my version 1.1?
Thanks
Phil

User avatar
stuartm
Developer
Posts: 125
Joined: Wed Feb 05, 2014 5:17 pm
Great Britain

Re: api code version

Post by stuartm » Sat Apr 18, 2015 9:36 am

No, I mean http://{backend_ip}:6544/Dvr/wsdl http://{backend_ip}:6544/Guide/wsdl etc

User avatar
stuartm
Developer
Posts: 125
Joined: Wed Feb 05, 2014 5:17 pm
Great Britain

Re: api code version

Post by stuartm » Sat Apr 18, 2015 10:53 am

If you look at the raw xml (/Dvr/wsdl?raw=1), down the bottom you have the following:

Code: Select all

<service name="DvrServices">
<documentation>Interface Version 6.1 -</documentation>
<port name="BasicHttpBinding_Dvr" binding="tns:BasicHttpBinding_Dvr">
<soap:address location="http://192.168.159.2:6544/Dvr"/>
</port>
</service>
The "Interface Version" is the number you are looking for.

PhilB
Senior
Posts: 224
Joined: Sun May 11, 2014 6:23 pm
Great Britain

Re: api code version

Post by PhilB » Sat Apr 18, 2015 2:04 pm

That's great. Thanks for the prompt reply.
I see that the page also lists available api calls.
Phil

Post Reply