Adding Custom Headers in REST Outbound Proxy Business Service Methods

There may be some scenarios where the header parameters are not defined in the JSON specification, or where customers want to add some custom headers that are not part of JSON specification. In these scenarios, headers or custom headers can be added as method arguments. For more information, see Overview of Custom Headers in REST Outbound Proxy Business Service Methods.

To add a new custom header parameter:

  1. Create a new Workspace.

  2. In your list of pre-existing proxy business services, select a required proxy business service, select required method, and then locate your method arguments.

  3. Add a new argument record giving it an appropriate name to the new header argument.

  4. Append the suffix :header to the parameter name.

    For example, if the parameter name is myFirstHeader, then the complete parameter name is: myFirstHeader:header.

  5. Update the values in the Type column to specify whether your header is an input header or an output header.

  6. (Optional) Update the values in the Storage Type to Property.

  7. To the new method argument, add a use property with the following details:

    • Name. Type

    • Data type. This can be string, integer, or boolean and must be entered in lowercase.

      Note: Data type is required when assigning this parameter value to the outgoing JSON payload. The value is usually string for headers.

    The following figure shows an example of a Business Service Method Argument User Property called type. It has the value string, this indicates that the api_key:header is of type string.

    This figure shows an example of a Business Service Method Argument User Property called type. It has the value string, which indicates that the api_key:header is of type string.
    Note: There is no direct mapping between a Siebel data type and a JSON data type, therefore Siebel REST API uses this user property to specify what JSON data type to use when sending the HTTP request.
  8. Save the new argument and its user property, and deliver the workspace.

    You can now pass values to this new method argument at runtime. This argument is converted into a header parameter during the outbound REST endpoint call.