Every table and view, and what each named token may read and write in it (owner only): the permission matrix, as the engine applies it.
const url = 'https://example.com/datanotes/tokens/permissions/';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/datanotes/tokens/permissions/ \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "example" }'Authorizations
Section titled “Authorizations”Request Body
Section titled “Request Body”object
One token; absent: every token.
Example generated
{ "name": "example"}Responses
Section titled “Responses”Done.
object
The tables (sorted), then the views (sorted).
object
The qualified name (catalog.schema.name).
A view: the tables its query reads (sorted).
A view: false when the tables it reads are known only when it runs (base:, within, {this.*}): listings then hide it from a token with read patterns.
object
Its read patterns (["*"]: every table).
One entry per object, in the order of objects.
object
Always false for a view.
The first read pattern that matches the name, when the object is readable.
The first write pattern that matches the table.
Why a view is not readable: its name matches no read pattern, the tables it reads are known only when it runs, or it reads tables the token may not read (named).
Example
{ "objects": [ { "kind": "table" } ]}Bad input: the body is not a JSON object, or an argument is unknown, missing or of the wrong type.
object
What went wrong, for a person or an agent.
Example generated
{ "error": "example"}Missing or wrong bearer token.
object
What went wrong, for a person or an agent.
Example generated
{ "error": "example"}A named token beyond its permissions (the engine’s administration, tables outside its write patterns, schema changes without ddl).
object
What went wrong, for a person or an agent.
Example generated
{ "error": "example"}Unexpected error.
object
What went wrong, for a person or an agent.
Example generated
{ "error": "example"}