This is a side question for a query with filters
Say that my application manages objects called workload, with the following fields. I want to open a REST interface for a user to request workloads using labels.
"Workload": {"id":"test1", "labels":["A", "B", "C"]}
"Workload": {"id":"test2", "labels":["A", "C", "D"]}
"Workload": {"id":"test3", "labels":["A", "B", "D"]}
Question . How do I create a REST endpoint to support the request workload using basic logical operations?
Request example 2 . I want to get all workloads labeled "A" or "B", but not "C"
There is no clue how to make such a rest api at all, except that the user requests requests for A, B, C separately, and then they perform their own installation operations themselves? (What a great user experience ...)
A similar question here concerns a query with logical logic on different filters, but it does not seem to be applicable for repeated filtering. (In this case, the labels. It seems strange to do GET /workloads/labels:A/labels:B)
source
share