CentraSite 10.7 | CentraSite User’s Guide | Asset Management | Managing Assets through CentraSite Business UI | REST Service Management | Adding REST Service from Scratch | Adding Status Code to REST Service
 
Adding Status Code to REST Service
HTTP/1.1 defines all the legal status codes. Examine these codes to determine which are appropriate for your Service.
HTTP response status codes provide information about the status of a HTTP request. The HTTP specification defines several status codes that are typically understood by clients.
In this task, you define individual HTTP response status codes for each method.
HTTP status codes indicate the success or failure of an invocation.
*To add a HTTP status code
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 HTTP Status Code.
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 Resource and Methods page, expand the resources and click Add Method or the Edit icon.
9. Click Responses > Add Response link.
This opens the Add Response dialog box.
10. In the Add Response dialog box, provide the required information for each of the displayed data fields.
Field...
Description
Status Code
The HTTP Response status code number.
Examples
*HTTP 200 OK
*HTTP 400 Bad Request
*HTTP Error 404 Not Found
*HTTP Error 500 Internal Server Error
Name
This is a label that you assign as a meaningful name of the HTTP Status Code.
For example, you may call a HTTP 400 response as Validation Error, instead of the Bad Request.
Description
(Optional). The description for the HTTP Status Code.
11. To further update the new status code, click the Edit icon. Repeat for each code that you want to modify.
12. To specify multiple status codes, click the Add Response link to add new status code.
13. If you need to delete a status code, click the Delete icon. Repeat for each status code that you want to delete.
14. Click Save.