I am having a problem downloading documents from Workfront through the API. I am able to get the downloadURL and this download URL works when I'm logged in through my browser. However, when I try to use the URL in Powershell, it is not working.
I am running this command:
$downloadResponse = Curl -Uri $url -Header $header -Body $body -OutFile $downloadPath
I am providing an apiKey (I've tried in both $body and $header) in the CURL command in Powershell.
The $url variable contains something like this:
https://<mycompany>.my.workfront.com/internal/document/download?ID=abc123456def123456
I am getting the file, with the proper name, in the proper location. But, the file that is downloading is a 4k file (should be much larger), starting with this:
Topics help categorize Community content and increase your ability to discover relevant content.
Hi, were you able to resolve this issue ? I am encountering similar issue, can you help me with the solutoin?
Views
Replies
Total Likes
You will need to use a sessionID as downloading using apikey's has been removed.
Once you have your sessionID you can then obtain the Documents name and downloadURL and use them in your CURL command like this:
curl -L -H 'sessionID:<SESSION_ID>' -o <DOWNLOAD_PATH>/<FILENAME>.<EXTENSION> "https://<INSTANCE_NAME>.my.workfront.com/<DOWNLOAD_URL>"To get your sessionID you can use the following api call:
https://<INSTANCE_NAME>.my.workfront.com/attask/api/sessionRemember to provide you apikey in the header for the above call.
Hope this helps both of you if you havn't already sorted it.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Like
Replies