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 so that it supports the load on requests with multiple labels as a filter?
Request example 1 : I want to GETload all workstations with both “A” and “B”.
I think something kind of GETlike a verb, workloadsas an endpoint, and then use {"labels": ["A", "B"]}as the body of the request. But this is not like RESTful way of doing things
As an alternative, I can do it GET /labels/{label-id}/workloads, but this will only work with one tag per time.
Request example 2 . I want to GETload all workloads labeled "A" or "B" but not "C"
There is no clue how to generally execute this type of api for relaxation, in addition to requesting a user a request for A, B, C separately, and then performing their own installation operations themselves?
The second query is tracked as another question