The transition to NetApp MS Azure AD B2C is complete. If you missed the pre-registration, you will be invited to register at next log in.
Please note that access to your NetApp data may take up to 1 hour.
To learn more, read the FAQ and watch the video.
Need assistance? Complete this form and select “Registration Issue” as the Feedback Category.

Software Development Kit (SDK) and API Discussions

Using Java NM API to collect event information


Hi! All,

I am writing a program to collect netapp information. When I try to find a way to collect the event, problem raised.

I would like to list the events from my UI but I cannot found sample codes to it. All I knew is accessing ems command in console, listing the events.

Is there a way to do it in Java using the API? Thanks!




Are you using DATA ONTAP or OnCommand? which version?



Thanks for your reply, I am using netapp-manageability-sdk-4.1 and using ontap simulator 7.3.6.




I dont have a very clear understanding of your question. But if you are looking to invoke an ems event from the Java API, then the API to be used would be ems-invoke.

Sample Code, taken from ZEDI (which can help automatically generate code)  :

public static void main(String[] args) {

                    try {

                              NaServer s = new NaServer("<IP>", 1 , 15);





                              s.setAdminUser("user", "<password>");

                              NaElement api = new NaElement("ems-invoke");



                              NaElement xi = new NaElement("params");






                              NaElement xo = s.invokeElem(api);


                    } catch (NaException e) {


                    } catch (UnknownHostException e) {


                    } catch (IOException e) {



Let me know your query more descriptively incase I'm off track.



Thanks for your reply again. I have moved the sdk to version 5.0 and API to 8.1 (using manageontap-5.0.jar and ontap-api-8.1.jar).

I think the content I want to collect like this, just not know the API can do this or not and how.

netappsim> ems event status

Event:Priority                           Last Time       Indications  Drops        DupSuppr     TimerSuppr   AutoSuppr  

api.input.invalidSchema:WARN             21Nov2012 17:12:26      6            0            0            0            0                   21Nov2012 16:50:50      1            0            0            0            0          

cifs.startup.stats:INFO                  21Nov2012 16:50:50      1            0            0            0            0  



Also if you're working with events, OnCommand is a great NetApp Manageability product that can help you. It will help you automate your management tasks.


Thanks for the link, I am going to read through it.


Do you have a cluster mode setup or 7-mode?


I think I haven't setup cluster or 7-mode. What can I do if not using those setup to get the event information?


Your setup would be running as 7-mode or cluster-mode. NMSDK APIs are different for each of these modes running on the filer or simulator that you have.


If its Cluster Mode then the API you are looking for is "ems-status-get".

NetApp on Discord Image

We're on Discord, are you?

Live Chat, Watch Parties, and More!

Explore Banner

Meet Explore, NetApp’s digital sales platform

Engage digitally throughout the sales process, from product discovery to configuration, and handle all your post-purchase needs.

NetApp Insights to Action
I2A Banner