Hello,
I am new to the REST API world. I am looking for uploading multiple files in Content server along with the meta data information. We have meta data csv for that. Is there any sample code or guidelines available for doing this using REST API?
If there are Accepted Answers, those will be shown by default. You can switch to 'All Replies' by selecting the tab below.
Hello, you can certainly handle everything with the APIs, but I suggest a much quicker alternative to implement.
I did it in about half an hour.
If you have the Module Suite, this would only require a few lines of code. You could create a Content Script that retrieves the files, uploads them to the content server using the Module Suite docman service, searches for the metadata in the CSV, and updates the category.
I assumed that both the CSV and the folder with the files to be uploaded are on the same server, and that I can use the file name to uniquely identify the files and search for them in the CSV.
Below you can find the script:
Additional notes: - The target files, including metadata.csv are located in the C:\Remote Files\ folder. - Using a category file Demo located in the script folder. - If successful, the uploaded files will be in the Files folder located in the script folder
metadata.csv
C:\Remote Files\
Demo
Files
I hope this was helpful.
You can create the code in any language you are comfortable with and then use that to call the appropriate REST APIs to setup the structure - such as folders, metadata etc - and then add the docs in processing.
For information, cross posted in