Configure a server script API
In this topic, you learn how to configure an API to communicate with a server script.
Procedure
-
In the Cockpit, go to Connectivity and click API Designer.
-
In the API Designer, click Add.
Result: The API configuration window opens. You start in the General tab.
-
In Type, select Server Script.
-
In API format, Swagger 2.0 is preselected. You can select the newer version, Open API 3.0, here.
-
Enter a Name for your server script.
-
If you created a package or group for your APIs, applications, oData, and mock data before, you can select those from the Group or Package drop-down menu.
-
Enter a short and meaningful Description to your API.
-
In Version, enter a version number, for example,
1.0
, to keep track of changes to the API. -
In Media Type, define the type of content of your API. This is needed to communicate with your browser. By default, it is
application/json
. -
Activate any of the following options that fit your application:
-
Allow Untrusted Certificates: Allow self-signed certificates that were added in Proxy Authentication.
-
Enable Anonymous Access: Allow anonymous access to server scripts API.
-
Enable Trace: Allow tracing activities of your API. You can see activities in the API Client.
-
Run server script in own process: Activate for server scripts with slow performance. The server script starts a new process and does not slow down the main process of your application.
-
Use in App Designer & App Editor: Allow this API to be used in the App Designer or App Editor.
-
-
Click Save.
Results
-
Your API is saved with the current settings and is added to the library in the API Designer.
-
The API Designer adds an ID to your API and saves change dates.