Multi-tenant isolation is available on Pro and Enterprise tiers.
Overview
If you’re building a product that serves multiple customers, you need their cached snippets to be completely isolated. Customer A should never see Customer B’s code. Raysurfer workspaces provide this isolation. Each workspace is a completely separate cache — snippets uploaded to one workspace can never be retrieved from another.Setup
Pass your customer’s ID asworkspace_id:
Low-Level API
For direct snippet management, passworkspace_id either at the client level or per-method:
Example: Multi-Tenant App
FAQ
Can snippets leak between workspaces?
No. Workspaces are completely isolated. There is no code path that allows cross-workspace access.What if I don’t set a workspace_id?
Your organization’s shared cache is used. All users in your org see the same snippets — fine for internal use, but not for multi-tenant scenarios.What does a workspace actually control?
A workspace is just a cache partition — it siloes which cached code snippets are visible, nothing more. Raysurfer does not manage your underlying permissions (database access, column-level security, API scopes, etc.). Your application decides whichworkspace_id to assign each user based on whatever
permission model you already have.
For example, if user A can query columns M and N, and user B can query columns
M, N, O, and P, give them different workspace IDs (e.g. "mn" and "mnop").
User A’s cached scripts will only ever reference their allowed columns, and
user B’s are completely separate. Raysurfer guarantees no cross-workspace
leakage — your app still enforces the actual data permissions.
What should I use as the workspace_id?
Any string that uniquely maps to a permission boundary — a customer ID, a role name, a hash of allowed scopes, or a permission profile key. It’s an arbitrary string you choose.How does workspace search work?
When you provide aworkspace_id, Raysurfer searches both the workspace
namespace and the org-wide namespace in parallel, merges results by score,
and returns the top results. This means workspace-specific snippets compete
on equal footing with company-wide snippets.
