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

  • SEARCH
  • Home
  • 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 8818085
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T05:00:47+00:00 2026-06-14T05:00:47+00:00

I am building a web service following the REST architechture style. I am using

  • 0

I am building a web service following the REST architechture style. I am using JAX-RS to make it easier. This question is however not concerned about a technology, but instead correct use of paths to resources.

I have created some resources in my application such as a Quiz, Question and QuestionFeedback.

I have created paths such as

/quiz
/question/1

and so on. Now, I have seen some web service APIs that exposes path such as /approved or /questions/approved. The approved part of the path seems more like attributes that the questions may have (in this case) and I wonder if this is ok, and where the boundry goes between making it a request parameter and a part of the path like this?

And is it ok to expose paths in the web service that in some way exposes one of the intended resources in your system like in this case Question, but through a path like /approved in addition to the normal /questions path? What are the rules, and how is this supposed to be?

If I did not have anyone to ask I would have created a path like /questions?type=approved : GET.

Because approved is not a resource in my system. Or is it ok to create paths that exposes resources…but don’t use resource name directly.

  • 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-06-14T05:00:49+00:00Added an answer on June 14, 2026 at 5:00 am

    You are asking if paths that can only be understood with additional information are OK. Well, they are not wrong but I would not choose them.

    Your question is (in my words):

    Give me all the questions that have the additional feature of being approved.

    This boils down to two steps:

    First Step

    Get all questions.

    GET /questions
    

    Second Step

    Of these get only those that have been approved.

    GET /questions?approved=true
    

    This is very natural.

    In contrast, why should the second step result in /approved? How is this related to /questions? There is no obvious way to answer this question. While it is technically OK to use even strange paths like /pink-elephants which should translate into ‘give me all approved questions’, it’s not what I recommend.

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

Sidebar

Related Questions

I am building a RESTful web service in java using JAX-RS and jersey and
I am using Jersey Framework (JAX-RS implementation) for building RESTful Web Services. I'm not
I'm building a web service client using vb .net. The web service is secured
I'm building a restful web-service based on Spring. I'm using Spring Security. It will
While building this web service and the app that calls it, we have noticed
I'm currently building a Web Service that sends files this also obtains the mime-type
I am building a small website for fun/learning using a fairly standard Web/Service/Data Access
I created a simple WCF web service(following this tutorial: http://blogs.msdn.com/b/ericwhite/archive/2010/05/11/getting-started-building-a-wcf-web-service.aspx ), because I don't
I'm building a service, using soap (wcf). I want to make my endpoint a
I am building a web service that involves parsing of 3rd party RSS feeds.

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.