Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This area of the Connection Designer is used to manage metadata of external APIs. These can be registered (created), edited or deregistered (deleted) here. In most scenarios, you will use API definitions that were shipped with the Connect Server. In this case, no change to the registered APIs is required.

Register an API

Requirements

To register a new API, an API description in OpenAPI or Swagger format is required. More information about OpenAPI can be found at the following link:

...

[name of the manufacturer]__[name of the product]__[version of the product or API].json

Spaces within the individual parts must be replaces by underscores (_), the parts of the name are separated by two underscores (__). The corresponding file must be stored in the Administration → Memory Management item in the "OpenAPI" directory using the Administration → Storage Management page. The custom property "x-event" is currently used to specify webhooks. This procedure will probably be adapted within the next Connect Server versionsreleases.

Procedure

Navigate to the page Connection Designer → Services and click the "Add Service" button. Now a window appears for entering the manufacturer, the product name and the version of the product or API. Enter exactly the same information here that you used for naming the OpenAPI file and then click the "OK" button.

...

The option "Path variables are not encoded by default" causes variables within the path not to be encoded for URIs. Thus, the URI template https://www.example.com/examples/{path} and the value "myexample/page1" will not be used to create result in the URI https://www.example.com/examples/myexample%2Fpage1 but the URI https://www.example.com/examples/myexample/page1. The use of this option should be avoided if possible, as this can lead to unintended APIs being referenced by variable values that are set accordingly. This is especially dangerous if the service allows a reference to the parent directory using "..". Unfortunately, the APIs of some providers (e.g. Google) are designed to require this feature by design. In this case, the API can only be used by enabling this option.

...

In the lower part of the editor there are three JSON editors. The top one, labeled "JSON Configuration Schema for configuration", defines a JSON schema that describes the configuration fields required when creating a connection. In the example above, the Conigma CCM API requires a logon to an SAP system has to be done using Conigma CCM. For this. Therefore, the base URI of the corresponding service, the SAP client, the SAP user, the password of the SAP user and the desired logon language are required. All these fields are mandatory. A corresponding JSON schema for the configuration can could look like this, for example:

Code Block
languagejson
{
  "type": "object",
  "properties": {
    "baseUri": {
      "type": "string",
      "format": "uri",
      "title": "Base URI of HTTP service of the SAP system"
    },
    "sapClient": {
      "type": "string",
      "pattern": "[0-9]{3}",
      "title": "SAP client"
    },
    "sapUser": {
      "type": "string",
      "title": "SAP user"
    },
    "sapPassword": {
      "type": "string",
      "title": "SAP password"
    },
    "sapLanguage": {
      "type": "string",
      "pattern": "[A-Z0-9]",
      "default": "E",
      "title": "SAP language code"
    }
  },
  "required": [
    "baseUri",
    "sapClient",
    "sapUser",
    "sapPassword",
    "sapLanguage"
  ]
}

...

For passwords, it is important that the description in the associated "title" attribute contains the keyword "Password". Thus a hidden password field is generated for the inputThis causes the corresponding input field in the UI to be rendered as a password field. When saving the configuration, this the entire configuration or parts of it can be encrypted so that, for example, passwords are not stored in plain text. For more information, refer to the section Verbindungen: Verwalten der Verbindungsinformationen Connections: Managing connections (Connect 2022).

The following two JSON editors define the client provided for the API and the server provided for the API, respectively.

...

An HTTP server (class Http.Server.HttpServer) is required as a server for processing the webhooks. Additional HTTP handlers are not used here required in this example.

Code Block
languagejson
{
  "$class": "Http.Server.HttpServer",
  "$params": {
    "handlers": []
  }
}