webMethods CloudStreams 10.4 | webMethods CloudStreams | Administering webMethods CloudStreams | Cloud Connections, Services, and Connector Listeners | REST Parameters | Parameter Data Types | Record
 
Record
Record data type handles complex parameters involving a collection of related key-value pairs. These parameters can have indices's for one or more parameter entry. Such parameters can ideally be represented with an IS document type, and configured as a "Record" data type.
Example
Consider a complex parameter structure as follows:
+ Filter[]
- Name
+ Value[]
This needs to be represented as a query string like:
Filter.1.Name=instance-type&Filter.1.Value.1=m1.small&Filter.1.Value.2=t1.micro
Such a parameter can be defined by creating an IS document type, and referring it as a "Record" data type parameter within the resource definition.
CloudStreams provides the capability to represent and transform such complex parameters into the desired format using its predefined formatter implementation. The resource's parameter definition can be enhanced to refer to a formatter, as follows:
<parameter name=”Filter” dataType=”Record”
documentRef=”documents.paramType:FilterList”
style=”QUERYSTRING_PARAM”>
<formatter service=”wm.cloudstreams.service.util.formatters:paramFormatter”
type=”paramFormatter”/>
</parameter>
At runtime, the resource PATH would look like:
GET /?Filter.1.Name=instance-type&Filter.1.Value.1=m1.small&Filter.1.Value.2=t1.micro
For more details on formatters and customizing the formatter behavior, see Parameter Formatters for REST Connector Services.

Copyright © 2013- 2019 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.
Innovation Release