Open topic with navigation

# Update Documents in a Repository

The following table lists fetch actions that update documents in a repository.

Action | Description | Method to override
--- | --- | ---
`/action=fetch&fetchaction=Delete` | Delete specified documents from the repository. | `Remove`
`/action=fetch&fetchaction=Insert` | Insert a document or documents into a repository. | `Insert`
`/action=fetch&fetchaction=Update` | Update the metadata for specified documents in the repository. | `Update`
`/action=fetch&fetchaction=Hold` | Apply a legal hold to the specified documents in the repository. | `Hold`
`/action=fetch&fetchaction=ReleaseHold` | Remove a legal hold from the specified documents in the repository.

Like the `Collect` fetch action (see Retrieve Documents from a Repository), these actions are passed a collection of `I` `DocInfo` objects, each of which contains an identifier. Like the `Collect` fetch action, `S` `uccess` or `F` `ailed` must be called on each object to indicate whether the document was processed successfully.

The `I` `DocInfo` objects passed to `Delete`, `Hold`, `ReleaseHold` and `Update` contain identifiers of documents that exist in the repository. The `I` `DocInfo` objects passed to `Update` also contain the metadata to set in the repository.

The `I` `DocInfo` objects passed to `Insert` contain document content and metadata, including information about where in the repository the new file should be inserted. This information could be part of the reference, identifier, or metadata. It is up to you to specify what information is required.

If you want to use the `Insert` action to insert documents that contain only metadata, you must override the `GetFeatures` method on `ConnectorBase` to enable insertion of metadata-only documents (this is the only case that this is necessary):

           public override Features GetFeatures()	{
               return base.GetFeatures() | Features.InsertAllowMetadataOnly;
           }

© 2018 Micro Focus or one of its affiliates | Send documentation feedback to Micro Focus Close Send documentation feedback To open the configured email client on this computer, open an email window. Otherwise, copy the information below to a web mail client, and send this email to swpdl.idoldocsfeedback@microfocus.com. We appreciate your feedback! Product: Topic Title: Help Topic: Feedback:

_FT_HTML5_bannerTitle.htm