rest-to-list (DEPRECATED)

This feature is deprecated. It was used actively in IM 1.18.x and older. It is kept only for compatibility reasons.

The component can be used as a general solution for getting data from HTTP POST requests. It accepts data in JSON and XML format which can be specified by the contentType parameter. Internally, it uses the json-to-list and xmlExport components. The output data are redirected to the outputUri route. Input data can be received in batches; internal mechanism saves every message in the filesystem cache (specified by cacheFolder) to avoid API overload. From the filesystem messages are read sequentially, transformed and aggregated to batches (batch size is specified by the aggregateThreshold parameter).

The service also expects an authorization token to be present in every incoming request; the expected format is a standard basic authorization (request header token with the name Authorization and value of 'Basic + base64 mime encoded string of partition/username:password'). Before the request is processed further, the credentials are used for authentication to the PFX backend.

Attributes

Description

Required?

Attributes

Description

Required?

id

ID of the component used for the route name.

yes

outputUri

Target route of the PFX component where the results will be sent.

yes

cacheFolder

Directory in the filesystem where the incoming payload is stored before further processing.

yes

httpProtocol

Specifies the protocol: 'https' (default) or 'http'.

no

httpPort

Service port.

yes

httpPath

Path of the listener. Should be unique per httpPort. The expected value is '/hello'.

no

contentType

Posibble values are 'xml' or 'json'.

yes

xsltTemplate

Reference to XSLT template transforming the incoming message. Valid for both JSON and XML.

no

aggregationThreshold

Affects the size of the outcoming batch. Until the threshold is reached or exceeded,
the system will not pass the payload to outputUri.

no

aggregationTimeout

Specifies the maximum time delay to wait until the outgoing payload is flushed, no matter if
aggregationThreshold was reached or not. 

no

authPartition

Restricts the incoming request-specific authorization token to this partition. This prevents
the service user to authenticate against other partition. The usual value is '${pfx.partition}'.

yes

authUri

Specifies the environment against which the incoming auth token is validated. The usual value is '${pfx.uri}'.

yes

 

Example of usage:

<pfx:rest-to-list id="customerRest" cacheFolder="/home/itegration/customerRestCache/" httpPort="8480" httpPath="/customers" outputUri="direct:processCustomers" xsltTemplate="refs/transformations/cust_transformation.xsl" contentType="xml" aggregationThreshold="1000" authPartition="${pfx.partition}" authUri="${pfx.url}"/>

IntegrationManager version 5.8.0