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
Request
- Base URLhttps://hostname
- URLhttps://hostname/api/document/v2/attachments
- AuthOAuth 2Client credentialsToken URL: https://{hostname}/api/access/v1/oauth/token scopes: ATTACHMENT, ATTACHMENT_WRITE
Request body multipart/form-data
Example request
{
"attachment": {
"FileName": "document.pdf",
"Name": "Important Document",
"Comments": "This is a confidential document",
"IsInternal": true,
"Encrypt": true
}
}Response
OK
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
}Changes
No recorded changes to this operation across all 1 revision of this API.