Datapreview

Use this resource to preview data during mapping design. By default, the response returns up to ten rows of data for the specified object.

GET Request

To request preview data, specify the connection ID or connection name and the object name in one of the following URIs:
To request source data, use one of the following URIs

/api/v2/connection/source/<id>/datapreview/<objectName>

/api/v2/connection/source/name/<name>/datapreview/<objectName>

To request target data, use one of the following URIs:

/api/v2/connection/target/<id>/datapreview/<objectName>

/api/v2/connection/target/name/<name>/datapreview/<objectName>
If you use the connection name in the URI and the connection name includes a space, replace the space with %20. For example:
/api/v2/connection/target/name/my%20connection/datapreview/SF_ACCOUNT.csv

To receive more than 10 rows, use the following URI:

GET Response

Returns the dataPreview object for the requested connection ID or connection name and object name.
The dataPreview object includes the following attributes:

Field

Type

Description

connId

String

Connection ID.

objectName

String

Name of the source or target object.

header

String

Column headers.

fieldName

String

Field name.

fieldBusinessName

String

Business field name.

data

String

Includes the following attribute in the dataPreviewEntry object.

values

String

Included in the dataPreviewEntry object. Field values from the source or target object.

GET Example

The following example shows a request to preview data from the SF_ACCOUNT.csv objecThe following example shows a request to preview data from the SF_ACCOUNT.csv objec

GET <serverUrl>/api/v2/connection/target/0000010B000000000003/datapreview/SF_ACCOUNT.csv HTTP/1.0
Accept:application/json
icSessionId: <icSessionId>

The following text is a sample response:

{

   "@type": "dataPreview",
   "connId": "0000010B000000000003",
   "objectName": "SF_ACCOUNT.csv",
   "header":    [
      "ID",
      "ISDELETED",
      "MASTERRECORDID",
      "NAME",
      "TYPE",
      "PARENTID",
      "BILLINGSTREET",
      "BILLINGCITY",
      "BILLINGSTATE",
      "BILLINGPOSTALCODE",
      "BILLINGCOUNTRY",
      "BILLINGLATITUDE",
      "BILLINGLONGITUDE",
      "SHIPPINGSTREET",
      "SHIPPINGCITY",
      "SHIPPINGSTATE",
      "SHIPPINGPOSTALCODE",
      "SHIPPINGCOUNTRY",
      "SHIPPINGLATITUDE",
      "SHIPPINGLONGITUDE",
      "PHONE",
      "FAX",
      "ACCOUNTNUMBER",
      "WEBSITE"
   ],

   "fieldName":    [
      "ID",
      "ISDELETED",
      "MASTERRECORDID",
      "NAME",
      "TYPE",
      "PARENTID",
      "BILLINGSTREET",
      "BILLINGCITY",
      "BILLINGSTATE",
      "BILLINGPOSTALCODE",
      "BILLINGCOUNTRY",
      "BILLINGLATITUDE",
      "BILLINGLONGITUDE",
      "SHIPPINGSTREET",
      "SHIPPINGCITY",
      "SHIPPINGSTATE",
      "SHIPPINGPOSTALCODE",
      "SHIPPINGCOUNTRY",
      "SHIPPINGLATITUDE",
      "SHIPPINGLONGITUDE",
      "PHONE",
      "FAX",
      "ACCOUNTNUMBER",
      "WEBSITE"
   ],

   "fieldBusinessName":    [
      "ID",
      "ISDELETED",
      "MASTERRECORDID",
      "NAME",
      "TYPE",
      "PARENTID",
      "BILLINGSTREET",
      "BILLINGCITY",
      "BILLINGSTATE",
      "BILLINGPOSTALCODE",
      "BILLINGCOUNTRY",
      "BILLINGLATITUDE",
      "BILLINGLONGITUDE",
      "SHIPPINGSTREET",
      "SHIPPINGCITY",
      "SHIPPINGSTATE",
      "SHIPPINGPOSTALCODE",
      "SHIPPINGCOUNTRY",
      "SHIPPINGLATITUDE",
      "SHIPPINGLONGITUDE",
      "PHONE",
      "FAX",
      "ACCOUNTNUMBER",
      "WEBSITE"
   ],

   "rows":    [
            {
         "@type": "dataPreviewEntry",
         "values":          [
            "001i000000KIAQGAA5",
            "0",
            "",
            "ABCPoint",
            "Customer - Channel",
            "",
            "345 ABC Park",
            "Mountain View",
            "CA",
            "94063",
            "",
            "",
            "",
            "345 ABC Park",
            "Mountain View",
            "CA",
            "94063",
            "",
            "",
            "",
            "(650) 555-3450",
            "(650) 555-9895",
            "CC978213",
            "www.ABCpoint.com"
         ]
      },

            {
         "@type": "dataPreviewEntry",
         "values":          [
            "001i000000KIAQHAA5",
            "0",
            "",
            "123 United, UK",
            "Customer - Direct",
            "",
            "123 Estate,\nGateshead, Tyne and Wear NE26 3HS\nUnited Kingdom",
            "",
            "UK",
            "94063",
            "",
            "",
            "",
            "123 Estate,\nGateshead, Tyne and Wear NE26 3HS\nUnited Kingdom",
            "",
            "",
            "94063",
            "",
            "",
            "",
            "+44 123 4567899",
            "+44 123 4567899",
            "CD355119-A",
            "http://www.123United.com"
         ]

      }