Software Development Kit (SDK) and API Discussions
Software Development Kit (SDK) and API Discussions
Hi, I'm running NetApp OnCommand 5.2.0.16233 (5.2) and would like to programmatically access the netapp data using the webservices API. DFM is currently listening on ports 8080, 8088, 8443 and 8488 but I can't seem to get any useful response other than a 404 'Not Found'. I've tried accessing the web services API via apis/soap/v1 and /apis/XMLrequest on the above ports using a combination of http and https and nothing returns anything useful
Does anyone know how this should work? Should I get a response from those URLS and ports or do I need to post data before getting a response?
Thanks
Solved! See The Solution
Hi,
Actually the Endpoint (http://url:8080/apis/XMLrequest) that you have used is wrong. It is used for the usual Zephyr API communication and not for SOAP API.
The correct Endpoints for SOAP are:
for http: http://HOST_NAME:8088/apis/soap/v1
for https: https://HOST_NAME:8488/apis/soap/v1
Please let me know if it worked after modifying the endpoint.
Regards,
Sen.
P.S.: Replace the HOST_NAME with the IP address of the DataFabric Manager server.
Hi,
How are you trying to access the WebServices?
What programming language are you using to invoke the WebServices?
There are some sample codes (under <nmsdk root>/src/sample/DataFabric_Manager/WebServices) which shows how you can invoke WebServices using Apache CXF and .NET. You can also try out some external tools (like soapUI) to test the WebServices without writing any code.
Please let me if you have more questions on this.
Regards,
Sen.
Hi sens, I'm trying to do a simple SOAP request using PHP, the xml I am posting is:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope/" xmlns:na="http://www.netapp.com/management/v1">
<SOAP-ENV:Header/>
<SOAP-ENV:Body>
<na:AggregateListInfoIterStart/>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
The response I get back is:
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE netapp SYSTEM 'http://<ip>:8088/netapp_server.dtd'>
<netapp version='1.0' xmlns='http://www.netapp.com/filer/admin'>
<results reason="No netapp element in API request" errno="13001" status="failed"/></netapp>"
Doesn't work using SOAPUI either:
Status: UNKNOWN
Time Taken: 175
Size: 268
Timestamp: Tue May 13 16:56:44 BST 2014
TestStep: AggregateListInfoIterStart
----------------- Messages ------------------------------
----------------- Properties ------------------------------
Encoding: UTF-8
Password:
Username:
Endpoint: http://url:8080/apis/XMLrequest
---------------- Request ---------------------------
Request Headers: Authorization : Basic dGNveDpEZk0xMlI1QGRPbkx5
Host : url:8080
Content-Length : 1470
SOAPAction : "urn:AggregateListInfoIterStart"
Accept-Encoding : gzip,deflate
User-Agent : Apache-HttpClient/4.1.1 (java 1.5)
Connection : Keep-Alive
Content-Type : text/xml;charset=UTF-8
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v1="http://www.netapp.com/management/v1">
<soapenv:Header/>
<soapenv:Body>
<v1:AggregateListInfoIterStart>
<!--You may enter the following 13 items in any order-->
<!--Optional:-->
<v1:AggregateType>?</v1:AggregateType>
<!--Optional:-->
<v1:BlockType>?</v1:BlockType>
<!--Optional:-->
<v1:IncludeDatasetSpaceInfo>?</v1:IncludeDatasetSpaceInfo>
<!--Optional:-->
<v1:IncludeIsAvailable>?</v1:IncludeIsAvailable>
<!--Optional:-->
<v1:IsDirectMemberOnly>?</v1:IsDirectMemberOnly>
<!--Optional:-->
<v1:IsDpIgnored>?</v1:IsDpIgnored>
<!--Optional:-->
<v1:IsInDataset>?</v1:IsInDataset>
<!--Optional:-->
<v1:IsUnprotected>?</v1:IsUnprotected>
<!--Optional:-->
<v1:ObjectManagementFilter>?</v1:ObjectManagementFilter>
<!--Optional:-->
<v1:ObjectNameOrId>?</v1:ObjectNameOrId>
<!--Optional:-->
<v1:RbacOperation>?</v1:RbacOperation>
<!--Optional:-->
<v1:ResourcepoolFilter>?</v1:ResourcepoolFilter>
<!--Optional:-->
<v1:VolumesToMigrate>
<!--1 or more repetitions:-->
<v1:ObjectNameOrId>?</v1:ObjectNameOrId>
</v1:VolumesToMigrate>
</v1:AggregateListInfoIterStart>
</soapenv:Body>
</soapenv:Envelope>
---------------- Response --------------------------
Response Headers: Date : Tue, 13 May 2014 15:56:44 GMT
#status# : HTTP/1.1 200 OK
Content-Length : 268
Keep-Alive : timeout=60, max=499
Connection : Keep-Alive
Content-Type : text/xml
Server : libzapid-httpd
<!DOCTYPE netapp SYSTEM "http://ip:8088/netapp_server.dtd">
<netapp version="1.0" xmlns="http://www.netapp.com/filer/admin">
<results reason="No netapp element in API request" errno="13001" status="failed"/>
</netapp>
Hi,
Actually the Endpoint (http://url:8080/apis/XMLrequest) that you have used is wrong. It is used for the usual Zephyr API communication and not for SOAP API.
The correct Endpoints for SOAP are:
for http: http://HOST_NAME:8088/apis/soap/v1
for https: https://HOST_NAME:8488/apis/soap/v1
Please let me know if it worked after modifying the endpoint.
Regards,
Sen.
P.S.: Replace the HOST_NAME with the IP address of the DataFabric Manager server.
Works perfectly and in PHP using soapclient - thanks!
I am getting the same exception(No elements in API request) in Java using ONTAP API 8.2.2 and NMSDK 5.3 jar versions.
new ApiRunner(ApiTarget.builder().withHost(host).withUserName(user).withPassword(pwd).withTargetType(TargetType.FILER).useProtocol(protocoll).build());
and protocol is either Protocol.INSECURE_HTTPS (or) Protocol.HTTP
Suggest us in this regard. Thank You.