Once the API Builder is created, you can start defining a new method by clicking the ADD NEW METHOD button in the upper right corner of the screen. After this step, you can set a name for the method and configure the properties of the method. During the method creation process, you can use the Properties panel on the right side of the screen to authorize and add actions. You can delete or rename the methods you created at any time.
Fields in Properties Panel:
3. Method Input: If your method will work by taking a specific input value, you can define input properties through this field. These properties include details such as input name and type.
For example, let's say you are developing an application that serves menu content. In this application, you may want to take a Barcode number as input and return the status code as respons.
You can write the necessary queries by entering the SQL Editor field. The SQL editor accepts queries that you write by hand or queries created with the help of artificial intelligence. For example, you can add the following query:
SELECT Barcode, Status FROM Menu WHERE Barcode = @Barcode
2. Give your action a name (for example, Status Inquiry) and click the CREATE button. To call this action into an API Method, click the +ADD ACTION button and add the action by typing Status Inquiry in the search bar.
3. Define the parameter of the created action as Action Results → Status Inquiry via Symbol Picker.
4. The Barcode parameter you specified with "@" in the SQL Editor must be opened to the API as an external method input. For this, click the +ADD METHOD INPUT button, type Barcode in the Input Name field, set the input type as Guid and click the Create button.
The action you created is ready to receive external parameters and execute SQL queries. Click the Preview button to test all configurations. As a result of the preview, you can view your API and the added method operations by clicking Swagger in the URL section. You can set whether these operations can be viewed only by logged in users or by everyone in the Authorization field in the Properties panel.