CentraSite Documentation : Runtime Governance with CentraSite : Important Considerations when Configuring REST or XML Virtual Services : Handling Virtual REST APIs with Multiple Resources : Scenario B : Straight-Through Routing Action : Workaround Option 1:
Workaround Option 1:
Modify the Straight-Through routing action of the native REST API.
To modify the Straight-Through routing action
1. In CentraSite Business UI, display the details page for the native REST API. If you need procedures for this step, see Working with REST-based APIs in CentraSite.
2. In the action bar for the API, click Virtualize.
3. In the Virtualize <API_Name> (Step 1 of 3) wizard, select the virtual alias and it’s endpoint for reconfiguration.
4. Click Next.
5. In the Virtualize <API_Name> (Step 2 of 3) wizard, locate the “Straight-Through” routing action in the Message Flow section.
6. Mouse hover the action name, and click the Configure icon to the right of the name. This opens the Straight-Through Routing dialog box.
7. In the Route to endpoint field, modify the existing endpoint. Append the resource path tokenizer ${sys:resource_path} with the base URL in the format <base-url>/${sys:resource_path}.
Thus, for our sample endpoint:
http://www.phonestore.com/api/phones
The modified endpoint should be:
http://www.phonestore.com/api/${sys:resource_path}
8. Click OK and save the modified API.
9. If you choose to use this option, in addition to the above steps in CentraSite Business UI, you must consider the following:
*Modify the native service implementation to reconfigure the endpoint and resource URI.
*-OR-
*In the details page of the native REST API, edit the resource URI to exactly match with the endpoint. Thus for our example, modify the resource URI to read /phones. In addition, you must inform the clients of changes that have been made to the endpoint and resource URI.
Copyright © 2005-2016 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback