REST principles show that your URLs must describe the resource (s) you want to receive.
This seems clear enough, however, in my opinion, at least it still implies two valid approaches.
HTTP request
-, URL-, query, HTTP- , , , ( query string). URL REST , HTTP.
, HTTP . - bad thing, , , , , ( RPC).
The Query
'example.com/country'
The Refinement Parameters
- year or
- city or
- state
URL- REST
, REST, , country+city+state+year URL.
, , , , . URL, .
, URL - :
//Syntax for ui.router
'example.com/country/{country}'
'example.com/country/{country}/year/{year}'
'example.com/country/state/{state}'
'example.com/country/state/{state}/year/{year}'
'example.com/country/state/{state}/city/{city}'
'example.com/country/state/{state}/city/{city}/year/{year}'
, , , , .
, , , , , URL- , , URL- , , , .
, ui.router AngularJS, , URL-, . , SPA "", , , . URL-, , API, , .
, API - .