This post is more than 5 years old
7 Posts
0
1927
February 11th, 2019 17:00
Optional parameter not working in a REST API call
Hi experts,
I am using Python script to create a SMB/CIFS service for a NAS server. The passing parameters below with "organizationalUnit" look not accepted by Unity,
data = {"nasServer":{"id":"nas_34"},"netBiosName":"test_nas","name":"test_nas","domain":"mydomain.win","organizationalUnit":"cn=org,cn=Storage","domainUsername":"test","domainPassword":"test"}
The response follows,
status_code= 422
Content = b'{"error":{"errorCode":131149877,"httpStatusCode":422,"messages":[{"en-US":"Req
uest body is not correct. There may be duplicate parameters, wrong parameter nam
e. Please refer to API documentation page and ensure the body is correct. (Error
Code:0x7d13035)"}],"created":"2019-02-12T00:34:17.715Z"}}'
It works after the field of "organizationalUnit" was removed.
data = {"nasServer":{"id":"nas_34"},"netBiosName":"test_nas","name":"test_nas","domain":"mydomain.win","domainUsername":"test","domainPassword":"test"}
Any suggestions? Many thanks.



Brian119
7 Posts
0
February 11th, 2019 18:00
netBiosName should be netbiosName. All field names are case-sensitive! :Geeked:
Rainer_EMC
4 Operator
•
8.6K Posts
0
March 4th, 2019 08:00
did that solve your problem?