Trading Networks 10.3 | Administering and Monitoring B2B Transactions | Service Development Help | Working with REST | Configuring a REST V2 Resource | Working with REST V2 Resource Operation | Example of Defining a REST V2 Resource Operation
 
Example of Defining a REST V2 Resource Operation
Consider a discussion application that maintains a database of discussions about different topics. If you want REST clients to interact with this application through Integration Server and read information about discussions related to a specific topic, under the folder called app create a REST V2 element named discussionNode with the resource name as discussion and define a resource operation that supports the HTTP GET method by providing the following details:
*REST URL: /discussion/topic/{id}
*HTTP Methods: GET
Figure 71. Example of Add Operation
If you select an existing Integration Server service named communication to implement the specified resource operation, ensure that the service has a String input variable which corresponds to the dynamic parameter provided in the REST URL (in this case, id).
Based on the information specified, any client request to the REST server must be in the format: GET /restv2/app:discussionNode/discussion/topic/{id}, where /restv2/app:discussionNode is the template prefix used to invoke the discussion resource, and {id} is a dynamic parameter that accepts any value associated with a specific topic.