Search code examples
restrestful-url

Is this path RESTful?


I have a doubt

Is this path restful?

api/Cars/Sources

Sources exist in the context of Cars. Imagine that I have this sources:

Source1 : name = source1 , Source2: name = source2

And then in my cars I have:

Car1: name =car1, sourceName = source1

Car2: name =car2, sourceName = source2

So, my path is rest or should be separated?


Solution

  • REST doesn't care what spellings you use for your resource identifiers. See REST: I Don't Think it Means What You Think it Does, by Stefan Tilkov (2014).

    The key idea: in REST, the client follows links provided by the server, rather than constructing links described in documentation.