NiFi Ingest 12.13

# Update

The `Update` action updates the metadata of one or more items in a repository.

Type: asynchronous

Parameter | Description | Required
--- | --- | ---
`ConnectorGroup` | The name of the connector group to send the request to. This must match the name you specified when you configured the ConnectorGroupRouter processor in your dataflow. | Yes
`Documents` | XML that specifies the documents to update, and the new metadata.
    <documents custom_attribute1="...">
        <document custom_attribute2="...">
            <CONNECTOR_GROUP>FileSystem</CONNECTOR_GROUP>
            <AUTN_IDENTIFIER>BASE64</AUTN_IDENTIFIER>
            <LASTMODIFIED>1262304001</LASTMODIFIED>
        </document>
        ...
    </documents>
The `CONNECTOR_GROUP` element specifies the name of the connector group to send the request to. This overrides the value of the `ConnectorGroup` action parameter for a specific document. If you specify the connector group for every document, you no longer need to set the action parameter. If present in the XML, the `CONNECTOR_GROUP` element must be the first element within the `document` element. The `AUTN_IDENTIFIER` element specifies the IDOL document identifier of the item to update. The `LASTMODIFIED` element is example metadata that you could change using a File System Connector. This changes the last modified date of the file in the file system. The metadata that you can update depends on the connector and repository that you are using. In NiFi Ingest, actions are represented by FlowFiles. You can specify custom attributes on the `documents` element (for all documents) or on a `document` element (for a single document). These are added to FlowFiles that represent actions, as FlowFile attributes. The FlowFile attributes are named `idol.doc.name`, for example `idol.doc.custom_attribute1`. Some connectors can update the Access Control List (ACL) of an item in the repository. To construct XML that updates an ACL, add an `update` element with the attribute `update_type="acl"`, and then specify the ACL changes as described in the connector documentation. For example:
    <documents>
        <document>
            <CONNECTOR_GROUP>FileSystem</CONNECTOR_GROUP>
            <AUTN_IDENTIFIER>BASE64</AUTN_IDENTIFIER>
            <LASTMODIFIED>1594800654</LASTMODIFIED>
            <update update_type="acl">
                <enable_inheritance revert_acl="true"/>
            </update>
        </document>
    </documents>
| Yes
Custom parameters | Any other parameters that you set are added to the FlowFile, created by the HandleAciRequest processor, that represents the action. When a connector processes the action, it adds the parameters to any FlowFiles that it generates. The parameters are added as FlowFile attributes named `idol.aci.param.name`, where `name` is the name of the parameter that you set. FlowFile attributes can be referenced by processor properties that support expression language, and can be read by Lua scripts. You can therefore set custom parameters to customize processing within NiFi. The maximum size for a custom parameter value is 4KB. | No

## Example

The following example demonstrates how to update the metadata of a file in a file system.

    http://host:10000/action=Update&Documents=...

The value of the `Documents` parameter could be the following XML, but URL-encoded and with an IDOL document identifier in place of the `BASE64` placeholder. This example updates the file's last modified time:

    <documents>
        <document>
            <CONNECTOR_GROUP>FileSystem</CONNECTOR_GROUP>
            <AUTN_IDENTIFIER>BASE64</AUTN_IDENTIFIER>
            <LASTMODIFIED>1262304001</LASTMODIFIED>
        </document>
    </documents>

## Response

This is an asynchronous action, so you receive a token in response to the request. You can obtain the status of the request through the QueueInfo action.

© Copyright 2018-2022 Micro Focus or one of its affiliates
Version 12.13 | Last updated October 2022

Send documentation feedback

Close

Send documentation feedback

To send feedback using your default email client, open an email window.

Otherwise, send your feedback and the information below to swpdl.idoldocsfeedback@microfocus.com.

We appreciate your feedback!

Product: IDOL NiFi Ingest 12.13

Topic Title: Update