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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T17:15:57+00:00 2026-06-13T17:15:57+00:00

I have product_id and onec_id columns to get items from DB. Which API routes

  • 0

I have product_id and onec_id columns to get items from DB. Which API routes should I use to get items by product_id or by onec_id?

Is it right for REST routes?

GET /products/{product_id}
GET /products/get_by_onec_id/{onec_id}
  • 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-13T17:15:59+00:00Added an answer on June 13, 2026 at 5:15 pm

    The most REST solution is to fire one HTTP request for each id. For example

    GET /product/736
    

    REST is intended to represent the state of a resource. It can return a set of items, but only if these items relate to each other in some way. For example

    GET /onec/492/products
    

    Will return the set of products associated with the specified onec.

    If you want to return the set of products identified by a set of IDs in a single request, you may have your shortcut syntax like

    GET /products/12,768,56,086
    

    But it’s not really common because it’s quite a departure from the REST objectives

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

Sidebar

Related Questions

I have a table products , and I have columns like product_name , product_id
I have two tables, products(product_id) and sex(product_id,sex_id). I am trying to DELETE rows from
How can I get previous or next product_id from table if I have only
I have a MySQL table which has a product_id field (big integer) 1102330008 1102330025
i have product table it contains all products details . product_id product_type_id internal_name 1001
I have these four tables: PRODUCTS --------- PRODUCT_ID PRODUCT_TITLE (other fields) COLORS --------- COLOR_ID
I have 3 tables Products product_id max_products_can_sell max_products_can_sell_to_individual purchases user_id product_id quantity reservations product_id
I have a Product database table with columns such as product_id , price ,
I have a table ( product_shoppingcart ) with 4 columns : id, product_id, shoppingcart_id,
I have product table with columns product_id (p.k) product_name product_description product_price category_id and I

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.