Skip to content

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.

POST
/datanotes/tokens/permissions/
curl --request POST \
--url https://example.com/datanotes/tokens/permissions/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "name": "example" }'
Media typeapplication/json
object
name

One token; absent: every token.

string

Example generated

{
"name": "example"
}

Done.

Media typeapplication/json
object
objects
required

The tables (sorted), then the views (sorted).

Array<object>
object
name
required

The qualified name (catalog.schema.name).

string
kind
required
string
Allowed values: table view
reads

A view: the tables its query reads (sorted).

Array<string>
reads_complete

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.

boolean
tokens
required
Array<object>
object
name
required
string
read
required

Its read patterns (["*"]: every table).

Array<string>
write
required
Array<string>
ddl
required
boolean
maintain
required
boolean
access
required

One entry per object, in the order of objects.

Array<object>
object
object
required
string
read
required
boolean
write
required

Always false for a view.

boolean
read_pattern

The first read pattern that matches the name, when the object is readable.

string
write_pattern

The first write pattern that matches the table.

string
reason

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).

string

Example

{
"objects": [
{
"kind": "table"
}
]
}

Bad input: the body is not a JSON object, or an argument is unknown, missing or of the wrong type.

Media typeapplication/json
object
error
required

What went wrong, for a person or an agent.

string

Example generated

{
"error": "example"
}

Missing or wrong bearer token.

Media typeapplication/json
object
error
required

What went wrong, for a person or an agent.

string

Example generated

{
"error": "example"
}

A named token beyond its permissions (the engine’s administration, tables outside its write patterns, schema changes without ddl).

Media typeapplication/json
object
error
required

What went wrong, for a person or an agent.

string

Example generated

{
"error": "example"
}

Unexpected error.

Media typeapplication/json
object
error
required

What went wrong, for a person or an agent.

string

Example generated

{
"error": "example"
}