Supero Platform team Supero team
@supero-platform · joined 3 days ago
APIs, auth, tenancy and access control.
- Questions
- 6
- Answers
- 31
- Accepted
- 31
- Entity added in a regeneration is writable by every userAccepted
A new entity has no rule of its own, so it gets the role's default_access. App Studio most often generates default_access="full" for tenant_admin and…
- Making sure the in-app agent can't delete invoicesAccepted
Take the permission away from the role. The agent runs as the signed-in user, with their token, through the same access checks as the rest of the app. A role…
- `/ai/v1/chat` returns 401 with an API key that works for CRUDAccepted
The AI Agent API doesn't accept X-API-Key. Every /ai/v1/* route needs Authorization: Bearer <jwt>, the token from POST /api/v1/auth/login: The agent has no…
- Keeping Stripe and SendGrid keys out of the frontendAccepted
Provider credentials belong in the service's config on the platform, not in your app's files. Set them with PUT /api/v1/services/{service_id}/config (the…
- Modelling a many-to-many relation (students and courses)Accepted
Don't add uuid fields to express a relationship. Declare it in references[] on one side with cardinality many and a reverse name: The platform manages the…
- GET by UUID returns 404 for a record I can see in the consoleAccepted
That's owner scoping. The customer's role has an access_rule on appointment with filter_field and filter_match set, for example customer_email matched to…
- Role still reads an entity after setting `default_access: "none"`Accepted
default_access: "none" stops writes to entities that have no rule. It doesn't stop reads: an entity with no rule stays readable (the read is logged). To…
- `access_token` is undefined after a successful loginAccepted
The login response isn't flat. It has four blocks, auth, user, context and policy, and the tokens sit inside auth: The refresh call is shaped differently. You…
- Moving records from one project to anotherAccepted
There's no move. fq_name, parent_type and parent_uuid are fixed after create, so a record can't change project. Copy it instead: read from the source project,…
- `GET /api/v1/tenants?status=pending` returns nothingAccepted
status has no pending value. A tenant's status is active, suspended or archived, plus pending_setup, which is reserved and never written. The create endpoint…
- Support dashboard that reads across every customer tenantAccepted
Cross-tenant reads come from the role, not from parameters. tenant_admin, tenant_user and viewer are clamped to their own tenant on every list and query, and…
- Linking an order to a customer after both existAccepted
Declare the link in the order schema's references[], then add it with ref-update: operation is ADD, UPDATE or DELETE. For many edits in one call, PUT…
- Coming from Firestore: how do I model subcollections?Accepted
The closest equivalent is a parent relationship. Set parent_type on the child schema to the container schema's bare name (customer), then pass the parent when…
- Showing a total count next to a filtered listAccepted
/query returns only success, results and result_count. It has no pagination object, so there's nowhere for a total to go. For the list itself, use POST…
- `sort_by` in a /query body is ignoredAccepted
/query sorts with a sort array. sort_by and sort_order belong to GET list and POST /list-bulk. Each endpoint drops the other's spelling without an error, so…
- Client staff need admin access to their app, but not to billing or our other clientsAccepted
Make them a project_admin in that client's project. A project_admin manages every tenant in its own project and handles schema management, but can't see other…
- Choosing a base role for a custom roleAccepted
base_role is tenant_admin, tenant_user or viewer, and it is the most the custom role can do. You can't reuse a built-in role's name. Someone who needs…
- Which accounts can use Google Sign-InAccepted
Google Sign-In is for the app's end users: the tenant_user, viewer, customer, user, member and guest roles. Admin and custom roles sign in with a password. It…
- Inviting admins without choosing their passwordAccepted
Call POST /api/v1/users/register with require_activation: true. The user is created disabled and is emailed a code. They complete activation with POST…
- Removing a user from an appAccepted
Disable the user: PUT /api/v1/users/{uuid}/disable (and /enable to undo it). To move someone to another tenant, use POST /api/v1/users/{uuid}/move-to-tenant.
- How long do access and refresh tokens last?Accepted
Access tokens last 8 hours (expires_in: 28800) and refresh tokens 7 days. Refresh with POST /api/v1/auth/refresh and end the session with POST…
- Changing a record's fq_name after createAccepted
uuid, fq_name, created_at, updated_at, parent_type and parent_uuid are fixed after create. An update that includes them drops those fields and saves the rest,…
- Max page size for list callsAccepted
The maximum is 1,000, and larger values are clamped to 1,000. The default of 50 only applies once you send some pagination parameter. A request with no…
- Branching on `error_code` in client retry logicAccepted
Branch on error_code when it's present and fall back to the HTTP status when it isn't. Creates always carry one (for example ALREADY_EXISTS,…
- "Invalid UUID format" when passing a project nameAccepted
Path identifiers are UUIDs. Convert the name with POST /api/v1/crud/{domain}/fq-name-to-uuid first.
- GET list returns `[]` for a domain adminAccepted
A GET list is scoped to the project in your token, which for a new account is default-project, even for a domain admin. The project and tenant query…
- Where your app's end users sign inAccepted
app.supero.dev is the console for people building apps. Your app's users sign in to the app itself, at its preview or live URL. Send the tester that link.
- Reading batch create results: created, failed and skipped rowsAccepted
For a batch, the body is the result, not the status code. The errors list holds only the first 10 failures, each cut to 200 characters. Processing stops after…
- Writing immediately after a schema uploadAccepted
A write made right after an upload can briefly be refused while the new schema becomes visible. The SDKs retry this for you; with raw HTTP, retry the first…
- 401 when sending an API key as `Authorization: Bearer`Accepted
Send API keys in X-API-Key. Authorization: Bearer is for the JWT you get back from login; a key sent as Bearer gets 401. Send only one credential header. A…