Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 631361
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T19:57:23+00:00 2026-05-13T19:57:23+00:00

I read the article at REST – complex applications and it answers some of

  • 0

I read the article at REST – complex applications and it answers some of my questions, but not all.

I am designing my first REST application and need to return “subset” lists to GET requests. Which of the following is more “RESTful”?

/patients;listType=appointments;date=2010-02-22;user_id=1234

or

/patients/appointments-list;date=2010-02-22;user_id=1234

or even

/appointments/2010-02-22/patients;user_id=1234

There will be about a dozen different lists that I need to return. In some of these, there will be several filtering parameters and I don’t want to have big ‘if’ statements in my server code to select the subsets based on which parameters are present. For example, I might need all patients for a specific doctor where the covering doctor is another and the primary doctor is yet another. I could select with

/patients;rounds=true;specific_id=xxxx;covering_id=yyyy;primary_id=zzzz

but that would require complicated branching logic to get the right list, where asking for a specific subset (rounds-list) will achieve that same thing.

Note that I need to use matrix parameters instead of query parameters because I need to do filtering at several levels of the URL. The framework I am using (RestEasy), fully supports matrix parameters.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T19:57:23+00:00Added an answer on May 13, 2026 at 7:57 pm

    Ralph,

    the particular URI patterns are orthogonal to the question how RESTful your application will be.

    What matters with regard to RESTfulness is that the client discovers how to construct the URIs at runtime. This can be achieved either with forms or URI templates. Both hypermedia controls tell the client what parameters can be used and where to put them in the URI.

    For this to work RESTfully, client and server must know the possible parameters at design time. This is usually achieved by making them part of the specification of the link relationship.

    You might for example define a ‘my-subset’ link relation to have the meaning of linking to subsets of collections and with it you would define the following parameters:

    listType, date, userID.

    In a link template that spec could be used as

    <link rel=”my-subset’ template=”/{listType}/{date}/patients;user_id={userID}”/>

    Note how the actual parameter name in the URI is decoupled from the specified parameter name. The value for userID is late-bound to the URI parameter user_id.

    This makes it possible for the URI parameter name to change without affecting the client.

    You can look at OpenSearch description documents (http://www.opensearch.org) to see how this is done in practice.

    Actually, you should be able to leverage OpenSearch quite a bit for your use case. Especially the ability to predefine queries would allow you to describe particular subsets in your ‘forms’.

    But see for yourself and then ask back again 🙂

    Jan

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 360k
  • Answers 360k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer The enterprise pattern for this is to have a amendment… May 14, 2026 at 2:38 pm
  • Editorial Team
    Editorial Team added an answer I think the most popular SVN client would probably be… May 14, 2026 at 2:38 pm
  • Editorial Team
    Editorial Team added an answer Have you tried: (job#1) Repository Url: http://server/svn/MainRepository/Trunk/Project1 Local module directory… May 14, 2026 at 2:38 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.