rest - How to Get Lists for Uri Templates based on other Ids -


lets have couple uri template endpoint rest api such:

"/events" - gives me events

"/events/{eventid}" 

"/events/2234" - gives me event specified eventid

what if wanted events specific broker. thinking maybe this:

"/events/{brokerid}" 

e.g. "events/2345" - gives me events specific brokerid

problem how service know if incoming url sending in broker vs. eventid? /2234 , /2345 indistinguishable.

i'm wondering how handled in rest. people typically like:

"events/broker/{brokerid}"  

or somehow specify type of id other way?

i'm not sure others, like:

/brokers/{brokerid}/events 

for example:

/brokers/2345/events 

of course, less rest-ful, such as:

/events?brokerid=2345 

Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -