approved, byrokraatit, ylläpitäjät
0
muokkausta
(→Lines) |
(→Routes) |
||
Rivi 157: | Rivi 157: | ||
"routes" : [ | "routes" : [ | ||
{ | { | ||
"href" : "http://example.com/journeys/api/routes/123", | "href" : "http://example.com/journeys/api/routes/123", | ||
"line" : "http://example.com/journeys/api/lines/123", | |||
"pattern" : { | "pattern" : { | ||
"href" : "http://example.com/journeys/api/route-patterns/111" | "href" : "http://example.com/journeys/api/route-patterns/111" | ||
} | } | ||
} | } | ||
] | ] | ||
} | } | ||
} | } | ||
</pre> | </pre> | ||
A client can search ROUTES by issuing following requests:<br> | A client can search ROUTES by issuing following requests:<br> | ||
* http://example.com/journeys/api/routes will return paged list of all ROUTES | * http://example.com/journeys/api/routes will return paged list of all ROUTES | ||
* http://example.com/journeys/api/routes?lineId=123 will return ROUTES which run on the LINE with id 123 | * http://example.com/journeys/api/routes?lineId=123 will return ROUTES which run on the LINE with id 123 | ||
These queries return response like above, with entities matching the criteria. All query parameters are exclusive (if you specify multiple conditions, the conditions are ANDed together). | These queries return response like above, with entities matching the criteria. All query parameters are exclusive (if you specify multiple conditions, the conditions are ANDed together). |