Software Development Kit (SDK) and API Discussions

APItest with API "cifs-local-group-members-add-members" getting errors on tag "member-names"

VARONISSYSTEMS

Hi all. 

 

I'm trying to execute APItest with "cifs-local-group-members-add-members" api as following and getting errosr.

When executing this way: 
     APItest <IP> <User> <password> cifs-local-group-members-add-members group-name "<group name>" member-names "<user name>" 

Getting the following error: 

     "For array tag member-names: expected element cifs-name, but found value : <user name>" errno="13115" status="Failed" 

 

When executing that way:

     APItest <IP> <User> <password> cifs-local-group-members-add-members group-name "<group name>" member-names/cifs-name "<user name>" 

Getting this error: 

     "Couldn't find end of Start Tag member-names " errno="13001" status="failed" 

 

1. Can some one direct me how i execute this API?

2. If i use any other APIs that has sub-elements, is there a templete of executing such APIs?

 

 

Thank you.

Alex. 

1 ACCEPTED SOLUTION

asulliva

You might try using the "-i" option to pass the XML for ZAPI directly...

 

apitest <ip> <user> <password> -i "<cifs-local-group-members-add-members><group-name>some_ad_group</group-name><member-names><cifs-name>username_1</cifs-name></member-names></cifs-local-group-members-add-members>"

It's ugly, but should validate the API functionality for you.

 

Andrew

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

View solution in original post

2 REPLIES 2

asulliva

You might try using the "-i" option to pass the XML for ZAPI directly...

 

apitest <ip> <user> <password> -i "<cifs-local-group-members-add-members><group-name>some_ad_group</group-name><member-names><cifs-name>username_1</cifs-name></member-names></cifs-local-group-members-add-members>"

It's ugly, but should validate the API functionality for you.

 

Andrew

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

VARONISSYSTEMS

It works!
- only that you need to put the "-i" after the "apitest.exe"  and before the <IP>

apitest.exe -i <ip> <user> <password> "<cifs-local-group-members-add-members><group-name​>some_ad_group</group-name><member-names><cifs-nam​e>username_1</cifs-name></member-names></cifs-loca​l-group-members-add-members>"

Also, If we need to use quotation marks inside the xml, we should use:  \"
 
Thank you very much!!!
Alex.

 

Announcements
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.

Public