How to list WorkDrive folder contents using API
I'm trying to read folder contents using a Deluge script. The code below returns {"errors":[{"id":"F6016","title":"URL Rule is not configured"}]}".
I've tried using the search API and seen similar errors. I have proved that the connection works by creating a new folder successfully. What am I missing?
- string list_files()
- {
- folderId = "l5imk976734ef17954585a8c564d54b7ad5c4";
- // JSON:API-compliant body
- bodyJson = "{" + "\"data\":{" + "\"attributes\":{" + "\"parent_id\":\"" + folderId + "\"" + "}" + "}" + "}";
- response = invokeurl
- [
- url :"https://workdrive.zoho.com/api/v1/folders/" + folderId + "/children"
- type :POST
- body:bodyJson
- headers:{"Content-Type":"application/json","Accept":"application/vnd.api+json"}
- connection:"myConnection"
- ];
- info "RAW RESPONSE: " + response;
- return response.toString();
- }