The Polystore API component is responsible both for providing to external systems a variety of endpoints serving the platform’s core functionalities and for orchestrating the other components within the Polystore accordingly. If the analytics component is used, it is responsible for populating appropriate queues with incoming queries. It is also responsible for orchestrating the initialization of the databases through the QL Server. It forwards authenticated Typhon QL queries to the QL Server and prepares the responses containing the unified query results. Simple CRUD operations for declared entities are also available through the API, using the QL Server. Moreover, it handles all Metadata Database operations required for user management, model versioning etc. It is implemented using the Java programming language and the Spring Enterprise Applications Framework.
The following functions are all available through the REST HTTP API:
- User Services (Register, GetAll, Get, Delete)
- Model Services (Get/Set DL and ML model)
- Query Services (Select, Insert, Update and Batch)
- Databases Services (Connection info & status)
- Backup/Restore Services (Backup and Restore for MariaDB and Download by user)
- Status Services (Up, Down and Current status)
- /api/resetdatabases : Reset Databases
- /api/status : Check API's status
- /api/down : Turn API off
- /api/up : Turn API on
- /api/users : Get all users
- /api/user/register : Register user
- /api/user/{username} : Get user by username
- /api/user/{username} : Update user by username
- /api/user/{username} : Delete user
- /api/model/ml : Get ML
- /api/model/dl : Get DL
- /api/model/ml : Set ML
- /api/model/dl : Set DL
- /api/databases : Get Polystore Databases
- /api/services : Get Polystore Services
- /api/query : Execute Select Query
- /api/update : Execute Insert/Update/Batch Query
- /api/ddl : Execute DDL command
- /api/noAnalytics/query : Execute Select Query bypassing analytics
- /api/noAnalytics/update : Execute Insert/Update/Batch Query bypassing analytics
Based on the ML example provided on the QL User Manual, there is a Postman collection to execute every function of the API. The collection can be found here.