Create a view on a database
Creates a table, board, timeline, calendar or other view over the database from the given manifest, and files it in the sidebar tree when `itemId` or `parentItemId` is supplied. A shared view requires the `views:write` permission while a personal one only needs `views:read`; giving the view a sidebar row also requires `resources:write`, and only workspace owners and admins may create a locked view.
apiKeyAuthorizationBearer <snoze_sk_…>Workspace API key created in Workspace settings → API keys. Scopes on the key bound what it can read and write.
workspaceId*stringdatabaseId*stringapplication/json- body
id?|nullkey?string|nulllabel*stringkind*string"table""list""board""kanban""gallery""calendar""timeline""gantt""chart"placement?|nullmanifest?|nullscope?|nulllocked?boolean|nullrelationFieldId?string|nullitemId?|nullparentItemId?|nullclientMutationId?string|nullSuccess
application/json- response
data*curl -X POST 'https://api.snoze.dev/v1/workspaces/string/databases/string/views' \ -H 'Content-Type: application/json' \ -d '{ "label": "string", "kind": "table"}'{ "data": { "id": "string", "workspaceId": "string", "databaseId": "string", "key": "string", "label": "string", "kind": "table", "placement": "database", "manifest": {}, "relationFieldId": "string", "ownerUserId": "string", "scope": "shared", "locked": true, "definitionVersion": 0, "createdAt": "string", "updatedAt": "string" }}List the views of a database
Returns the database's shared views plus the caller's own personal views, each with its kind and manifest - the columns, filters, sorts and grouping that define it. Requires the `views:read` permission on the database.
Update a view's definition
Applies a change to the view's label, kind, manifest, scope, placement or source database. `expectedVersion` must match the view's current `definitionVersion`, so a stale edit is rejected as a conflict rather than overwriting a concurrent one. Editing a shared view needs the `views:write` permission, changing its placement also needs `resources:write`, and locking a view is reserved to workspace owners and admins.