REST Service Binding
REST Binding provides external connectivity for REST over HTTP. You can specify custom HTTP headers and parameters using REST binding. It supports POST, GET, PUT, PATCH, and DELETE HTTP methods. It also supports JSON, XML, and plain text message types.
Binding
This section has the following fields.
Field | Description |
---|---|
Resource | The name of the resource. |
Resource Service Path | Specify the path to the Service Resource.
Define parameters in the resource service path by enclosing each parameter in { } brackets. For example, to define the path parameter isbn for a book resource, specify the resource path as follows: /book/{isbn} In this example, the client would invoke this service using the URL http:/<host>:<port>/book/<isbn>. Note: Path parameters that are not immediately enclosed in forward slashes are supported. For example, the parameter
authorName('{isbn}') in the resource service path
/book/authorName('{isbn}')/ is not directly contained by forward slashes, but will still successfully pass.
If an application contains multiple REST bindings, ensure that the location of the path parameters is unique for each REST binding. An example is that of one REST binding using the /book/{isbn} path and another REST binding is using the /book/{authorid} path. Since {isbn} and {authorid} are defined at the same location in the URI , one of these services will not function as expected. In addition to path parameters, the path in a REST binding can also contain query parameters. For example, /resource/path/{pathparam}? query={queryparam} or /resource/path/{pathparam}?{ queryparam} |
HTTP Connector Name | The name of the HTTP Connector.
By default, a new HTTP Connector Shared Resource is created when you create a new REST Service binding. Change the field value type to Module Property to specify a module property that has been defined as an HTTP Connector Shared Resource. |
Response Client Format | The type of response message format. The supported response message formats are: |
Enforce BW Service Response | Select the check box to set the response preference to
BW Service Response.
By default, the check box is not selected, and the response preference is set to the Accept Header response. For more information about the REST Service responses based on the Accept Header settings, see Accept Header Responses topic . |
Start Job on Input Exception | Select the check box to start the job when there is a wrong or erroneous input. |
To enforce authentication on the REST Service Binding, use the authorization header or associate the binding with a Basic Authentication policy. For more information, see "Enforcing Basic Authentication"
Operation Details
This section has the following tabs.