Upload Documents via API using Postman | Community
Skip to main content
March 2, 2022
Question

Upload Documents via API using Postman

  • March 2, 2022
  • 2 replies
  • 2471 views

Hi,

I am attempting to upload multiple Documents via Postman via the API. Does anyone have any code examples or documentation on how to do this? I've been able to GET project details and even POST New Projects via the Postman but haven't figured out the upload API yet. Any assistance or advice would be greatly appreciated!

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

2 replies

March 8, 2022

To upload via Postman you need to use the form-data option with the key uploadedFile like in the screenshot attached, the Value field will change to Select Files.Hope this helps you out.

NoahWoAuthor
March 8, 2022

Thanks Andy. Is there a way to upload, for example 12 files and associated custom field data for all those 12 files, all within an attachment in the body? I understand you can upload 1 file at a time with your Postman instructions above but is there way to upload X amount of files and their associated custom data all within one file attached in the Body?

March 9, 2022

Hi Noah,

Not that I've found using Postman as it only return a single handle for the upload and not an array 😣 which would be easier to parse.

I had to build a mac desktop application which does exactly this for our company which uploads multiple files, moves files to associated Project/Tasks, adds user time to the task and can attach a custom form to the document, this might be the better way to go if your able to do it or you can do it if you have Workfront Fusion.

If you need to get the handle of the upload in Postman you can use the following, put it under the Tests tab, create an environment variable called handle.

var jsonData = JSON.parse(responseBody);

postman.setEnvironmentVariable("handle", jsonData.data.handle);

I only use Postman for development so I can get my code calls right.

Sorry I couldn't be any more help for you.

March 15, 2022

Hi Noah,

Try adding your updates JSON under the body tab as raw and JSON, disable the updates key under Params, that should work for multiple updates.

NoahWoAuthor
March 17, 2022

Thanks Andy! Changed my HTTP request per your advice and works like a charm now. Appreciate the help.