Upload An Attachment in Zoho Projects Task - API

Upload An Attachment in Zoho Projects Task - API

Hello Team

I am trying to upload an Attachment in Zoho Projects Task by the API but this is not working can you please check the code that I am missing in this?

Sample Code
  1. PortalID = "725833080";
  2. ProjectID = "1688514000000448005";
  3. TaskID = "1688514000000558005";
  4. getrcords = invokeurl
  5. [
  6. url :"http://insight.dev.schoolwires.com/HelpAssets/C2Assets/C2Files/C2ImportCalEventSample.csv"
  7. type :GET
  8. ];
  9. getrcords.setParamName("file");
  10. paramap = Map();
  11. paramap.put("uploaddoc",getrcords);
  12. hearmap = Map();
  13. hearmap.put("Content Type","application/json");
  14. ProjectDetails = invokeurl
  15. [
  16. url :"https://projectsapi.zoho.com/restapi/portal/" + PortalID + "/projects/" + ProjectID + "/tasks/" + TaskID + "/attachments/"
  17. type :POST
  18. parameters:getrcords.toString()
  19. connection:"zohoprojects"
  20. ];
  21. info ProjectDetails;
Team, please check what is the issue with the API.

Response:{"thirdparty_attachments":[],"TASK_DOCS":[]}

Apart from this if there is anything required from my side please let me know, I will feel Happy to help you.

Thanks & Regards
Piyush Goyal