API urls: Implicit vs Explicit tenant ids
Within a multi tenant app, I have two choices to expose my resources: api.myapp.com/customer/{id} api.mayap.com/{tenant}/customer/{id} I am wondering about the pros and cons of exposing the tenant name. In the first case the tenant name is given as a header field, and in the second directly within the URL. On one hand I do want to have the cleanest and simplest possible URL structure. Since all resource IDs will be UUIDs, having the tenant namespace seems redundant. On the other I am not sure if having the tenant name exposed in the URLs will make caching easier or any other factor I have not
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.