Retrieving records by using a LoopBackRequest node
Use a LoopBackRequest node in a message flow to retrieve data records through a LoopBack® connector such as MongoDB, Cloudant®, or PostgreSQL.
Before you begin
About this task
You retrieve records by specifying Retrieve in the Operation property of the LoopBackRequest node. You can retrieve all records of a particular type by specifying the object type in the LoopBack object property of the node. This object type can be overridden by a value specified in the LocalEnvironment.Destination.Loopback.Request.object local environment variable.
Alternatively, you can retrieve a specific record by specifying an ID in the LocalEnvironment.Destination.Loopback.Request.id environment variable. The returned record appears as a JSON object in the location that is specified by the Output data location property of the node.
If an external ID name and value are specified in the LocalEnvironment.Destination.Loopback.Request.externalIdName and LocalEnvironment.Destination.Loopback.Request.externalId environment variables, all records with that external ID are returned. The returned records appear as a JSON array in the location specified by the Output data location property.
- where
- limit
- skip
- order
- field
- ID
- External ID
- Filter
If no records are found, the output tree contains nothing under JSON.data.
If you have configured a model for use with your LoopBack connector, see Using models with LoopBack connectors, for additional information.
Procedure
Follow these steps to retrieve records by using a LoopBackRequest node: