We have a REST api under design, to fetch an entity, eg persons, as follows
Now we can get persons who live in a particular city, as follows:
We can also get all cities where persons are as follows, this provides person id and the city, person id being unique while city may or may not repeat:
The question is how should the rest api be designed if we wish to obtain the distinct list of cities?
In other words, something like
In this call we are not interested in the persons per se but the list of distinct cities.
What design would make it pleasant for the developer?