- Short
- Lowercase, without mix-cases
- Use plural path for collections, ex : /cars for all cars
- Put individual resource under plural path. ex: /cars/car-1 or /cars/1
- Use URL parameters ONLY with form-driven queries. ex: /cars/car/1, NOT /cars/car?id=1
- Readable, Hierarchical, Simple.
- Meaningful, ex: /cars/toyota/cr-z, NOT /cars/brand1/1
- Hackable URL, ex: /cars/toyota/cr-z should have /cars/toyota/ and /cars
Common REST Design Pattern
REST-ful URI design | RedRata
0 意見:
張貼留言