Importing Swagger Document

All external API endpoints are uploaded via Swagger(v2) API specifications document. This document can be in either JSON or YAML format. Once this document is uploaded, the platform creates the route specifications. This becomes a part of service definition. In the following example, there are two such routeSpecs. The front-end is allowed only to invoke these route endpoints whereas the platform make sure to re-route to the actual destination with the correct authentication.

Route Specifications

Every external API endpoint is indirectly exposed via specifications similar to the following snippet (of service definition). Let's discuss the snippet of the service definition.

{
  "docUrl" : "/_model/api-service/quote/datacubes",
  "routeSpecs" : [
    {
      "location" : "Base URL of the endpoint",
      "path" : "/svc/quote/datacubes/api/companies",
      "secure" : true
    },
    {
      "location" : "Base URL of the endpoint",
      "path" : "/svc/quote/datacubes/api/overview",
      "secure" : true
    }
  ]
}