Working with REST V2 Resource Operation
Defining a REST V2 Resource Operation
To define an operation of a REST V2 resource, you must specify the following:
The format of the URL that REST clients must follow in their requests to
Integration Server as the REST server.
The supported HTTP methods.
The associated service.
Important:
An operation in a REST V2 resource should be unique, the combination of a URL template and the supported HTTP methods must be unique.
You can associate either a new service or an existing service to a resource operation. Consider the following while associating a service to a REST V2 resource operation:
If you want to associate an existing service to a REST V2 resource operation, you must ensure that the dynamic parameter that you specify in the URL template already exists as a variable of type String in the input signature of the particular service. The service that you select need not reside in the same folder as the REST V2 resource.
For information about static and dynamic parameters in a REST V2 resource, see REST Developer’s Guide.
If you rename a service associated with REST V2 resource operations and update its references, the impacted resource operations also are updated with the new name of the service.
If you delete a service associated with a REST V2 resource operation or if you delete the input variable that is also referenced in the dynamic parameter of the URL template, the operation will not work when invoked by any subsequent client request to
Integration Server.
To define a REST V2 resource operation
1. In the Package Navigator view of Designer, double click the REST V2 resource for which you want to define the operation.
2. On the Resource Configuration tab, click Add.
3. In the Add REST Resource Operation dialog box, specify the following:
Field | Description |
REST URL | The URL template that a request from a client application must follow. |
Service Name | The name of the service to associate with the REST V2 resource operation. You can specify a service name in either of the following ways: Browse and select an existing service. Specify the fully qualified name of an existing service. Specify the name of a new service. |
HTTP Methods | Select one or more HTTP methods for the REST V2 resource operation. Note:
For a resource operation, you can select only from the HTTP methods that are supported for the associated service. For information about configuring the supported HTTP methods for an Integration Server service, see
Run Time Properties for Services. |
4. Click File > Save.
Integration Server validates the details specified for defining the new REST V2 resource operation. If the validation is successful, the new resource operation is added to the Resource Configuration tab. Otherwise, Designer shows details of the validation errors, which you must fix before attempting to save the resource operation details again.
Notes:
If you specify a new service name for associating with the REST V2 resource operation,
Integration Server creates a service (Flow, Java, C, or Adapter service) and adds it to the same folder as the REST V2 resource when saving the resource operation. In addition, the input signature of the new service includes the dynamic parameter specified in
REST URL.
You can edit the details of an existing REST V2 resource operation by selecting it on the REST V2 Resource Operation tab and clicking
Edit.