Jump to content

How to build hierarchically paths with different resources?

Recommended Posts

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?




Edited by NilsSchneider

Share this post

Link to post

Any reason you're looking to pass this information in the path instead of perhaps using a form POST that contains the relevant information?

Share this post

Link to post

Hi @NilsSchneider, would you please post here the resource definition? If I got it correctly you registered three different resource classes for the same path (systems).




Share this post

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now