Working with Header Parameters

Header parameters are used for user-defined custom HTTP headers for a request, for example, the APIKey could be a HTTP Header parameter. Unlike query and path parameters, header parameters do not appear in the URL of the request, but if they exist in your API specification, they are passed into the request but are not visible to you.

Note: Header parameters can be defined per operation which means that each operation in the API can have its own header parameters.

If you created your REST API from an imported Swagger file (for example, a Swagger file that was created in the API Modeler), the parameters are not editable in TIBCO Business Studio for BusinessWorks. You cannot modify existing parameters or create new ones. You can only view the parameters. Any custom header parameters you create are visible in the Data Source tab of TIBCO Business Studio for BusinessWorks as follows:

Note: If your Swagger file was created in the API Modeler in TIBCO Cloud Integration, you can add header parameters or modify existing header parameters in its operations from the API's page in API Modeler. For more information, see the "Adding and Editing Request Parameters" topic in the API Modeler section. However, the APIs created using a Swagger file that was imported from API Modeler into TIBCO Business Studio for BusinessWorks cannot be modified in TIBCO Business Studio for BusinessWorks.

You can view or add header parameters in TIBCO Business Studio for BusinessWorks if the Swagger file for your project was auto-generated in TIBCO Business Studio for BusinessWorks by implementing a REST service from XSD.

To add a custom header parameter, follow these steps:

    Procedure
  1. Click Components under the Module Descriptors to open the Component Configurations page.
  2. Double-click the process name (with the green chevron next to it) to open its properties in the Properties view.
  3. Click the Bindings tab.
  4. Click an operation name in the Operations section.
  5. Click the Request tab in the Operation Details section.
  6. Click the red icon () to add a header parameter. To edit the parameter name click on the newly created parameter's default name and type in a new name. Be aware that these buttons are disabled if you are viewing operations for an API that was created outside TIBCO Business Studio for BusinessWorks and imported into TIBCO Business Studio for BusinessWorks.
    Note: Do not use a space in the HTTP header name. If you do, the following error is displayed: Bad message- 400 - Illegal character.
    You can also edit an existing header parameter to make it required or optional by clicking in the cell that corresponds to the parameter in the Required column. The value toggles from Yes to No or vice versa.
  7. Use the Response tab to add a header parameter to the operation response.