Hybrid Integration 10.1 | Integrating On-Premises Applications | Document Conventions | Working with REST | Configuring a REST Resource Using the URL Template-Based Approach | 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, you can create a REST V2 resource named 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
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/discussion/topic/{id}, where restv2 is the directive used to invoke the discussion resource, topic is a static parameter and {id} is a dynamic parameter that accepts any value associated with a specific topic.

Copyright © 2015- 2017 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.