How to build hierarchically paths with different resources? in MARS-Curiosity REST Library Posted February 27, 2020 · Edited February 28, 2020 by NilsSchneider Hello together, I have a question about building hierarchically paths with multiple resources. As a little introduction, there is a software, which manages different systems. Every system has some subordinate modules. As an example, there are media and media owners. I want to access these modules like /myRestApi/v1/systems --> managing the systems themself /myRestApi/v1/systems/{systemId}/media --> managing the media of a specified system /myRestApi/v1/systems/{systemId}/mediaOwners --> managing the media owners of a specified system I tried to build this with following components: - A application, base path "v1" - A resource, path "systems" - A resource, path "systems/{systemId}/media" - A resource, path "systems/{systemId}/mediaOwners" Now the problem is, that only one of this resources is be found, and only the routes of this resource work. It seems like it is the resource, which was integrated at first with TMARSEngine.AddApplication method. Do you have any idea, how handle this use case? Greetings Nils
How to build hierarchically paths with different resources?
in MARS-Curiosity REST Library
Posted · Edited by NilsSchneider
Hello together,
I have a question about building hierarchically paths with multiple resources.
As a little introduction, there is a software, which manages different systems.
Every system has some subordinate modules.
As an example, there are media and media owners.
I want to access these modules like
/myRestApi/v1/systems --> managing the systems themself
/myRestApi/v1/systems/{systemId}/media --> managing the media of a specified system
/myRestApi/v1/systems/{systemId}/mediaOwners --> managing the media owners of a specified system
I tried to build this with following components:
- A application, base path "v1"
- A resource, path "systems"
- A resource, path "systems/{systemId}/media"
- A resource, path "systems/{systemId}/mediaOwners"
Now the problem is, that only one of this resources is be found, and only the routes of this resource work.
It seems like it is the resource, which was integrated at first with TMARSEngine.AddApplication method.
Do you have any idea, how handle this use case?
Greetings
Nils