This will walk you through uploading files to Workfront in Postman. The process will be similar through Curl or custom made application. For reference please see our API documentation for Document Uploads.
- Enter you URL in the URL box and change the HTTP Method to Post
- Click on "Headers" and type "apiKey" into the "key" box on the left. Enter your API Key in the "value" box on the right.
- Click Body once you've finished.
- In the Body section, type "uploadedFile" into the "key" box and change the type to "File" using the dropdown on the right.
- Click "Choose Files" to pick the file you want to upload.
- Choose the file you want to upload to Workfront and click "Open".
- Verify the file you have chosen is the file you want and click the Send button.
- Locate the Response Body at the bottom and verify you've received a handle.
- Copy the handle value to your clipboard for the next step.
- Click the plus icon to make another call
- Add the API URL to the URL box.
- Change the HTTP Method to POST.
- Click Headers and add your API Key as you had in the previous call.
- Click Body, then raw, then change the "text" dropdown to "JSON (application/json)".
- Fill out the json based on the object you are creating the document on. In this example we use a project. You will need to know your object type and it's GUID.
- Paste the handle you copied from the last call into the handle portion.
- Paste your Object GUID into the objID section.
- Enter the file name you would like the document to have in both the "name" and "fileName" areas.
- Click Send.
You should receive a response very similar to the JSON Body you just sent. If the Status says 200 OK then the document has posted. You can then check the object to verify the document has been created.