Application Integration (On-Premises) : Service Development : Working with REST : Configuring a REST Resource Using the URL Template-Based Approach : Configuring a REST Resource for a Service
Configuring a REST Resource for a Service
When you select an existing service to configure the REST resource, you specify the format of the URL that REST applications must follow in their requests to the REST server and the HTTP methods that the resource needs to support.
Important:  
The combination of the URL format and its supported methods must be unique on the Integration Server.
To configure a REST resource for a service
1. In the Package Navigator view of Designer, click the service for which you want to configure the REST resource and select File > Properties > REST Resource Configuration.
2. In the REST Resource Configuration page, click to add a resource.
3. In the Add REST Resource dialog box, specify the format of the REST URL and select one or more HTTP methods to support.
For example, consider a discussion application that maintains a database of discussions about different topics. If you want your application to read information about discussions related to a specific topic, you can create a URL format that supports the GET method by providing the following details:
*REST URL: /discussion/topic/{id}
*HTTP Methods: GET
Based on the information specified, any application request to the REST server must be in the format: GET /restv2/discussion/topic/{id}, where restv2 is the directive used to invoke the resource and {id} is a dynamic parameter that accepts any value associated with a specific topic.
Note:  
For a resource, you can select only from the HTTP methods that are supported for the underlying service. For information about configuring the supported HTTP methods for an Integration Server service, see Run Time Properties for Services.
4. Click OK to save your changes.
Designer displays a confirmation message specifying successful generation of the REST resource. You can also view the URL that you added and the related HTTP methods on the REST Resource Configuration page.
Copyright © 2015- 2017 Software AG, Darmstadt, Germany. (Innovation Release)

Product LogoContact Support   |   Community   |   Feedback