Having problems invoking Workdrive API via ClientScript
I'm having problems creating a folder in Workdrive. The connection is invoked successfully, but I get the following return message:
{"_keyModified":{},"_status":"error","_code":"SUCCESS","_message":"Invoke action failed","_details":{"statusMessage":"Invalid JSON Format String","status":"false"}}
My data is:
var m_data = {"data": {"type": "files","attributes": {"name": ZDK.Page.getField('Auto_Number').getValue(),"parent_id": "t3z6occdaf18179904f77b7ef09444b9aab7f"}}};
if(ZDK.Page.getField('Folder_ID').getValue() == null) {
log(JSON.stringify(createParentFolder));
ZDK.Page.getField('Folder_ID').setValue(createParentFolder.data.id);
}
This is code that's been lifted from another Delue function and I've converted it for Client Script. The API call works fine in Deluge, but not in Client Script. Any advice would be appreciated.