Skip to content

FLCRM-21226: Document RAG document selections API#78

Draft
javoweb-fc wants to merge 1 commit into
v2from
feature/FLCRM-21226-rag-openapi-docs
Draft

FLCRM-21226: Document RAG document selections API#78
javoweb-fc wants to merge 1 commit into
v2from
feature/FLCRM-21226-rag-openapi-docs

Conversation

@javoweb-fc

@javoweb-fc javoweb-fc commented Jul 6, 2026

Copy link
Copy Markdown

Summary

Documents the new offline RAG (reference document sync) API surface introduced in FLCRM-21226 (fulcrumapp/fulcrum PR #10867).

Changes

  • New endpoints
    • GET /v2/forms/{form_id}/rag_document_selections.json — list a form's reference documents merged with their offline RAG selection state.
    • PATCH /v2/forms/{form_id}/rag_document_selections/{id}.json — enable/disable a reference document for offline RAG.
    • Both require the rag-offline-sync feature flag (403 if disabled).
  • New Form response fields: rag_enabled, rag_bundle_version, rag_bundle_download_url.
  • New schemas: RagDocumentSelection, RagDocumentSelectionsResponse, RagDocumentSelectionResponse, RagDocumentSelectionUpdateRequest, ForbiddenResponse.

Related PRs (fulcrumapp/fulcrum)

  • #10865 (FLCRM-20738) — schema/models
  • #10866 (FLCRM-21224) — processing pipeline
  • #10867 (FLCRM-21226) — selections API (source of truth for this doc)
  • #10868 (FLCRM-21225) — Form Builder UI

Keeping this as a draft until the fulcrum-side PRs are green and reviewed.

Adds OpenAPI documentation for the new offline RAG endpoints introduced
alongside the reference-document selection feature:

- GET  /v2/forms/{form_id}/rag_document_selections.json
- PATCH /v2/forms/{form_id}/rag_document_selections/{id}.json

Also documents the new rag_enabled, rag_bundle_version, and
rag_bundle_download_url fields on the Form response object.

New schemas: RagDocumentSelection, RagDocumentSelectionsResponse,
RagDocumentSelectionResponse, RagDocumentSelectionUpdateRequest,
ForbiddenResponse.
Copilot AI review requested due to automatic review settings July 6, 2026 18:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot couldn't run its full agentic review because no GitHub Actions runner was available. Make sure your repository has a runner available to run Copilot's review, or add a copilot-setup-steps.yml file specifying one with the runs-on attribute. See the docs for more details.

Documents the new offline RAG (reference document sync) API surface by extending the OpenAPI spec with new form fields, schemas, and endpoints for listing/updating document selection state.

Changes:

  • Added new Form fields: rag_enabled, rag_bundle_version, rag_bundle_download_url.
  • Introduced new schemas for RAG document selection resources and responses (including a 403 schema).
  • Added endpoints to list selections and toggle selection state for a reference document.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread reference/rest-api.json
Comment on lines +4363 to +4374
"id": {
"type": "integer",
"description": "Selection record ID"
},
"form_resource_id": {
"type": "string",
"description": "The form this selection belongs to"
},
"attachment_resource_id": {
"type": "string",
"description": "The reference file (attachment) this selection points to"
},
Comment thread reference/rest-api.json
Comment on lines +14027 to +14033
"name": "id",
"in": "path",
"description": "Attachment (reference file) resource ID",
"schema": {
"type": "string"
},
"required": true
Comment thread reference/rest-api.json
Comment on lines +14052 to +14060
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RagDocumentSelectionUpdateRequest"
}
}
}
},
Comment thread reference/rest-api.json
Comment on lines +3461 to +3473
"rag_bundle_version": {
"type": [
"string",
"null"
],
"description": "The active bundle UUID compiled for offline use"
},
"rag_bundle_download_url": {
"type": [
"string",
"null"
],
"description": "The secure CDN pre-signed download URL for the bundled RAG package"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants