Error "LESS_THAN_MIN_OCCURANCE" when trying to create an external link from an API call

Error "LESS_THAN_MIN_OCCURANCE" when trying to create an external link from an API call

Hello, I am trying to create an external link from an API call in WorkDrive, but I keep getting this error: 

  • {"errors":[{"id":"F000","title":"LESS_THAN_MIN_OCCURANCE"}]}

My code is :


courseMap = Map();
courseMap.put("link_name","sample name");
courseMap.put("resource_id",folderID);
courseMap.put("role_id","34");
courseMap.put("request_user_data","false");
courseMap.put("allow_download","false");
courseMap.put("expiration_date","2022-09-26");

attributesMap = Map();
attributesMap.put("attributes",courseMap);
mp = Map();
mp.put("Accept","application/vnd.api+json");

dataMap = Map();
dataMap.put("data",attributesMap);
dataMap.put("type","links");

createCourseFolder = invokeurl
[
type: POST
parameters: dataMap.toString()
headers: mp
connection: "workdrivelink"
];

info createCourseFolder;


but I cannot find a solution.

Please help!