Tech Tip | Upload & Download File | Web Services

Often there is a need to upload or download a file from the platform to support an external process or perhaps, a custom widget.  The primary mechanism for achieving this goal is to use the public REST web services provided by the platform.  However, it is often not clear how to coordinate the multi step process required for both the upload and download of a file.  Hopefully, this post will help demystify this process down to its core steps along with providing a Postman example to walk you through the process.

For this example, the Document web services will be demonstrated, but the core principles can be applied to any of the other domain web services.  Refer to each domain's documentation for slight variations in expected URI and parameters.

Document Web Service documentation
https://media.3ds.com/support/documentation/developer/R2021x/en/DSDoc.htm?show=CAADocQuickRefs/DSDocHome.htm​​​​​​​

Upload File (Create Document)

  • Get Checkin Ticket from FCS
    • Retrieve ticket, ticketURL, and ENO_CSRF_TOKEN header value
  • Post File to FCS using ticket
    • Post file to ticketURL using ticket and full path to filename as form-data
  • Create Document and Checkin File
    • Create document object referencing FCS receipt received previously when posting to FCS

Download File

  • Get Download Ticket from FCS
    • Retrieve ticketURL, filename, and ENO_CSRF_TOKEN header value
  • Download File
    • Download file using ticketURL

Below is a video demonstrating each of these processes.  The Postman example demonstrated in the video is also available.  For further information on Postman and how to use the provided example please refer to this related post.

 

​​​​​​​

Tips_and_Tricks ​​​​​​​