CentraSite Documentation : Working with REST-based APIs : Modeling a RESTful API : Configuring HTTP Methods : Before You Begin
Before You Begin
Understand the predefined HTTP methods and their known attributes. See the HTTP method definitions information to learn more about the common set of methods for HTTP.
Clients use HTTP methods to perform certain operations. Multiple methods exist - GET, POST, PUT, DELETE, HEAD, OPTIONS, PATCH, TRACE, and CONNECT.
Important:  
During virtualization of an API, CentraSite does not support the following HTTP methods: HEAD, OPTIONS, PATCH, TRACE, and CONNECT. This is because, when the virtual API is published to Mediator, at run-time Mediator only supports GET, POST, PUT, DELETE.
Let us consider the following scenarios for our sample Phone Store API:
Resource URI
Supported HTTP Methods
Description
/phones
GET
List all phones.
/phones
POST
Creates a new phone with product code 412456.
/phones/phone-412456
GET
Retrieves details of a phone whose product code is 412456.
/phones/phone-412456
DELETE
Removes a phone whose product code is 412456.
/phones/phone-412456?fields=(make,features, bodytype)
GET
Retrieves additional details (such as Brand, Features, Body Type) of a phone whose product code is 412456.
/phones/phone-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/phone-412456?make=apple&features=3g
PUT
Updates a phone whose product code is 412456, brand is Apple, and also 3G compatible.
Resource methods can also use parameters, such as path parameters, query parameters, or header parameters to identify or pass additional information.
You can capture the sample requests and responses to facilitate clients easily interact with the resources of API.
You can set HTTP status codes to help client quickly and more easily understand the HTTP response messages.
Copyright © Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback