How do you add files to a task using the Home Portal API?

Mike MacKechnie 2 years ago in API updated by Łukasz Kaleta (Senior Customer Success Manager) 2 years ago 2

I'm looking to develop a process where our customer managers can upload 1 to many source files to tasks in an XTRF project, using the Home Portal API - my intention is to write the code to run server-side so that at a push of a button, multiple files can be uploaded.

We have daily project files that we create from a template - that bit's nice and simple; the files come in during the day from our client, and then at about 5 p.m. each evening all the files have to be uploaded to the project. This is currently time-consuming and open to human error.

Has anybody here faced a similar challenge, and if so, what did they do to resolve it?



Technical speaking: you can upload your file with the API (https://simplytranslate.s.xtrf.eu/api/doc/users/pages/files.html), you will retrieve a token. Afterwards you add the file to your project with a simple PUT call for SMART projects (https://simplytranslate.s.xtrf.eu/api/doc/users/pages/v2-projects.html#PUT_/v2/projects/{projectId}/files/add) or a POST call on Task level for CLASSIC projects (https://simplytranslate.s.xtrf.eu/api/doc/users/pages/v1-tasks.html#POST_/tasks/{taskId}/files/input).

If you have a server side application, you can trigger the upload with a scheduler. The only hassle you will now have to deal with is: where do you store your files. Depending on your business requirements I would recommend saving and retrieving the files from an (s)ftp server or cloud storage, you can access those fairly simple from within your server side application.