Using DAM Assets In MO Workflows
1. Get the DAM Record ID of a DAM Asset on a Task
- GET: api/tasks/{taskID}/documents
- Check “_embedded” attribute to get all current documents
- Get all objects with category: aprimodam
- GET: /api/digital-assets/{documentIDofAssetsWithAprimodamCategroy}
- “damRecordId” attribute contains DAM ID
2. Add an Aprimo DAM asset to a task configured for a digital asset
- Get the record’s file id (record/[recordid]/files) and DAM record id
- Make POST request to /digital-assets/dam-mapping
{
"damRecordId": "'{1}'",
"assetTypeId": 401,
"damFileId": "'{2}'"
}
- /digital-assets/dam-mapping call returns an “assetid” and “versionid” that are needed later
- Make PUT request to /projects/[projectid]/digital-assets/[assetid] to add the Digital Asset to the project
- Make GET request to /tasks/[taskid]/documents to get the document id
- Make PUT request to /tasks/[taskid]/document-uploads/[documentid]/upload-document to add the Digital Asset to the task
{
"versionId": [versionId]
}
3. Remove an asset from a task
If you have a file already selected for an attachment or an Aprimo DAM document you can use the API to detach
- Make a GET request to /tasks/{taskID}/documents to get the document ID
- Make a GET request to /tasks/{taskID}/document-uploads/{documentID}/uploaded-versions to get the version ID of the document
- Make a DELETE request to /tasks/{taskID}/document-uploads/{documentID}/uploaded-versions/{versionID} to remove the attachment or aprimo DAM asset from the document