How to list WorkDrive folder contents using API

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?

  1. string list_files()
  2. {
  3. folderId = "l5imk976734ef17954585a8c564d54b7ad5c4";
  4. // JSON:API-compliant body
  5. bodyJson = "{" + "\"data\":{" + "\"attributes\":{" + "\"parent_id\":\"" + folderId + "\"" + "}" + "}" + "}";
  6. response = invokeurl
  7. [
  8. url :"https://workdrive.zoho.com/api/v1/folders/" + folderId + "/children"
  9. type :POST
  10. body:bodyJson
  11. headers:{"Content-Type":"application/json","Accept":"application/vnd.api+json"}
  12. connection:"myConnection"
  13. ];
  14. info "RAW RESPONSE: " + response;
  15. return response.toString();
  16. }