4. Retrieve Records

To retrieve records from SecretVault, fetch data from your cluster's nodes, then decrypt any encrypted fields using zylQL to reconstruct the original data.

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. Retrieve Records

Retrieve records from a collection by calling the Read Data endpoint (POST /data/read) with the schema id and optionally a filter. If you don't pass in a filter, all records will be returned.

Using a filter

A filter can be a basic match (e.g. "status": "active"), a comparison (e.g. "age" : { "$gte": 30}) or something more complex.

Examples for retrieving records

Retrieved records will have:

  • Plaintext fields with identical values across nodes

  • Encrypted fields as shares that need zylQL to decrypt and reconstruct values from all nodes

Other operations on records

  • Update Data endpoint (also supported via the secretvaults JS+Python wrappers)

  • Delete Data endpoint (also supported via the secretvaults JS+Python wrappers)

  • Flush Data endpoint

  • Tail Data endpoint

Last updated