Upload File

Use this API to upload a file (< 64MB) to the OneTrust application.

Additional Information

  • The Id and FileName parameters from this API's response can be used to attach this file to any module within OneTrust.
  • Explanation of the form-data fields:
    • file is the actual file that needs to be upload to the OneTrust application.

    • attachment is an object that has 3 required fields:

      1. The extension of the file in the FileName field needs to be one of the following documented in this myOT article.
      2. Type is a user-specified integer.
      3. RefIds is comma separated list of user-specified UUIDs (e.g. f8c3de3d-1fea-4d7c-a8b0-29f63c4c3454). This needs to be entered as an array.

      Example of the attachment object: {"FileName":"JIRA.png","Type": 645499,"RefIds":["fd650114-3e43-4b71-a7a2-0873dd8aa083","fd650114-3e43-4b71-a7a2-0873dd8aa084"]}

This API cannot be tested within the OneTrust developer portal as the developer Portal does not support uploading files currently. To test this API, refer Run in Postman.

Example Request

POST https://{hostname}/api/document/v1/attachments/v2

POST https://trial.onetrust.com/api/document/v1/attachments/v2