Associate a request header with a resource
Define which request headers are expected for each resource within a scripted REST API.
Before you begin
A REST API resource and a request header must already be defined within the scripted REST API.
Role required: web_service_admin
About this task
The following procedure describes the process for manually associating a REST API request header with a resource. For details about automatically generating request header definitions in non-production instances, see Automatically generate API request definitions.
Procedure
- Create a Scripted REST Header Association record in one of the following ways
| Option | Procedure |
|---|---|
| Navigate through a scripted REST API record |
|
| Navigate directly to a new Scripted REST Header Association record | Navigate to All > Filter and enter sys_ws_header_map.form. |
In the API request header field, select or enter the request header to associate with the resource.
In the API resource field, select or enter the API resource the request header should be associated with.
If you navigated to a new Scripted REST Header Association record through a scripted REST API record, API resource is pre-populated.
Select Submit.
Result
The request headers that you added are included in the exportable OpenAPI specification in the REST API Explorer with a "type: string" schema definition. For more information about exporting OpenAPI specifications, see Export to OpenAPI specification.
Parent Topic:Create a scripted REST API