By Suhas Das
Author
Updating a Documentum File Using IAPI Commands
Managing content in Documentum often requires direct interaction through IAPI commands, especially when performing low‑level operations such as downloading, modifying, and re‑uploading file content. Below is a simple walkthrough demonstrating how to retrieve a file from the repository, update it locally, and then save the changes back to Documentum.
1. Download the Existing File
To begin, identify the r_object_id of the document you want to modify. Once you have it, use the getfile command to download the content to a local directory:
API> getfile,c,xxxxxxxxxxx,d:\temp\xxxxxxxxxxx.txt
This command extracts the content associated with the object ID and writes it to the specified file path on your local machine.
2. Modify the File Locally
After downloading, open the file in your preferred editor and make the necessary updates. Save the file once your changes are complete.
3. Upload the Updated File Back to Documentum
Next, fetch the object into the current client session:
API> fetch,c,xxxxxxxxxxx
OK
Once fetched, use the setfile command to attach the updated local file to the object:
API> setfile,c,xxxxxxxxxxx,d:\temp\xxxxxxxxxxx.txt
OK
Finally, commit the changes to the repository:
API> save,c,l
Summary
This simple sequence—getfile → edit → fetch → setfile → save—provides a direct and efficient way to update content stored in Documentum. It’s especially useful for administrators or developers who need precise control over document versions or automated content updates.