Skip to main content

Uploading & Querying Data

  1. The two main operations for a user are:
    • Uploading / Reading Data (SecretVault)
    • Running Queries on the Data (SecretDataAnalytics)
  2. To achieve these, we are to communicate with all the nodes in use by the org via REST API endpoints, using the previously generated Bearer tokens for authentication.
  3. An org can always retrieve information on all their schemas and queries using the GET /schemas and GET /queries endpoints (detailed information in the API Reference page).
  4. Below are a couple simple examples on using the POST /data/create, POST /data/read and POST queries/execute endpoints. The format of these requests, and especially for uploading data, must match the JSON schema definition of the target schema.
info
  • You’ll have to provide an _id field of UUIDv4 type for all newly created records. This is because the nodes are completely independent and agnostic of each other, and we'll need a point of reference to reconstruct the encrypted data.
  • Also note that all records are also getting internal _created and _updated fields automatically assigned and filled that can be used on queries.
nildb/secretvault_python/nildb_api.py
loading...