Nodes are the primary resource in BaBel+. They represent individual content items — books, films, articles, videos, courses, or video games — and carry rich metadata such as status, priority, tags, author, and year. Every other resource (relations, list memberships) references nodes by their UUIDDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/DrDigett/Babel/llms.txt
Use this file to discover all available pages before exploring further.
id. These endpoints let you create, retrieve, update, and delete nodes programmatically.
Node TypeScript interface
The canonical shape of a node as defined in the shared package:tags is stored in the database as a JSON-serialised string (e.g. "[\"filosofia\",\"posmodernismo\"]"). The API returns it in that form; parse it with JSON.parse() on the client if you need an array.GET /api/nodes
List all nodes. Optionally filter bytype and/or status using query parameters. Results are returned in insertion order (no guaranteed sort unless combined with client-side sorting).
Query parameters
Filter by node type. Must be one of:
libro, pelicula, articulo, video, curso, videojuego. Omit to return all types.Filter by lifecycle status. Must be one of:
pendiente, en_progreso, terminado, abandonado. Omit to return all statuses.Response
Returns a JSON array ofNode objects. Returns an empty array [] when no nodes match the filter.
Array of node objects. See the Node interface above for field definitions.
Example
GET /api/nodes/:id
Retrieve a single node by its UUID.Path parameters
The UUID of the node to retrieve.
Response
UUID of the node.
Display title.
Content type:
libro, pelicula, articulo, video, curso, or videojuego.Long-form description, or
null if not set.Lifecycle status:
pendiente, en_progreso, terminado, or abandonado.Priority level:
alta, media, or baja.JSON-serialised array of tag strings, or
null.Author or creator name, or
null.Publication or release year, or
null.External URL, or
null.Path to a local file, or
null.Numeric rating, or
null.ISO 8601 creation timestamp.
ISO 8601 last-update timestamp.
Errors
| Status | Body | Condition |
|---|---|---|
404 | { "error": "not found" } | No node with the given ID exists |
Example
POST /api/nodes
Create a new node. The server auto-generates a UUIDid and sets both createdAt and updatedAt to the current UTC time. Returns the created node with status 201 Created.
Request body
Display title of the node. Maximum 500 characters. Whitespace is trimmed automatically.
Content type. If provided, must be one of:
libro, pelicula, articulo, video, curso, videojuego.Long-form description or notes. Maximum 5 000 characters. Silently truncated to 5 000 if longer.
Lifecycle status. Default:
pendiente. One of: pendiente, en_progreso, terminado, abandonado.Priority level. Default:
media. One of: alta, media, baja.Array of tag strings. Maximum 50 items; extra items are silently dropped.
Author or creator name. Maximum 300 characters.
Publication or release year as an integer. Must be in the range −5 000 to 3 000.
External URL. Maximum 2 000 characters.
Path to a local file on the server’s filesystem. Maximum 500 characters.
Response
Returns201 Created with the full Node object, including the generated id, createdAt, and updatedAt fields.
Errors
| Status | Body | Condition |
|---|---|---|
400 | { "error": "title is required" } | title is missing, empty, or not a string |
400 | { "error": "title too long (max 500)" } | title exceeds 500 characters |
400 | { "error": "invalid type, must be one of: ..." } | type is not a valid NodeType |
400 | { "error": "invalid status, must be one of: ..." } | status is not a valid NodeStatus |
400 | { "error": "invalid priority, must be one of: ..." } | priority is not a valid NodePriority |
400 | { "error": "invalid year" } | year is not a number or is outside −5 000 – 3 000 |
Example
PUT /api/nodes/:id
Partially update an existing node. Only fields present in the request body are changed — omitted fields retain their current values.updatedAt is always refreshed to the current UTC time regardless of which fields are updated.
Path parameters
The UUID of the node to update.
Request body
All fields are optional. Include only the fields you want to change. The same constraints fromPOST /api/nodes apply to each field.
New title. Trimmed and truncated to 500 characters. Cannot be set to an empty string.
New content type. One of:
libro, pelicula, articulo, video, curso, videojuego.New description. Pass
null to clear. Truncated to 5 000 characters.New lifecycle status. One of:
pendiente, en_progreso, terminado, abandonado.New priority. One of:
alta, media, baja.Replacement tag array. Replaces the entire tags value (not merged). Pass an empty array
[] to clear.New author. Pass
null to clear. Truncated to 300 characters.New year. Pass
null to clear. Range −5 000 to 3 000.New URL. Pass
null to clear. Truncated to 2 000 characters.New local file path. Pass
null to clear. Truncated to 500 characters.New rating. Pass
null to clear.Response
Returns200 OK with the full updated Node object as re-fetched from the database.
Errors
| Status | Body | Condition |
|---|---|---|
400 | { "error": "title cannot be empty" } | title is provided but is an empty or blank string |
404 | { "error": "not found" } | No node with the given ID exists |
Example
DELETE /api/nodes/:id
Delete a node permanently. The database schema usesON DELETE CASCADE on both the relations table and the list_nodes junction table, so all relations and list memberships that reference this node are automatically removed in the same operation.
Path parameters
The UUID of the node to delete.
Response
Returns200 OK with a confirmation object. The endpoint does not return a 404 if the node does not exist — the delete is a no-op and still returns success.
Example
Deletion is irreversible. All relations connecting this node to other nodes, and all list memberships for this node, are cascade-deleted automatically. There is no soft-delete or recycle bin in the current version.