Step 1: On the Web APIs tab, select "New solution" from the Solution name list; in the New solution dialog, click OK to use the default solution name.
Step 2: Use the default Web API URL "http://localhost:5000". Make sure the port setting in the Web API URL is not occupied by another program.
In this tutorial, the Web APIs will be running on the local computer, in order to quickly get started and running.
If you plan to apply a web debugging proxy tool to debug the deployed application or want to publish the PowerServer Web APIs to a dedicated server, then use the actual IP address.
Step 3: Click the Database Configuration button at the bottom of the Web APIs tab.
Step 4: In the Database Configuration dialog, click DB Drivers in the upper part and then select the SQL Anywhere driver (or PostgreSQL driver) and the option "I have read and agree to the license ...".
Step 5: In the Database Configuration dialog, click New in the upper part to create the database connection that will be used by the Web APIs.
Create the database connection with the following settings:
-
Specify any text (for example "local_sa") as the database cache name.
-
Specify SQL Anywhere (ODBC) as the database provider.
-
Select PB Demo DB V2021 as the data source.
-
Specify "dba" as the user name and "sql" as the password.
-
Click Test Connection to make sure the database can be connected successfully.
Step 6: Click OK to save settings and go back to the Database Configuration dialog; and then click New in the lower part to map the transaction object with the database cache.
Step 7: Input "sqlca" as the transaction object that maps to the database cache.