Software Development Kit (SDK) and API Discussions

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


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.



Re: APItest with API "cifs-local-group-members-add-members" getting errors on tag "me


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.



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

View solution in original post

Re: APItest with API "cifs-local-group-members-add-members" getting errors on tag "me


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!!!


Earn Rewards for Your Review!
GPI Review Banner
All Community Forums