Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

Mapping the data for a GET response for a Connect REST rule

Updated on November 23, 2022

Use the Response tab on the Methods tab of the Connect REST form to map the data from the GET response.

  1. In the Headers section, complete the following fields to map data from the HTTP header of the message.
    The data type of a header field is String.
    1. In the Name field, enter the external name of the header field.
    2. In the Description field, enter a short description of the header field.
    3. In the Map to field, specify the destination or the type of destination for the value in Pega Platform:
      • Select Clipboard to map to the page name or property on the clipboard that is specified by the Map to key field.
    4. In the Map to key field, specify the key for locating the property or the rule in the destination that is specified in the Map to field:
      • If you map to Clipboard, enter the property name to which the data is mapped at run time.
  2. In the Message data section, complete the following fields to map the response data from the message:
    1. In the Description field, enter a short description for the incoming string. The data type of the message data is String.
    2. In the Map to field, specify the destination or the type of destination for the value in Pega Platform:
      • Select Clipboard to map to the page name or property on the clipboard that is specified by the Map to key field.
      • Select XML Parse Rule to specify that the incoming data is a stream of XML that must be parsed by using the actions that are defined in a parse XML rule (an instance of the Rule-Parse-XML rule type).
      • Select JSON to specify that the incoming data is a JSON-formatted stream that must be mapped to a Page or a Page List property on the clipboard.
    3. Optional: When you select JSON in the Map from field, the Use fast processing check box is displayed. For complex JSON structures, if the clipboard structure exactly matches the JSON structure, selecting Use fast processing improves processing speed. For this option to work properly, use the following guidelines when configuring your data model:
      • The JSON property names and the clipboard property names must match.
      • The JSON tree structure and the clipboard tree structure must be similar.
      • The scalar arrays in JSON must be mapped to the clipboard as page lists.
      • Multi-dimensional arrays must be mapped into page lists of page lists with the same embedded property names.
      Note: Page groups, value groups, and Java objects are not supported.
    4. In the Map to key field, specify the key for locating the property or the rule in the destination that is specified in the Map to field:
      • If you map to Clipboard, enter the property name to which the data is to be mapped.
      • If you map to XML Parse Rule, enter the Namespace name (second key part) and the Element (third key part) of the appropriate XML Parse rule. Separate the Namespace from the Element name with a space using the syntax "NamespaceName ElementName". The system uses the Applies toclass of this connector rule as the first key part of the parse rule.
      • If you map to JSON, enter the property name to which the data will be mapped. The property should be Page or Page List mode.
  3. If the content-type header of the REST response returned from the REST endpoint indicates that the response message body does not contain text, the system handles the message as an array of bytes rather than as an array of characters. To map an array of bytes, complete the following steps:
    1. In the Message data section, in the Map to field, select Clipboard.
    2. In the Map to key field, enter one of the following values:
    • Text property: The system converts the text property to Base64-encoded text before writing it to the clipboard.
    • Java object property: The system converts the java object property to a java byte array before writing it to the clipboard.
  4. To map the response message content if the content-type header of the REST response returned from the REST endpoint indicates that the response message body is formatted as a multipart message, leave the Map to and Map to key fields in the Message data section blank. Then, complete the steps in Using attachments with REST, SOAP, SAP, dotNet, and HTTP connectors and services.
  • Previous topic Mapping the data for a GET request for a Connect REST rule
  • Next topic Mapping data for a PATCH request for a Connect REST rule

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us