Software Development Kit (SDK) and API Discussions

api vserver tunneling


I'm new in API development, and ... development


I have to develop a web portal to do some provisionning in a vserver. 


With zexplore, i succeed to do queries till i'm at cluster level, but when i want to do some within a vserver, it fails.


message is 'Vserver API missing vserver parameter.' errno='13006'


my query is : 

<?xml version="1.0" encoding="UTF-8"?>
<netapp xmlns="" version="1.110">


I guess i need to specify the vserver i want to access to, but how ...


I succeeded to use the to do something, but this is not the way I intend to.



Perhaps i'm on the wrong way, but I would like not  to use third party language like perl, python .., but build on the fly and send xml request directly to the filer


Any help ?





Are you manually creating the XML for ZAPI?  If so, you need to have a vfiler definition in the opening XML tag:


<netapp xmlns="" version="1.110" vfiler="svm_name">

If you're using one of the SDKs, then you need to use the "set_vfiler" method for the language of your choice.  Here is an example using Python:


from NaServer import *

server = NaServer("your.cluster", 1, 110)
server.set_admin_user("username", "password")
server.set_vfiler("svm name")


If you don't *want* to talk directly to ZAPI, then I'd recommend checking out API Services and/or NetApp Service Level Manager.  Both have REST APIs and use JSON.


Hope that helps.




If this post resolved your issue, please help others by selecting ACCEPT AS SOLUTION or adding a KUDO.