The integration of SAP Cloud ALM using mapping capability of External API Management were demonstrated with these blogs:
An enhancement of the mapping capability has been released. Instead of hard-coding data like user ID, project ID, variables can be declared in the mapping and set in the Subscription. In the payload-based mapping, the variables will be replaced at runtime during the transformation mapping.
You have followed one of the aforementioned blogs and know how to use the External API Management application of SAP Cloud ALM.
In this example, the webhook and mapping of this blog will be reused: SAP Cloud ALM API & Integration: Several extensions of SAP Cloud ALM with SAP BTP (Part 2): Replicat...
In the SAP Cloud ALM External API Management application, create a mapping. The mapping defines the transformation rule to apply before sending the request and after receiving the response.
Here the projID variable is used to define the projectID.
At runtime, it will be replaced by the configured value or an empty string if the variable name is not defined in the subscription.
{
"_information":
{
"_version": "1",
"_source": "SAP Cloud ALM Task",
"_destination": "SAP Cloud ALM Task",
"_name": "SAP Cloud ALM Task to SAP Cloud ALM Task",
"_comment": ""
},
"structure":
{
"request":
{
"externalId": "#{id}",
"projectId": "#{@USER_VAR(projId)}",
"title": "#{title}",
"type": "CALMREQU",
"description": "#{description}",
"scopeId": "f15896c1-ef45-4e9e-81c9-907c1f6ecaf3"
},
"response":
{
"externalId": "#{id}"
}
},
"eventTypeMapping":
{
"_comment": "Specific event type mapping",
"operationMappings":
[
{
"eventType": "TASK.CREATED",
"operation": "POST",
"responseRoot": "",
"externalIdProperty": "/id"
}
]
}
}
Check the help.sap.portal for more information.
Create a subscription based on already created web-hook and mapping.
As soon as a mapping with a user variable is selected, the variable can be defined.
Thanks for reading.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
20 | |
9 | |
8 | |
7 | |
7 | |
7 | |
7 | |
6 | |
5 | |
5 |