Record an installed extension (owner only): what datanotes extension install writes.
const url = 'https://example.com/datanotes/extensions/record/';const options = { method: 'POST', headers: { 'X-Datanotes-Actor': '{"harness":"my-script","model":"","session":"s-1"}', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"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"}'};
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/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" }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”JSON: on whose behalf the write is made, recorded in the journal (harness, model, session).
Example
{"harness":"my-script","model":"","session":"s-1"}Request Body
Section titled “Request Body”An installed extension as the registry keeps it (datanotes extension install writes it).
object
2 to 40 lowercase letters, digits or -, starting with a letter.
The module API version the extension’s entry file exports.
object
Git: the URL as given.
Git: the tag or commit id given (or the newest tag chosen).
Local: the absolute folder, with / separators.
The git commit id (40 hex), or local-<12 hex> for a folder.
The extension’s named token: ext-
Each role of the manifest, bound to a qualified table.
object
object
The qualified table bound to the role.
True for a role the extension owns.
Dependency roles: manifest column to the user’s column, only where they differ.
object
Dependency roles: optional manifest columns the bound table does not have.
The token’s write patterns (qualified table names).
The batch that brought the database from previous to this record.
Responses
Section titled “Responses”Done.
object
An installed extension as the registry keeps it (datanotes extension install writes it).
object
2 to 40 lowercase letters, digits or -, starting with a letter.
The module API version the extension’s entry file exports.
object
Git: the URL as given.
Git: the tag or commit id given (or the newest tag chosen).
Local: the absolute folder, with / separators.
The git commit id (40 hex), or local-<12 hex> for a folder.
The extension’s named token: ext-
Each role of the manifest, bound to a qualified table.
object
object
The qualified table bound to the role.
True for a role the extension owns.
Dependency roles: manifest column to the user’s column, only where they differ.
object
Dependency roles: optional manifest columns the bound table does not have.
The token’s write patterns (qualified table names).
The batch that brought the database from previous to this record.
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.
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"}