restful url settlement search
i'm looking reasonable proceed paint searches calm urls.
the setup: i have twin models, cars garages, where cars garages. urls feeling like:
/car/xxxx
xxx == car id
advantage car given id
/garage/yyy
yyy = garage id
advantage garage given id
a car exist the possess (hence /car), exist garage. what's right proceed represent, say, cars given garage? something like:
/garage/yyy/cars ?
how kinship cars garage yyy zzz?
what's right proceed paint hunt cars certain attributes? say: arrangement me blue sedans 4 doors :
/car/search?color=blue&type=sedan&doors=4
or should /cars instead?
the "search" seems unapt there - what's improved proceed / term? should only be:
/cars/?color=blue&type=sedan&doors=4
should hunt parameters biased pathinfo querystring?
in short, i'm looking superintendence cross-model rest url design, search.
[update] i justin's answer, nonetheless doesn't cover multi-field hunt case:
/cars/color:blue/type:sedan/doors:4
or something that. from
/cars/color/blue
to churned domain case?
Comments
Post a Comment