In order for the API files you have created to be used practically, they must be assigned to an API project.
To assign API files to an API project
-
Start the API Designer program.
-
In the menu bar, click View > Navigation.
-
Click API projects in the navigation.
-
In the tree structure, double-click the API project to be edited.
-
In the definition tree view, right-click the topmost node.
-
In the context menu, click API file reference.
The new API file reference node is added.
-
In the definition tree view, click API file reference.
-
Click View > Node editor on the menu bar.
-
In the node editor view, enter a unique ID for the node into the Control ID field.
-
Select the required file in the Name list.
TIP: To skip directly to the file definition, click (Show definition object).
-
On the toolbar, click (Save).
Related topics
You can import API projects into the API Designer. The API Designer independently detects whether the projects are API projects, and imports them as such.
To import an API project
-
Start the API Designer program.
-
In the menu bar, click Edit > Import object.
-
In the file browser, select the required API project and click Open.
The API project is imported.
Related topics
You can use an API method to create a call for exchanging data with the server (or database) relating to a specific application scenario. An API method can belong to more than one project. In an API method, you can define an API method, for example.
NOTE: If you create a new API method to provide a new API method, you must name the API method the same as the class. Ensure you use the correct case.
Using the API Designer, you can define the following types of API methods in API methods
Entity methods
Entity methods work with small parts of the object model in order to read data from the database or write data to the database. When you create an entity method, you only need to enter the table and column name and, if required, a filter condition (WHERE clause). Internal processing is handled by the API Server. The data schema for the input and output also has a specific format.
For examples for the definition of entity methods, see the SDK under Sdk01_Basics\01-BasicQueryMethod.cs.
User-defined methods
User-defined methods are methods for which you fully define the processing, input, and output data in code. This type therefore offers the greatest flexibility.
For examples for the user-defined methods, see the SDK under Sdk01_Basics\03-CustomMethod.cs.
SQL methods
SQL methods are methods that provide data from a predefined SQL query through the API. Create the parameters of a query as SQL parameters.
For examples for the definition of SQL methods, see the SDK under Sdk01_Basics\02-BasicSqlMethod.cs.
Related topics