Calling a RESTful API Secured with API key Authentication

When you import an OpenAPI Specification to an ePortal Outbound project that contains an API key Authentication, a new section is created in the configuration file with the same security key used in the specification.

The following table shows the security scheme section in the specification file and the equivalent values generated by the outbound project in the configuration file.

Specification file

Configuration File

securitySchemes:
  apiKeyHeader:
    type: apiKey
    name: subscription-key
    in: header
security:
  - apiKeyHeader: [ ]

"SecuritySchemes": {
   "apiKeyHeader": {
      "APIKey": {
        "Key": "subscription-key",
        "Value": ""
      }
    }
 }

Prerequisite: To call a RESTful API with API key authentication you should set the values in the APIKey section of the configuration file.

When you re-import an OpenAPI Specification, these values are preserved and you can modify them when required.

Note: You can obtain the API Key values from the RESTful service provider.