Aggregation
This topic provides an example of a JSON response for an account aggregation operation.
Using the Web Services source, you can have multiple account aggregation operations. For example, Aggregation - 1 and Aggregation - 2.
Account Aggregation - 1
You can aggregate two attributes from EndPoint1 and three more attributes from EndPoint2.
When you configure multiple operations, the response of first operation can be used as an input in the second operation.
-
In the Operation Name field, enter Account Aggregation - 1 (JSON) as the operation name.
-
From the Operation Type drop-down list, select Account Aggregation.
-
In the Authentication URL field, enter the URL specific to the account aggregation.
-
In the HTTP Method drop-down list, select POST.
The Header has the data keys and their corresponding values. These key value pairs will be sent as part of the Header in the HTTP Request.
The HTTP body is used for posting the data with a request. The body has two data entry types, Form Data and Raw. You can use either of them for an account aggregation.
In the Raw field, enter the JSON payload for the account aggregation.
The Root Path is the common path present in the JSON response. The Success Code is the successful HTTP response code expected by the respective Web Service operation. By default, the success code is 2**. Refer to Raw API Response for Account Aggregation - 1 as an example.
Refer to Raw API Response for Account Aggregation - 1 for an example of response mapping. For additional examples of the raw JSON response for which the Response Information schema is mapped, refer to Configuration for Response.
Raw API Response for Account Aggregation - 1
The following is an example of a raw response for the given response information and response mapping.
{
"members": [
{
"profile": {
"groups": "testGroup",
"name": {
"display_name": "testName1"
},
"team_member_id": "153",
"email": "test153@orgName.com"
},
"role": {
".tag": "tagName1"
}
},
{
"profile": {
"groups": "testGroup2",
"name": {
"display_name": "testName2"
},
"team_member_id": "154",
"email": "test154@orgName.com"
},
"role": {
".tag": "tagName2"
}
}
]
}
Account Aggregation - 2
For example, during aggregation of Dropbox, the response of the first endpoint will return the id
, Username
, firstName
, among others.
This response must be provided as an input to the second endpoint. This can be provided with the help of a keyword "response" ($response.team_member_id$
), where team_member_id
is the value fetched from Account Aggregation -1 and it is an identity attribute in the source schema.
-
In the Operation Name field, enter Account Aggregation - 2 (JSON) as the operation name.
-
From the Operation Type drop-down list, select Account Aggregation.
-
In the Authentication URL field, enter the URL specific to the account aggregation.
-
In the HTTP Method drop-down list, select POST.
The Header has the data keys and their corresponding values. These key value pairs will be sent as part of the Header in the HTTP Request.
The HTTP body is used for posting the data with a request. The body has two data entry types, Form Data and Raw. You can use either of them for an account aggregation.
In the Raw field, enter the JSON payload for the account aggregation.
To fetch additional attributes from another endpoint, use the id (identity attribute) from the previous response. Add these attributes in Schema Attribute section of Response Mapping of the first end point (Account Aggregation - 1).
In the following screenshot, $response.team_member_id$
represents the identity that was aggregated in the Account Aggregation-1 and is mentioned previously in the schema mapping section of Account Aggregation -1.
The Root Path is the common path present in the JSON response. The Success Code is the successful HTTP response code expected by the respective Web Service operation. By default, the success code is 2**. Refer to Raw API Response for Account Aggregation - 2 as an example.
Below is an example of a schema that is mapped to XML response. Refer to Raw API Response for Account Aggregation - 2 for an example of response mapping. For additional examples, refer to Configuration for Response.
In the following example, Account Aggregation -1 (JSON) is the parent endpoint and Account Aggregation - 2(JSON) is its child endpoint.
From the Parent Endpoint Name drop-down list, select Account Aggregation - 1 (JSON), as shown below.
Raw API Response for Account Aggregation - 2
The following is an example of a raw response for the given response information and response mapping.
{
"profile": {
"email_verified": "Yes",
"name": {
"given_name": "Test123",
"surname": "surnameValue"
},
"status": {
".tag": "tagValue"
}
}
}