Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/No-Country-simulation/G9-LATAM-Team-58/llms.txt

Use this file to discover all available pages before exploring further.

The /contents family of endpoints exposes Mindloom’s stored knowledge corpus for reading. GET /contents returns a paginated, filterable list of content summaries — lightweight objects suited for index views and search results. GET /contents/{id} returns the complete detail record for a single item, including the full body text, classification metadata, and explainability fields. Both endpoints require a configured database; if the API is running in scaffold mode, both return 503.

GET /contents — List content items

Retrieves a paginated list of content summaries. Supports optional filtering by category name and a keyword search across title and body. All query parameters are optional.

Endpoint

GET /contents

Query parameters

category
string
Filter results to items belonging to this category. Must match a category name exactly (e.g. Backend, Bases de datos). When omitted, items from all categories are returned.
q
string
Keyword filter applied to item titles and bodies. When omitted, no keyword filtering is applied.
sort
string
default:"\"\""
Sort order for the result list. Defaults to an empty string (implementation-defined default ordering).
page
integer
default:"0"
Zero-based page number. The first page is 0.
size
integer
default:"20"
Number of items to return per page. Defaults to 20.

Example request

curl 'http://localhost:8080/contents?category=Backend&page=0&size=10'

Response — 200 OK

total
number
Total number of items matching the current filters, across all pages.
items
object[]
Array of content summary objects for the current page.

Example response

{
  "total": 142,
  "items": [
    {
      "id": "devto-4821",
      "title": "Intro to Spring Boot",
      "category": "Backend",
      "source": "user",
      "language": "es",
      "addedAt": "2026-07-28T10:32:41Z"
    }
  ]
}

GET /contents/ — Get content detail

Retrieves the full detail record for a single content item, including its body text and all classification metadata.

Endpoint

GET /contents/{id}

Path parameters

id
string
required
The unique identifier of the content item to retrieve (e.g. usr-9f3c1e0a-42b8-4d17-9a55-7c0e1b2d3f44).

Example request

curl http://localhost:8080/contents/usr-9f3c1e0a-42b8-4d17-9a55-7c0e1b2d3f44

Response — 200 OK

ContentDetail extends ContentSummary with the following additional fields. All ContentSummary fields (id, title, category, source, language, addedAt) are also present.
body
string
The full text of the content item.
probability
number | null
The classifier’s confidence score for the assigned category (01), or null for seeded corpus items that were not processed through the /predict inference pipeline.
keywords
string[]
Top TF-IDF keywords extracted from the body at ingestion time.
explanation
string[]
Top terms from the baseline classifier that drove the category decision at ingestion time.
url
string | null
The original URL of the content item, if it was sourced from an external corpus. null for user-submitted items.
Seeded corpus items (those with source"user") have probability: null because they were pre-loaded directly into the database without being run through the inference service’s /predict endpoint. All other classification fields (category, keywords, explanation) are populated at load time using a separate offline process.

Example response

{
  "id": "usr-9f3c1e0a-42b8-4d17-9a55-7c0e1b2d3f44",
  "title": "Intro to Spring Boot",
  "body": "Spring Boot makes it easy to create stand-alone REST APIs with Java.",
  "category": "Backend",
  "probability": 0.91,
  "keywords": ["spring", "boot", "java"],
  "explanation": ["spring", "boot"],
  "source": "user",
  "url": null,
  "language": "es",
  "addedAt": "2026-07-28T10:32:41Z"
}

Error responses

All errors follow the ApiError envelope defined in GlobalExceptionHandler. Every error response contains three fields:
FieldTypeDescription
errorstringMachine-readable error code (e.g. NOT_FOUND, INTERNAL_ERROR).
messagestringHuman-readable description of what went wrong, in Spanish.
timestampstringISO 8601 UTC timestamp of when the error was generated (e.g. "2026-07-28T10:32:41.123456Z").
HTTP Statuserror codeWhen it occurs
404 Not FoundNOT_FOUNDNo content item with the given id exists in the database. Applies to GET /contents/{id} only.
503 Service UnavailableINTERNAL_ERRORThe database is not configured (scaffold / demo mode). Start the API with app.database.enabled=true. Applies to both endpoints.

Example error — 404 Not Found

{
  "error": "NOT_FOUND",
  "message": "No content item found with id: usr-9f3c1e0a-42b8-4d17-9a55-7c0e1b2d3f44",
  "timestamp": "2026-07-28T10:32:41.123456Z"
}

Example error — 503 Service Unavailable

{
  "error": "INTERNAL_ERROR",
  "message": "Base de datos no configurada. Use app.database.enabled=true",
  "timestamp": "2026-07-28T10:32:41.123456Z"
}

Build docs developers (and LLMs) love