Creating a New Service for SOTI Snap Data Access Controller
Create a RESTful API service by connecting to an existing database. SOTI Snap applications can then perform create, read, update and delete (CRUD) operations on database table data using the API.
Procedure
- From the SOTI Snap Data Access Controller web console, select the Services tab.
- From the Services tab, select New Service.
-
Select the Database Server Type.
Select a database server type from the drop-down menu:
- PostgreSQL
- MySQL
- Oracle
- Microsoft SQL Server
- IBM Db2
Note: If you wish to connect to a remote Oracle database and encounter errors, you may need to install Oracle Instant Client. Instructions are available athttp://127.0.0.1:<console_port>/oracleSetupDocs
. -
Set up the Connection to the database server.
- Database Hostname / IP: The hostname/network address that has the database server.
- Port: The port number for accessing the database server on the hostname/network address.
- Username: The username for accessing the database server.
- Password: The database username respective password.
- Select Test Connection to verify that you can successfully connect to the database server.
-
If you can successfully connect to the database server, continue to set up the
Connection by selecting a database and / or
schema.
- Database: Choose a database from the database server.
- Database Schema: Choose a schema from the database you have chosen.
-
Select the Tables in the database server to receive API
endpoints.
- Optional: Enable Allow for custom SELECT queries to display tables with composite keys and / or no primary key.
- For the Table Name, choose the tables you would like to Create API Endpoint and / or Allow for Custom SELECT Queries.
See the Custom SELECT Queries section in the API Docs tab for more details about allowing custom SELECT queries.Note: Tables with composite keys and / or no primary key are only accessible using custom SELECT queries. -
Under Routines, select the stored procedures and functions
that should be accessible via the API endpoints.
- For Procedure Name, choose the stored procedures that the API endpoint can access.
- For Function Name, choose the functions that custom SELECT queries can access.
See the Stored Procedures section in the API Docs tab for more details about accessing stored procedures and functions.Restriction: You must choose at least one table or procedure to create an API endpoint for. -
Set up the Authentication details to access the API
endpoints.
-
In the Summary step, preview the settings for the service.
Select Back to make changes. You can also edit your
selections and choices after you create the service as needed.
- Select Create Service to create the service.