Here is the usage via Postman. A few things are important:
- resourceName is the API Attribute Id of the Object (for Project it is projects and for Idea it is ideas). resourceId is the Instance Id. In the below example, it's one of the Project Id. Resource Type is fixed and it is ODF.
- Similarly, the attributeName is the API Attribute Id of the attachment attribute which you have defined for an Object
- In the Authorization tab, select Auth type as Basic and provide the necessary credentials
- For the file attribute, select the type as File. You will see a select button enabled on the right-hand side so that you can select the required file for upload
- Now you should be good to Click the Send button (The response would be 200 OK). Also check on the Clarity MUX and the file uploaded would be visible.
You can also automate this approach. On the right-hand side of the Postman editor, you can notice the Code button. Click on it and a curl script should be visible:
e.g.: The Base 64 encoded password would be different. You make a list of curl commands in a single file with the input for different resourceId and resourceName and run them as a curl command as well:
--header 'Authorization: Basic YWRtaW46aW50ZXJPUEAxMjM=' \
--form 'resourceId="5082210"' \
--form 'resourceName="projects"' \
--form 'resourceType="ODF"' \
--form 'attributeName="p_multiAttach"' \
--form 'file=@"/C:/Viswanath/Clarity/Test - Copy (4).xml"'