Skip to content

Latest commit

 

History

History
72 lines (49 loc) · 3.99 KB

private-data-apis.md

File metadata and controls

72 lines (49 loc) · 3.99 KB
description
Overview of User Data APIs with links to full documentation

Private Data APIs

{% hint style="warning" %} Verida Private Data APIs are currently in private alpha to early builders. {% endhint %}

Verida supports a network of decentralized, confidential APIs to simplify access to data stored within decentralized accounts on the Verida Network.

{% hint style="info" %} Quick links:

These APIs enable developers to enable their third party applications to access the following services for a given Verida Account:

  1. Databases
    1. Query a user database
    2. Fetch a database record
    3. Watch (live stream) changes to a database
  2. Datastores
    1. Query a user datastore
    2. Fetch a datastore record
    3. Watch (live stream) changes to a datastore
  3. Large Language Models (Artificial Intelligence)
    1. Basic prompt
    2. Personal prompt

These APIs are currently read only, but will be expanded in the future to support:

  1. Writing data
  2. Accessing third party services (ie: send an email, order an Uber, send a Telegram message)

Hot Loading User Data

User data is "hot loaded" onto a confidential compute node on-demand. Within the secure enclave, user data is syncronized from the Verida network, decrypted and then loaded into memory for rapid access via API endpoints.

User data is then processed and made available in a variety of different ways:

  • Traditional database queries
  • Keyword search with ranking, filtering etc.
  • AI prompt with RAG access to user data

{% hint style="info" %} In the future, we plan to expand the types of user data services available. For example; adding vector database support. {% endhint %}

User Data remains in memory on the compute node while a user (or authorized application) is actively making API requests. If there are no requests for 30 minutes, the data in memory will be deleted and need to be hot-loaded again in the future.

Authorization

The current authentication method expects the private key for an end user to be supplied via a key header in all requests. See User Data API Authorization. This will be changing (see below for Upgrade to OAuth).

User Data APIs are running on Verida Confidential Compute nodes that are running in a secure enclave, so the private key is always kept secure. See privacy-and-security.mdfor more information.

Authorization: Upgrade to OAuth

Authorization will be upgraded to support OAuth2.0 with scopes. This will allow users to authorize any third party application to access their user data via the User Data APIs, revoke access while controlling exactly what data and services the third party application has access to.

{% hint style="info" %} This is targeted for release in Q4 2024. {% endhint %}

API Playground

You can connect your Verida Account to the API Playground to learn how to use the APIs within your web browser.