...
You can configure access to the mysql database in a ./src/ui2/config.php file (The data should match those given in the section Creating db schema and Installation of MySQL/MariaDB).
Also configuration of API databases access should be similarly adapted:
Code Block |
---|
./src/config_scheduler_db.php |
After all, restart the apache server:
Code Block |
---|
> service apache2 restart |
Access to databases by API
The latest version of the API allows communication with many databases through one unified interface.
Thanks to this, there is no need to create a separate API instance for each database on the server side.
The client can query one WS address to have access to all databases available on the server.
In the client's SOAP request header, the variable Qdb contains the database name.
The diagram below shows how this mechanism works:
Mermaid |
---|
sequenceDiagram
Client->>Catalog API: SOAP request [Qdb header variable contains the name db]
Catalog API->>Scheduler DB: ask for DB configuration
Scheduler DB->>Catalog API: send DB configuration
Catalog API->>Catalog API: switch to chosen DB
Catalog API->>Chosen DB: request/command to execute
Chosen DB->>Chosen DB: execute request/command
Chosen DB-->>Client: send feedback |
The API reads the Qdb variable from the header only if the server needs this information. Otherwise, server ignores client's header.