Service Definition

A Service definition is specified by the properties listed in the following table.

Property Type Description
name string Name of the service
props list Details about the endpoint including the authentication and authorization info
type string default:externalService
useHttps boolean Use the HTTPS for all APIs (default:true)
userOAuth boolean Use the OAuth2 for authentication and authorization (default:true)
routeSpecs list All of the endpoints that are exposed by the platform
docUrl string The location of the API documentation inside the platform

JSON Representation

A sample representation of an external service is described below.

{
  "docUrl" : "/_model/api-service/quote/datacubes",
  "name" : "datacubes",
  "props" : {
    "grant_type" : "password",
    "oauthUrl" : "authentication URL",
    "tokenUrl" : "token URL",
    "client_id" : "client ID",
    "client_secret" : "client secret",
    "username" : "username if provided",
    "password" : "password is provided",
    "scope": "scope1,scope2"
  },
  "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
    }
  ],
  "type" : "externalService",
  "useHttps" : true,
  "useOAuth" : true
}

The routeSpecs are further explained the next section.