Create custom API endpoints

Description

Individual API endpoints can be created with the Api Editor in the web environment. The API endpoints can be used to pull specific data from the database, such as individual data. The images/download/thumbnails/494471138/API-Editor_Text_EN_img.png can be found in the main menu images/download/thumbnails/494470919/Hauptmen%C3%BC_img.png under Statistics under images/download/thumbnails/494470758/Konfiguration_men%C3%BC_EN_img.png .

API Endpoint Management

In the API editor menu, all API endpoints are displayed in a table. Here you can select and edit an API endpoint.

Some API endpoints have a red exclamation mark in the column "Is internal". These endpoints are provided by Innosoft and are used for important standard statistics, etc. For this reason, please be careful when configuring them or even avoid it.

You can search for an API endpoint in the column headings of the table (Name, IS internal). To edit an endpoint, you must click on the line of the corresponding endpoint. Once you have selected an endpoint, you can edit the name of the endpoint or even delete the endpoint itself.

Create a new API endpoint

To create a new endpoint, click on "New". You can then enter a name and to select a type. For an API endpoint, it is recommended that you select "SQL" as the type.

The name is case-sensitive.

After confirming the two entries, you will find the new endpoint in the table.

Editing an API endpoint

SQL

After selecting an API endpoint from the list, you can specify the SQL from which the data is to be taken. If you want to work with parameters, you have to put a colon in front of the parameter name.

SQL keywords are highlighted in colour.

Parameter

You can add new parameters in the windows to the right of the main window. To add a new parameter, you must click on the plus button. In the settings, you can select how the parameter should be called, what type the parameter should have and whether multiple entries should be possible or not. Here you can also delete existing parameters.

Example

SELECT *
FROM RESSLIST
WHERE OBERGRUPPE = :OBERGRUPPE
AND OGRNR = :OGRNR

Determination of the ID

The ID can be found by opening the API endpoint in a separate window. The ID can then be found in the last part of the URL.

images/download/attachments/494473581/pfad.PNG