Skip to content

Conversation

@miparnisari
Copy link
Contributor

Description

Closes #95

@vercel
Copy link

vercel bot commented Dec 10, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
docs Ready Ready Preview Comment Dec 10, 2025 1:44am


# Querying Data

This page walks through the main ways to query data in SpiceDB. The options are listed from most preferred to least preferred, but the right choice always depends on your use case.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is preferred the right word here? IMO, it implies the LookupResources API is not preferable?


You can debug a check locally with `zed permission check resource:someresource somepermission user:someuser --explain` to see how the decision was made.

When your schema uses caveats and you don't provide all the required context in the request parameters, the API will tell you that in the response that the result is "conditional" instead of simply denying or allowing, and it's up to you to inspect that result.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


## LookupResources

[`LookupResources`](https://buf.build/authzed/api/docs/main:authzed.api.v1#authzed.api.v1.PermissionsService.LookupResources) is a good choice when you need to find all resources of a given type that a specific subject can access. It supports pagination and works well for moderate result sizes.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the Protecting A List Endpoint page we say: "If the number of resources that a user has access to is sufficiently large and LookupResources can’t satisfy the use case anymore, another approach is to fetch a page of results and then call CheckBulkPermissions to determine which of the resources are accessible to the user."

This might contradict what's on this page

Copy link
Contributor

@sohanmaheshwar sohanmaheshwar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yay! this page is much needed. Added a couple of comments.

I think we need to align on the messaging across CheckBulkPermission and LookupResources . We've had mixed messaging out for this in the RAG usecases as well. Maybe Cormac can help us out with this

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

Successfully merging this pull request may close these issues.

document x-request-id header

3 participants