13.3.7 Supply and Return Values with Parameters

Just as PL/SQL procedures can define IN, OUT, and IN/OUT parameters, so can REST Data Sources. Define a parameter at the operation level if it's specific to that action, or at the data source level if it's relevant to all operations.

You can configure a default value for each one, mark it as required if relevant, and indicate if the value is static. Any parameter whose value is not static can be set on the page or List of Values where you use the REST Data Source so different usages can pass in appropriate values. In Page Designer, they appear beneath a Parameters node indented inside the region in the rendering tree. The table below describes the most common parameter types.

Table 13-2 Most Common Parameter Types

Type Direction Description
URL Pattern IN Use in URL Pattern as :Name or {Name}
URL Query String IN Included in URL query string as Name=Val
HTTP Header IN, OUT, IN/OUT Set and/or return HTTP header value
Request or Response Body IN, IN/OUT Use in Request Body Template as #Name#, #Name!NULL#, or #Name!RAW#
Request or Response Body OUT, IN/OUT Return entire response body
Data Profile Column OUT Return data profile column from 1-row response

For example, to send a Content-Type header with the fixed value application/json, use an HTTP Header type parameter with IN direction marked as static.

In contrast, for an HTTP header or query string parameter related to authentication and authorization, define an appropriate Web Credential of the appropriate type instead. Then reference that web credential in your REST Data Source. This ensures security-related values are obfuscated in debug logs and that the credential secret is securely stored and handled.