Quantcast
Channel: Active questions tagged rest - Stack Overflow
Viewing all articles
Browse latest Browse all 4115

REST API URL pattern design [closed]

$
0
0

I am currently developing a REST API.

I am developing an API that returns products associated with a user, and an API that returns products associated with a product.

I can not be sure how to configure the URLpattern to be correct.

What I think is ambiguous is that in the case of the URL returning the product list through the product, the products are repeatedly listed.

Please advise me of a good URL pattern.

I am considering the options below.

1.

/domain/v1/relatedProducts/users/{userId}/domain/v1/relatedProducts/products/{productId}

2.

/domain/v1/user/{userId}/relatedProducts/domain/v1/products/{productId}/relatedProducts

3.Please advise other URL patterns.


Viewing all articles
Browse latest Browse all 4115

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>