Sub-resources of the resource. Is this a valid REST? -


i want expose portion of big rest resource resource (sub-resource). valid so? problems possible approach? there better way?

for example, have collection of computers. each computer in collection (main resource) have it's own sub-parts (sub-resources).

  • /api/computers/117/chassis
  • /api/computers/117/motherboard
  • /api/computers/117/cpu

where computers collection , chassis, motherboard , cpu sub-resources of computer #117.

yes is. can have problems when want access resources specific type of cpu, it's okay if have /api/cpus/123


Comments

Popular posts from this blog

php - render data via PDO::FETCH_FUNC vs loop -

c++ - OpenCV Error: Assertion failed <scn == 3 ::scn == 4> in unknown function, -

The canvas has been tainted by cross-origin data in chrome only -