Skip to content

♻️(api) remove bulk operations, rename documents to resources#133

Closed
StephanMeijer wants to merge 1 commit into
mainfrom
feat/no-bulk-in-api
Closed

♻️(api) remove bulk operations, rename documents to resources#133
StephanMeijer wants to merge 1 commit into
mainfrom
feat/no-bulk-in-api

Conversation

@StephanMeijer
Copy link
Copy Markdown
Collaborator

@StephanMeijer StephanMeijer commented May 11, 2026

Important

Please merge first: #131, #138

Summary

  • Rename URL paths from /documents/ to /resources/
  • Remove bulk indexing: POST /resources/index/ accepts single doc only (returns 400 for arrays)
  • Replace bulk delete with RESTful DELETE /resources/<uuid>/ (204/404/403)
  • Refactor demo and test utilities to use single-doc API calls

Breaking Changes

BREAKING CHANGE: API endpoints renamed and bulk operations removed.

Before After
POST /api/v1.0/documents/index/ (bulk) POST /api/v1.0/resources/index/ (single)
POST /api/v1.0/documents/delete/ (bulk) DELETE /api/v1.0/resources/<uuid>/
POST /api/v1.0/documents/search/ POST /api/v1.0/resources/search/

Changes

  • core/urls.py: Renamed paths, added UUID path param for delete
  • core/views.py: IndexDocumentView rejects arrays, new DeleteDocumentView
  • core/schemas.py: Removed DeleteDocumentsSchema
  • demo/create_demo.py: Loop with single-doc API calls
  • core/utils.py: prepare_index() accepts service param, uses APIClient
  • Tests: Deleted old bulk tests, added 30 new single-doc tests
  • Docs: Updated endpoint paths in setup guides

Testing

All 30 new tests pass:

  • test_api_resources_index.py: 26 tests (single doc, validation, auth)
  • test_api_resources_delete.py: 4 tests (success, 404, 403, invalid UUID)

@StephanMeijer StephanMeijer force-pushed the feat/no-bulk-in-api branch 9 times, most recently from a0aacb8 to cc9f4f1 Compare May 11, 2026 11:31
@StephanMeijer StephanMeijer reopened this May 11, 2026
@StephanMeijer StephanMeijer force-pushed the feat/no-bulk-in-api branch 3 times, most recently from ab4abbe to d021f06 Compare May 11, 2026 11:59
BREAKING CHANGE: API endpoints renamed and bulk operations removed.

Signed-off-by: Stephan Meijer <me@stephanmeijer.com>
@StephanMeijer StephanMeijer force-pushed the feat/no-bulk-in-api branch from d021f06 to 19b46db Compare May 11, 2026 11:59
@StephanMeijer StephanMeijer marked this pull request as draft May 11, 2026 12:03
@StephanMeijer StephanMeijer added this to the LaSuite Find Staging milestone May 12, 2026
@StephanMeijer
Copy link
Copy Markdown
Collaborator Author

Important

This PR will be superseded by the next.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant