View

The View action retrieves a single document and returns it in the response of the request.

Type: synchronous

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
Document The identifier of the document to return. 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

http://host:10000/action=View
                       &ConnectorGroup=FileSystem
                       &Document=...

Response

The following XML shows an example response:

<autnresponse>
    <action>VIEW</action>
    <response>SUCCESS</response>
    <responsedata>
        <reference>/opt/files/spreadsheet.xlsx</reference>
        <metadata>
            <FILESIZE>7523</FILESIZE>
            <LASTACCESSED>1568302040</LASTACCESSED>
            <LASTCHANGED>1568299154</LASTCHANGED>
            <LASTMODIFIED>1568299062</LASTMODIFIED>
        </metadata>
        <mime-type>application/octet-stream</mime-type>
        <filename>spreadsheet.xlsx</filename>
        <content>base64_encoded_file_content</content>
    </responsedata>
</autnresponse>

The response includes the following elements:

  • reference provides the document reference.
  • metadata provides the metadata associated with the requested document. This is metadata available directly from the repository, not metadata extracted by KeyView.
  • page elements (zero or more) provide text content, if the repository stores text alongside the document.
  • content provides the file content, base-64 encoded.