v1

latestOpenAPI 3.1.0Apache 2.02026-07-245981,1853.0 MB
Attachments

Upload File

Use this API to upload a file up to 64MB to the OneTrust Platform. The response will include the Id and FileName parameters, which can be used to attach the file to a product within the platform.

🗒 Things to Know

  • The extension of the uploaded file must be in one of the supported file formats. For more information, see Using the Document Repository.
  • The attachment parameter below includes the following information:
    • Parameters & Descriptions contains details on the list of parameters and expected parameter values. This should be used for reference only.
    • Attachment JSON Object contains the required format in which the parameters and parameter values must be sent in the request.
post/api/document/v2/attachments

Response

OK

Idstring uuid

The unique identifier of the uploaded file.

Namestring

The display name of the file.

FileNamestring

The name of the file, including its extension.

Commentsstring

The notes about the file.

FileSizeinteger

The size of the file in bytes.

FileType'pdf' | 'doc' | 'docx' | 'txt' | 'png' | 'jpg' | 'jpeg' | 'csv'

The type of file, based on its extension.

CreatedByIdstring uuid

The unique identifier of the user who uploaded the file.

CreatedBystring

The name of the user who uploaded the file.

CreatedDTstring date-time

The date and time when the file was uploaded.

Typeinteger

The number associated with the content type of the file, as listed within Show Details.

RefIdstring uuid

The unique identifier of the record associated with the attached file.

IsInternalboolean

This flag indicates whether the file is marked for internal use.

Example response

{
  "Id": "123e4567-e89b-12d3-a456-426614174000",
  "Name": "Important Document",
  "FileName": "document.pdf",
  "Comments": "This is a confidential document",
  "FileSize": 1048576,
  "FileType": "pdf",
  "CreatedById": "123e4567-e89b-12d3-a456-426614174000",
  "CreatedBy": "John Doe",
  "CreatedDT": "2024-03-20T10:30:00",
  "RefId": "123e4567-e89b-12d3-a456-426614174000",
  "IsInternal": true
}