Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add /lookup/doc endpoint #47

Open
tahpot opened this issue Nov 28, 2022 · 1 comment
Open

Add /lookup/doc endpoint #47

tahpot opened this issue Nov 28, 2022 · 1 comment
Assignees
Milestone

Comments

@tahpot
Copy link
Member

tahpot commented Nov 28, 2022

Fetching a stored public document on the Verida network can be time consuming as they make a blockchain request. They also require the Verida SDK.

Create an endpoint on the storage node (/lookup/doc/${docUri}) that fetches the public document and returns it. This will be cached.

Example docUri: verida://${did}/${contextHash}/${databaseName}/$documentId

Example requests:

  • /lookup/doc?uri=urlEncode('verida://${did}/${contextHash}/${databaseName}/$documentId')
  • /lookup/doc?uri=urlEncode('verida://${did}/${contextHash}/${databaseName}/$documentId'?ignoreCache=true)
@tahpot tahpot self-assigned this Nov 28, 2022
@tahpot tahpot modified the milestones: v2.0.0, v2.1.0 Jan 13, 2023
@tahpot
Copy link
Member Author

tahpot commented Feb 10, 2023

Perhaps extend this to support fetching multiple documents.

Then you could easily fetch a full public profile at once.

Ideally it's possible to return an actual image for an avatarUri

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant