Here is the python code I wound up using:
Code:
import json
import requests
r = requests.post(
'http://hostname/api/v1.0/sharing/cifs/',
auth=('root', 'password),
headers={'Content-Type': 'application/json'},
verify=False,
data=json.dumps({
"cifs_name": "sqldumps-blah",
"cifs_path": "/mnt/tank2/Storage2/SQLDumps/Blah",
"cifs_hostsallow": "",
"cifs_auxsmbconf": "",
"cifs_browsable": "false",
"cifs_comment": "",
"cifs_default_permissions": "true",
"cifs_guestok": "true",
"cifs_guestonly": "true",
"cifs_home": "false",
"cifs_hostsdeny": "ALL",
"cifs_recyclebin": "false",
"cifs_ro": "false",
"cifs_showhiddenfiles": "false",
})
)
print r.text