Query Database
How to perform read operations on your Arcsec database
Querying your Arcsec database allows you to perform read and wrtie operations and retrieve data securely. This operation involves decrypting the existing data before either sending it back to you or updating it.
This operation is handled by the /api/read-database endpoint and the /api/update-database in the backend respectively, however that endpoints are not intended for external use. To query your database programatically, use the /api/query endpoint. For more details on hwo to use the /api/query endpoint, see the API documentation.
API Route
- Route:
/api/read-operations - Route:
/api/update-operations - Operation:
read - Operation:
write
Key Operations
When querying the database using SQL queries in the UI (via the above endpoints), the following operations are performed:
- Authenticate the request
- Decrypt the stored data
- Indenity the query type (read or write)
- Execute the query and return results
- In case the query is a write operation, encrypt the data and reuplad the stored data to IPFS.
Usage
You can query your database both using the UI interface and the API. To query your database using the UI, simply navigate to the "Query" tab and write your SQL query. You will be able to see the results of your query in the "Browse" tab. To query your database using the API, you can use the /api/query endpoint. For more details on how to use the /api/query endpoint, see the API documentation.