CentraSite 10.3 | CentraSite User’s Guide | Asset Management | Managing Assets through CentraSite Business UI | REST Service Management | Adding REST Service from Scratch | Adding Request and Response Messages to REST Service
 
Adding Request and Response Messages to REST Service
REST Services can produce successful response and errors. CentraSite allows you to capture the default error responses when an exception or error occurs.
Note:
Beginning with version 9.8, although CentraSite supports the existing Sample Requests and Responses wizard, we enforce you use the REST Requests and REST Responses wizards to specify additional details about the REST payload. You may use the Sample Requests and Responses wizard if required.
*To add a sample request and response message
1. In CentraSite Business UI, access the Advanced Search panel in one of the following ways:
*Click the Browse link in the upper-left corner of the menu bar.
*Click the Search icon next to the Scope list. The default search scope is Assets.
This displays a list of assets in the Search Results page.
2. In the Additional Search Criteria list, select Asset Types.
3. To search for the assets of type, REST Service, click Choose.
This opens the Choose Asset Types dialog box.
4. In the Choose Asset Types dialog box, select the Assets option button, and then follow these steps:
a. Click the chevron next to Assets option button.
A list of defined asset types in CentraSite is displayed.
b. In the list of asset types, select REST Service.
c. Click OK.
A list of defined REST Service assets is displayed in the Search Results page.
5. Click the REST Service you want to add the add the HTTP Request and Response Messages.
This opens the REST Service details page. Also, the Actions bar displays a set of actions that are available for working with the REST Service.
6. On the Actions bar of the REST Service details page, click Edit.
7. Select the Resource and Methods profile.
8. In the Add/Modify Method dialog box, click the chevron to expand the area labeled Sample Requests and Responses.
9. Click the Add Request and Response link.
This opens the Add Sample Request and Response dialog box.
10. In the Add Sample Request and Response dialog box, provide the required information for each of the displayed data fields.
Field...
Description
Request
The HTTP Request message.
Important:
As a best practice, Software AG recommends that you use sample messages that could be sent from the client to the server.
Response/Error
The HTTP Response or error message.
The newly created Sample Request and Response Message is added to the REST Method.
11. To further update or delete a Sample Request and Response Message, hover over a particular Sample Message.
This displays icons for one or more actions that you can perform on the Sample Message.
12. Click the Edit or Delete icon, as required.
13. To specify multiple Sample Request and Response Messages, click the Add Sample Request and Response Message link, and provide values for the new Sample Request and Response Messages.
14. Click Save.