Backend Issue — Keywords Service & Vocabulary Integration
🎯  Goal
Provide backend support for Keywords input by:
- Serving vocabularies (BattINFO, voc4cat, terminology service)
 - Allowing search / autocomplete for dynamic term lookup
 - Supporting prefilling based on sample type JSON schemas
 - Optionally providing curation guidance or validation for new terms
 
🧩  Implementation Details
New Endpoint Proposal
- 
Endpoint:
GET /vocabulary - 
Query Parameters:
- 
search(optional): string to search terms - 
vocabulary(optional): filter by specific vocab source - 
domain(optional): prefill suggestions based on domain - 
limit/offset: for pagination 
 - 
 
Response Example
{
  "items": [
    {
      "term": "Temperature",
      "vocabulary": "BattINFO",
      "domain": "Astrophysics"
    },
    ...
  ],
  "offset": 0,
  "limit": 50,
  "total": 234
}
Backend Tasks
- 
Aggregate terms from multiple vocabularies.  - 
Support dynamic search and filtering across vocabularies.  - 
Prefill keywords based on sample_typeJSON schema. - 
Optionally flag controversial or multi-definition terms for frontend guidance.  - 
Ensure performance for large vocabularies.  
🧪  Testing
- 
/vocabularyendpoint returns correct terms based on search and vocab filter - 
Prefill suggestions are accurate for sample type  - 
Supports pagination and large vocabularies efficiently  - 
Terms returned include domain and vocabulary info  
🏷️  Labels
backend feature keywords sample priority::medium