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 8134323
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T09:58:37+00:00 2026-06-06T09:58:37+00:00

I use node.js as REST API. There are following actions available: /contacts, GET, finds

  • 0

I use node.js as REST API.
There are following actions available:

  1. /contacts, GET, finds all contacts
  2. /contacts, POST, creats new contact
  3. /contacts/:id, GET, shows or gets specifiy contact by it’s id
  4. /contacts/:id, PUT, updates a specific contact
  5. /contacts/:id, DELETE, removes a specific contact

What would now be a logic Route for searching, quering after a user?
Should I put this to the 3. route or should I create an extra route?

  • 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-06T09:58:38+00:00Added an answer on June 6, 2026 at 9:58 am

    I’m sure you will get a lot of different opinions on this question. Personally I would see “searching” as filtering on “all contacts” giving:

    GET /contacts?filter=your_filter_statement

    You probably already have filtering-parameters on GET /contacts to allow pagination that works well with the filter-statement.

    EDIT:
    Use this for parsing your querystring:

    var url = require('url');
    

    and in your handler (‘request’ being your nodejs http-request object):

    var parsedUrl = url.parse(request.url, true);
    var filterStatement = parsedUrl.query.filter;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been looking into building a REST api using the Azure SDK for node
I'm trying to use Bing's REST api to geocode. But my 'y' value is
Is there a twitter client for node.js (not the streaming API, the regular API)?
I've written a REST API on the express framework for node.js that works for
I could do with some help on my REST API. I'm writing a Node.js
I use node.js and socket.io. I have an application that runs on the IP
I'm trying to use Node.js to create a zip file from an existing folder,
I'm trying to use quoted text in one of node's attributes: var network_json =
I understand how to use Protoype in standard Javascript with Node.js and modules, but
I am a node.js developer. I use Amazon ec2 to deploy my node.js apps.

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.