Skip to content

Record an installed extension (owner only): what datanotes extension install writes.

POST
/datanotes/extensions/record/
curl --request POST \
--url https://example.com/datanotes/extensions/record/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Datanotes-Actor: {"harness":"my-script","model":"","session":"s-1"}' \
--data '{ "name": "example", "version": "example", "description": "example", "api": 1, "source": { "kind": "git", "url": "example", "ref": "example", "path": "example" }, "commit": "example", "manifest_sha256": "example", "entry_sha256": "example", "token": "example", "tables": { "additionalProperty": { "table": "example", "owned": true, "columns": { "additionalProperty": "example" }, "absent": [ "example" ] } }, "tools": [ "example" ], "write": [ "example" ], "migration_id": "example", "installed_at": "example", "updated_at": "example", "previous": "example" }'
X-Datanotes-Actor
string

JSON: on whose behalf the write is made, recorded in the journal (harness, model, session).

Example

{"harness":"my-script","model":"","session":"s-1"}
Media typeapplication/json

An installed extension as the registry keeps it (datanotes extension install writes it).

object
name
required

2 to 40 lowercase letters, digits or -, starting with a letter.

string
version
required
string
description
required
string
api
required

The module API version the extension’s entry file exports.

integer
source
required
object
kind
required
string
Allowed values: git local
url

Git: the URL as given.

string
ref

Git: the tag or commit id given (or the newest tag chosen).

string
path

Local: the absolute folder, with / separators.

string
commit
required

The git commit id (40 hex), or local-<12 hex> for a folder.

string
manifest_sha256
required
string
entry_sha256
required
string
token
required

The extension’s named token: ext-.

string
tables
required

Each role of the manifest, bound to a qualified table.

object
key
additional properties
object
table
required

The qualified table bound to the role.

string
owned
required

True for a role the extension owns.

boolean
columns

Dependency roles: manifest column to the user’s column, only where they differ.

object
key
additional properties
string
absent

Dependency roles: optional manifest columns the bound table does not have.

Array<string>
tools
required
Array<string>
write
required

The token’s write patterns (qualified table names).

Array<string>
migration_id
required

The batch that brought the database from previous to this record.

string | null
installed_at
required
string
updated_at
required
string
previous
required
Any of:
object recursive

Done.

Media typeapplication/json
object
extension

An installed extension as the registry keeps it (datanotes extension install writes it).

object
name
required

2 to 40 lowercase letters, digits or -, starting with a letter.

string
version
required
string
description
required
string
api
required

The module API version the extension’s entry file exports.

integer
source
required
object
kind
required
string
Allowed values: git local
url

Git: the URL as given.

string
ref

Git: the tag or commit id given (or the newest tag chosen).

string
path

Local: the absolute folder, with / separators.

string
commit
required

The git commit id (40 hex), or local-<12 hex> for a folder.

string
manifest_sha256
required
string
entry_sha256
required
string
token
required

The extension’s named token: ext-.

string
tables
required

Each role of the manifest, bound to a qualified table.

object
key
additional properties
object
table
required

The qualified table bound to the role.

string
owned
required

True for a role the extension owns.

boolean
columns

Dependency roles: manifest column to the user’s column, only where they differ.

object
key
additional properties
string
absent

Dependency roles: optional manifest columns the bound table does not have.

Array<string>
tools
required
Array<string>
write
required

The token’s write patterns (qualified table names).

Array<string>
migration_id
required

The batch that brought the database from previous to this record.

string | null
installed_at
required
string
updated_at
required
string
previous
required
Any of:
object recursive

Example

{
"extension": {
"source": {
"kind": "git"
}
}
}

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"
}