balanced / balanced-api

Balanced API specification.
220 stars 72 forks source link

Flexible search endpoint #740

Open kyungmin opened 9 years ago

kyungmin commented 9 years ago

The /search endpoint should allow searching and filtering in the following format:

/search?scope[in]=order,transaction&merchant=CU123&buyer=CU456&status=succeeded
// would return all orders and transactions matching the following filtering params

Maybe we can even allow searching by any arbitrary field:

/search?email_address=marshall@balancedpayments.com
// would return all resource types matching the email address

This will also resolve many search-related issues discussed in: https://github.com/balanced/balanced-api/issues/721.

Since the dashboard relies heavily on search to display different associations, it would be nice to achieve this level of flexibility, instead of filing issues for unsupported search params.

Reference: https://github.com/balanced/balanced/issues/717