Closed Bug 1797620 Opened 2 years ago Closed 11 months ago

Create modular framework for adding use case specific search endpoints to the BMO API

Categories

(bugzilla.mozilla.org :: API, enhancement)

enhancement

Tracking

()

RESOLVED FIXED

People

(Reporter: dkl, Assigned: dkl)

References

Details

Attachments

(1 file)

We get requests from time to time to update Search internally in BMO to support specific search use cases for retrieving data from the DB. BMO search is coded (broken) in a way that makes it non-trivial to update to support the types of searches that users expect.

Something we discussed doing is create a drop in modular framework that uses direct SQL to get data for users and their specific data needs. Each module will create a specific API endpoint that takes parameters that can be plugged into the SQL as needed. When a new module is dropped in, it will automatically become available. We do something similar for bug field changes in the MozChangeField extension already.

extensions/MozSearchAPI
extensions/MozSearchAPI/Config.pm
extensions/MozSearchAPI/Extension.pm
extensions/MozSearchAPI/lib
extensions/MozSearchAPI/lib/SomeSpecificSearch.pm

This will map to /rest/moz_search/some_specific_search?param1=foo&param2=bar.

The matching bugs will be filtered before returning based on current user permissions and fields will match the normal bug search API and can also be filtered.

Lets drop the Moz prefix from all of these please; it's redundant.

My thinking around params was we'd require named placeholders in the SQL that would map directly to params.

Sadly DBD::mysql doesn't actually support named placeholders, but it should be easy to implement (eg. replace :name with ? and control the order of unnamed placeholder values).

See Also: → 1527841
Status: ASSIGNED → RESOLVED
Closed: 11 months ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: