Skip to main content

File Upload Overview

To add versions to Attachments or renditions to Digital Assets in Aprimo, follow these steps:

  1. Upload the file using file upload routes.
  2. Use the file's unique identifier and name to create digital asset renditions or attachment versions.

Uploading Files

Endpoints

  • Digital Assets:
    /api/chunk/upload and /api/chunk/complete
  • Attachments:
    /api/chunk/upload/attachment and /api/chunk/complete/attachment

Chunking (Optional)

  • Recommended for large files (max upload size per call: 20MB).
  • Steps:
    1. Split the file into chunks.
    2. Upload chunks to the server.
    3. Compile chunks using POST api/chunk/complete.

Uploading File Chunks

Parameters

  • resumableFilename: Name of the file.
  • resumableChunkNumber: Order of the chunk (starting at 1).
  • resumableIdentifier: A unique GUID for the upload.
  • file: The file chunk content.

Steps

  1. Generate a GUID for resumableIdentifier.
  2. For each chunk:
    • Check if the chunk exists:
      Call GET api/chunk/upload (or /attachment for attachments).
      • 200 OK: Chunk already exists.
      • 404: Chunk does not exist.
    • Upload the chunk:
      Call POST api/chunk/upload with the required parameters and chunk content.
      • 200 OK: Chunk uploaded successfully.
  3. Repeat until all chunks are uploaded.

Combining File Chunks

  • Call POST api/chunk/complete (or /attachment for attachments).
  • Pass the following JSON body:
  {
"FileId": "yourGeneratedGuid",
"FileName": "yourFilename"
}
  • Ensure FileName matches resumableFilename and FileId matches resumableIdentifier.
tip

Uploaded files are available for 8 hours. After associating with an attachment version or digital asset rendition, files are permanently stored.


Creating New Versions or Renditions

  • Example: New Attachment Version
{
"isDefaultVersion": true,
"attachmentId": 1101,
"FileId": "c4669d54-4335-4d77-acca-67ed4d3142ff",
"FileName": "SampleFileChunk.txt",
"versionComments": "Original Version",
"versionType": 3
}
  • Example: Internet File Version
    • Use the route /api/attachments/{{attachmentID}}/versions and this JSON body:
    {
    "isDefaultVersion": true,
    "attachmentId": 1101,
    "filename": "myNewFile",
    "downloadUri": "http://www.downloadLink.com",
    "thumbnailStatus": 3,
    "versionType": 1,
    "annotationFileType": 0,
    "versionComments": "New Internet File version via API",
    "sendNotification": 0,
    "versionUrl": "http://www.downloadLink.com",
    "fileID": "0c62463e-6730-45d0-8701-e2ad273b52b7"
    }

Retrieving Attachments

  • Get the attachment and version IDs.
  • Call: GET https://{domain}.aprimo.com/api/attachments/{attachmentId}/versions/{versionId}
    • The response includes a downloadUri attribute.
  • Use downloadUri to retrieve the file:
    • Open in a browser with an active session, or
    • Perform a GET request with your authorization token.