Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/yohangr3/agentelanggrafh/llms.txt

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

The Schema Exploration API lets authenticated users browse the ERP’s registered tables, retrieve full column metadata and DDL, and search for relevant tables using natural-language queries. All three endpoints share the same rate-limit tier as the chat API and require a valid Bearer JWT.
All schema endpoints are subject to the same rate limit as the chat endpoint. Exceeding the limit returns 429 Too Many Requests.

Authentication

Every request must include an Authorization header with a Cognito-issued JWT.
Authorization: Bearer <id_token>

GET /schema/tables

Returns a sorted list of every table registered in the schema registry, grouped first by table_type and then alphabetically by name.

Response — TableListResponse

tables
array
required
Array of table summary objects, sorted by (table_type, table_name).
total
integer
required
Total number of tables returned.

Example

curl -X GET https://api.example.com/schema/tables \
  -H "Authorization: Bearer <id_token>"

GET /schema/tables/{table_name}

Returns full metadata for a single table, including every column’s name, type, and description, plus the original DDL statement and any business usage notes recorded in the registry.

Path Parameters

table_name
string
required
The exact table name as it appears in the schema registry (case-sensitive).

Response — TableDetailResponse

table_name
string
required
The physical table name.
table_type
string
required
dimension, fact, or view.
description
string
required
Business description of the table.
row_count
integer
required
Approximate row count from the registry.
columns
array
required
List of column-level metadata objects.
ddl
string
The CREATE TABLE statement for the table, if available.
business_notes
string
Free-form notes recorded by schema owners about business logic or caveats.

Error Responses

StatusCondition
404 Not FoundNo table with the given table_name exists in the registry.
401 UnauthorizedMissing or invalid JWT.
429 Too Many RequestsRate limit exceeded.

Example

curl -X GET https://api.example.com/schema/tables/fact_ventas \
  -H "Authorization: Bearer <id_token>"

POST /schema/search

Performs a semantic similarity search over all registered table descriptions using a FAISS vector index. Returns the most relevant tables for a natural-language query, which is useful for discovering which tables to query before writing a prompt.

Request Body — TableSearchRequest

query
string
required
Natural-language search query, e.g. "monthly revenue by cost center". Must be between 1 and 500 characters.
top_k
integer
default:"5"
Number of results to return. Must be between 1 and 20 (inclusive).

Response — TableSearchResponse

results
array
required
Matched tables ranked by semantic relevance.
query
string
required
Echo of the original search query as received.
Use the snippet field to quickly verify relevance before fetching full column metadata via GET /schema/tables/{table_name}.

Example

curl -X POST https://api.example.com/schema/search \
  -H "Authorization: Bearer <id_token>" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "monthly revenue by cost center",
    "top_k": 3
  }'

Build docs developers (and LLMs) love