This repository has been archived on 2026-07-19. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
KnowledgeBase/files/custom/Espo/Modules/KnowledgeBase/Resources/routes.json
T
chaim 6781ac4e37 feat: Phase 2 — document upload from KB UI
Adds a "ניהול" tab with multipart file upload, async job tracking, and
a recent-jobs list with live status polling. Browser POSTs to
/KnowledgeBase/action/upload (PHP proxy), which forwards as multipart
to shira-hermes /admin/kb/upload. shira-hermes returns a job_id
immediately and processes parse/chunk/embed in a background task; the
browser polls every 2s until status hits done|failed.

New EspoCRM endpoints:
  POST /KnowledgeBase/action/upload   (multipart, $_FILES['file'])
  GET  /KnowledgeBase/action/jobs     (list, filtered by topicId/status)
  GET  /KnowledgeBase/action/job?id   (single-job detail)

The X-User-Name header is forwarded so kb_ingest_job records who
uploaded each file. Cross-topic guard in switchTopic stops polling
when the user changes topics mid-upload (the job continues server-side).

Depends on shira-hermes commit 0cb89fb (admin upload endpoints +
migration 002).

Refs Task Master #13

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-25 16:46:42 +00:00

67 lines
1.5 KiB
JSON

[
{
"route": "/KnowledgeBase/action/topics",
"method": "get",
"params": {
"controller": "KnowledgeBase",
"action": "topics"
}
},
{
"route": "/KnowledgeBase/action/search",
"method": "post",
"params": {
"controller": "KnowledgeBase",
"action": "search"
}
},
{
"route": "/KnowledgeBase/action/sources",
"method": "get",
"params": {
"controller": "KnowledgeBase",
"action": "sources"
}
},
{
"route": "/KnowledgeBase/action/chunks",
"method": "get",
"params": {
"controller": "KnowledgeBase",
"action": "chunks"
}
},
{
"route": "/KnowledgeBase/action/ask",
"method": "post",
"params": {
"controller": "KnowledgeBase",
"action": "ask"
}
},
{
"route": "/KnowledgeBase/action/upload",
"method": "post",
"params": {
"controller": "KnowledgeBase",
"action": "upload"
}
},
{
"route": "/KnowledgeBase/action/jobs",
"method": "get",
"params": {
"controller": "KnowledgeBase",
"action": "jobs"
}
},
{
"route": "/KnowledgeBase/action/job",
"method": "get",
"params": {
"controller": "KnowledgeBase",
"action": "job"
}
}
]