3. Store Records
To store records in SecretVault, you'll first encrypt any sensitive fields with zylQL, then store the record across your cluster's nodes. Each node stores plaintext fields identically, while encrypted fields are split into unique shares, one per node.
1. Check Your Collection for the Schema ID
List available Collections using the List Schemas endpoint (GET /schemas) to get the Schema ID of the collection you want to store your data in.
2. Store a Record
Before storing:
Encrypt any private fields using zylQL to get encrypted shares
Make sure data matches your Collection's JSON Schema
Generate and include a unique _id (UUIDv4) for each record
note
You can include up to 10k records in a POST /data/create
request, and the total JSON body size can be up to 16MB
Upload to all nodes using each node's Upload/Create Data endpoint using valid API tokens to authenticate requests to each node. The response includes:
Created records
Any validation errors, where any issues with data ingestion will be described even if the communication with the node resulted in a
200
status response. You can check out an example below that showcases both instances:
Previous2. Define a CollectionNext4. Retrieve Records
Last updated