2

My REST API format:

How should the URL look when I want to get all messages owned by a user with id=1?

1 Answer 1

3

This sounds like a filter/search for messages. This is usually done by query parameters:

GET http://myserver.com/rest/messages?ownedBy=1 

Since /messages is a collection resource from which you want a subcollection, you filter it.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.