Software AG Products 10.5 | Using API Gateway | APIs | API Mashups | Creating an API Mashup
 
Creating an API Mashup
To create a mashup you require:
*The API must include the resource and the method in which you want to add the API mashup.
*The participating APIs (that you want to include in the mashup) must exist in the API Gateway instance.
*To create a mashup in a REST API
1. Click APIs in the title navigation bar.
A list of all registered APIs appears.
2. Click the required API.
The API details page appears.
3. Click Edit.
4. Click Mashups.
The Mashups tab appears. It displays the resources in the API and their methods on the left and an empty (Default routing) routing diagram.
Note:
If the API does not have any mashup, the Mashup tab displays the list of resources only in the Edit mode; the tab is empty in the view mode.
5. In the List of resources, click the resource in which you want to include the mashup.
The resource tab expands and the methods included in the resource are displayed.
6. Click the toggle button to enable the method in which you want to create the mashup.
Note:
If you use the toggle button and disable a method that has a mashup, the mashup definition for that method is immediately cleared.
7. Click Add invoke to add a mashup step.
a. Connect the step to Start.
The Start and Stop terminators and all steps have connection points that you can connect to the other steps and terminators.
Tip:
To select a connection point and connect it to another connection point: i) Hover the mouse over the top or bottom of the step or terminator till the connection point is highlighted; ii) Click the connection point and drag to the other step or terminator.
b. Configure the step properties as desired.
The Mashup Routing panel that appears on the right side of the mashup canvas displays the properties for the selected step. You can configure the following properties using the Mashup Routing panel:
Section
Field
Description
Mashup step name
Provide a name for the mashup step that is unique within the mashup.
API Endpoint
The API endpoint that you want to invoke in the mashup step. The API must be published on the current API Gateway instance.
API Gateway API
The endpoint of the API that you want to use. You can type a few letters and select from the autocomplete list.
Resource
The resource in the API that you want to use. You can type a few letters and select a resource from the autocomplete list.
Method
The specific method of the resource that you want to invoke.
Execute outbound authentication policy
Select if you want the outbound security policies of the participating API to be enforced in the context of an API mashup.
Headers
Use incoming Headers
Select to use the headers in the incoming request.
Custom Headers
Custom headers that you can add in addition or instead of the incoming headers. Each custom header must have the following fields:
*Header Name
*Header Value
Query Parameters
Provide the following values:
*Query Parameter Name
*Query Parameter Value
Path Parameters
Provide the following values:
*Path Parameter Name
*Path Parameter Value
Payload
Type the Payload.
XSLT Document
Click Add xslt document and select the XSLT file for transforming the payload. Provide the following values:
*XSLT File
*Feature Name
*Feature value
For information about transforming the payload using XSLT, see Request Transformation.
XSLT Transformation alias
Click Add xslt transformation alias and select an existing XSLT transformation alias.
Advanced Transformation
webMethods IS service
Click Add webMethods IS service and provide the following values:
*webMethods IS Service
*Run As User
*Select Comply to IS Spec
For information about these fields and using the webMethods IS Service, see Invoke webMethods IS.
webMethods IS Service Alias
For information about the webMethods IS Service Alias, see Invoke webMethods IS.
Transformation Metadata
Namespace
Provide the following values:
*Namespace Prefix
*Namespace URI
For information about transformation metadata, see Request Transformation.
Custom Pipeline Variables
You can use custom pipeline variables to hold values that need to be used in another step of the API mashup. Provide the following values:
*Name
*Value
For more information, see Structure of an API Mashup.
Note:
In several fields, such as Header Value within custom headers, Query Parameter Value, and Path Parameter Value, you can use values from previous steps and other data using the variable and alias framework provided by API Gateway. For more information, see Structure of an API Mashup.
8. Click Add aggregator to add an aggregator step.
Note:
You can also add an aggregator step by connecting two invocation steps to the same previous step. An aggregator step is automatically added after the steps when you connect the second step to the same previous step.
9. If you have added the aggregator by clicking Add aggregator, add the following connections:
a. Connect the steps that need to be aggregated to the aggregator step.
b. Connect the aggregator step to the next step.
10. To add additional steps to the aggregated block, complete the following steps
a. To add a new step to the aggregated block, click Add invoke and connect the new step to the same previous step.
You can configure the properties of the new step immediately or later. For details on configuring the step properties, see step 7.
b. To add an existing step to the aggregated block, delete the connections of the step, if any and then connect the step to the previous step for the aggregated block and the aggregator step.
11. Click the mashup step and configure the properties of the mashup step as desired.
You can configure the mashup step properties using the Mashup Aggregator action panel that appears on the right side of the mashup canvas when you click the aggregator step. You can configure the following properties using the Mashup Aggregator action panel:
Section
Field
Description
Headers
Use incoming Headers
Select to use the headers in the incoming request.
Custom Headers
Custom headers that you can add in addition or instead of the incoming headers. Each custom header must have the following fields:
*Header Name
*Header Value
Query Parameters
Provide the following values:
*Query Parameter Name
*Query Parameter Value
Path Parameters
Provide the following values:
*Path Parameter Name
*Path Parameter Value
Payload
Type the Payload.
XSLT Document
Click Add xslt document and select the XSLT file for transforming the payload. Provide the following values:
*XSLT File
*Feature Name
*Feature value
XSLT Transformation alias
Click Add xslt transformation alias and select an existing XSLT transformation alias.
Advanced Transformation
webMethods IS Service
Click Add webMethods IS service and provide the following values:
*webMethods IS Service
*Select a Run As User
*Select Comply to IS Spec
For information about these fields and using the webMethods IS Service, see Invoke webMethods IS.
webMethods IS Service Alias
Select an existing webMethods IS service alias.
Transformation Metadata
Namespace
Provide the following values:
*Namespace Prefix
*Namespace URI
Custom Pipeline Variables
You can use custom pipeline variables to hold values that need to be used in another step of the API mashup. Provide the following values:
*Name
*Value
For more information, see Structure of an API Mashup.
Mashup Response Transformation
*Select Aggregate response
*Payload
Note:
In several fields, such as Header Value within custom headers, Query Parameter Value, and Path Parameter Value, you can use values from previous steps and other data using the variable and alias framework provided by API Gateway. For more information, see Structure of an API Mashup.
12. Add, configure, and connect additional API invocation steps and API aggregator steps as desired.
13. Click Save.
The mashup is created for the selected method.
Note:
You must activate the API to make the mashup available to client applications. For more information about activating an API, see Activating an API.