Reputation: 3
Is it possible when uploading a document to a task using the workfront-api to create a folder and assign the document to that folder. If so is there any guide or documentation on how to do this.
Thanks
Upvotes: 0
Views: 802
Reputation: 757
You would need to create the folder first so that you obtain a folderID to use in the uploading of the document.
Your first call to add the folder would be
POST attask/api/v5.0/docfdr?name=NAME_OF_FOLDER&userID=USER_ID_OF_FOLDER_OWNER
then you would get your document Handle through the upload process
then you would attach the document using the handle with the following call
POST /attask/api/v5.0/document?name=NAME_OF_FILE&handle=HANDLE&docObjCode=USER&objID=OBJECT_ID&folderIDs=FOLDER_ID
Upvotes: 1