Important: | During virtualization of an API, CentraSite does not support the following HTTP methods: HEAD, OPTIONS, PATCH, TRACE, and CONNECT. This is because, when a virtual API is published to webMethods Mediator, at run-time, the HTTP methods GET, POST, PUT, DELETE are only supported. |
Resource URI | Supported HTTP Methods | Description |
/phones | GET | List all phones. |
/phones | POST | Creates a new phone with product code 412456. |
/phones/412456 | GET | Retrieves details of a phone whose product code is 412456. |
/phones/412456 | DELETE | Removes a phone whose product code is 412456. |
/phones/412456?fields=(make,features, bodytype) | GET | Retrieves additional details (such as Brand, Features, Body Type) of a phone whose product code is 412456. |
/phones/412456/make | GET | Identifies the brand of a phone whose product code is 412456. |
/phones/search?q=(make,eq,apple) | GET | Retrieves a list of all phones whose brand is Apple. |
/phones/412456?make=apple&features=3g | PUT | Updates a phone whose product code is 412456, brand is Apple, and also 3G compatible. |
In this field... | Do the following... | ||
Name | Optional. Enter a name for the method. | ||
Description | Optional. Enter descriptive information about the method. | ||
HTTP Method | Select the HTTP operation you want to perform on the resource. (The drop-down list displays the list of supported HTTP methods.) | ||
Request Content-Type | Select the content format for request message. (The drop-down list displays the list of supported content formats.)
| ||
Response Content-Type | Select the content format for response message. (The drop-down list displays the list of supported content formats.)
| ||
Deprecated | Optional. Specify whether or not the REST method is deprecated. | ||
Parameters - Add Parameter (link) | Optional. Specify one or more request parameters of the following types at the Method level: Query-String Header Form Although CentraSite allows you to define parameters of the type "Form" at the Method level, these parameters are not supported at run-time. Only parameters of the type Query-String and Header are supported at run-time.
a. Click the Add Parameter link to open the Add Parameter dialog. b. In this dialog, you define input parameters at the Method level. To specify multiple parameters, click the Add Parameter link to add each new parameter. The new parameter is added to the method. For a complete description of how to set up the request parameters, see Adding Parameter to REST API. | ||
Requests - Add Request (link) | Optional. Specify one or more HTTP requests to the resources of the REST API. For a complete description of how to set up the HTTP requests, see Adding HTTP Request to REST API. | ||
Responses - Add Response (link) | Optional. Specify one or more HTTP responses to the resources of the REST API. For a complete description of how to set up the HTTP responses, see Adding HTTP Response to REST API. | ||
Sample Requests and Responses - Add Request and Response (link) | Optional. Write one or more sample requests to the resources of the REST API, and the corresponding sample responses from the API. For a complete description of how to expose the HTTP requests and response messages, see Adding Request and Response Messages to REST API. |