Creating an API Mashup
You can create a mashup in an existing REST API.
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.
The Mashup Routing panel appears on the right.
8. Provide a Mashup step name that is unique.
9. To select the API Endpoint that you want to invoke in the mashup step, provide the following fields.
Note:
To provide the API Endpoint, you can type a few letters and select from the autocomplete drop-down list.
a. Type or select the API Gateway API.
b. Type or select the Resource.
c. Type or select the Method.
d. Select Should execute Outbound policies if you want the outbound security policies of the participating API to be enforced in the context of an API mashup.
10. Provide the Headers as follows:
a. Select Use incoming Headers to use the headers in the incoming request.
b. Additionally, you can add custom headers in the Custom Headers section as follows:
a. Type or select the Header Name.
b. Type or select the Header Value.
c. Click Add.
Note:
You can access 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.
11. Provide the Query Parameters as follows:
a. Type or select the Query Parameter Name.
b. Type or select the Query Parameter Value.
Note:
You can access 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.
c. Click Add.
12. Provide the Path Parameters as follows:
a. Type or select the Path Parameter Name.
b. Type or select the Path Parameter Value.
Note:
You can access 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.
c. Click Add.
13. Enter the Payload as follows:
Note:
You can access the payload 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.
a. Type the Payload.
b. To include an advanced payload transformation, click Add xslt document.
c. Select an XSLT file.
d. Add an XSLT Feature Name.
e. Add a value for the feature in XSLT Feature value.
f. Click Add.
g. To add an XSLT transformation alias, click XSLT transformation alias.
h. Select an XSLT transformation alias from the drop-down list.
i. Click Add.
14. Provide an Advanced transformation, if required.
Note:
For more information on defining an advanced transformation using the webMethods IS request processing policy, see
Invoke webMethods IS.
a. Click Add webMethods IS service.
b. Type the path to a webMethods IS service.
c. Select a Run As User from the drop-down list.
d. Deselect Comply to IS Spec if required.
e. Click Add.
f. Select a webMethods IS Service Alias from the drop-down list.
15. Enter the Transformation metadata, if required.
a. Type a Namespace Prefix.
b. Type a Namespace URI.
16. Provide the Custom Pipeline variables, if required.
You can use custom pipeline variables to hold values that need to be used in another step of the API mashup. For more information, see
Structure of an API Mashup.
a. Type a Name.
b. Type a Value.
c. Click Add.
17. 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.