Discussion of the appropriate design of URLs (e.g., for readability and hackability).
Questions tagged [url-design]
69 questions
0
votes
0 answers
Is this good URL design practice in React?
I start out in a listview where each item in the listview is an item each with a unique _id displaying only partial information, clicking on them will route to another page and display all the info. Now, I click on an item, route to the unique id…

Acy
- 589
- 2
- 9
- 25
0
votes
0 answers
Difference between third level domain and a path
The title sums it up: what’s the difference between something like:
support.example.com
and
example.com/support
Is the former simply more permanent and/or easier to dictate? Or would the destination IP addresses be completely different between…

Clueless
- 13
- 1
0
votes
2 answers
Best way to design a URI for REST API
I am designing a REST API with similar functionality as of Posts and Comments in Facebook.
URI looks like:
/posts/{post-id}/comments/{comment-id}
To get all the comments I use the collection URI naming standard. For…

John Cena
- 61
- 6
0
votes
2 answers
How can I define my REST API?
I have 3 models: tournament, championship and competitor:
A tournament has many championships;
A championship belongs to tournament;
A championship has many competitors.
So, to list all the competitors from all the championships, the URL is:
GET…

Juliatzin
- 18,455
- 40
- 166
- 325
0
votes
4 answers
Why use "?" instead of ":" in URL?
We can use
'PATCH /companies/:id' : 'CompanyController.find'
to update data.
One suggested me that I can use the alternative way:
'PATCH /companies/find?key=Value'
But I do not know what it works. Please explain me why we prefer ? mark than :…

Le Van Thong
- 63
- 4
0
votes
1 answer
Correct way to design endpoints
I am designing REST. I have user and user has contacts of different types. What should my endpoints be like according to REST?
This looks reasonable:
GET /users/:id/contacts
GET /contacts
On users endpoint I check contacts for another user and on…

pain.reign
- 371
- 2
- 4
- 17
0
votes
1 answer
Rest : How to identify an action non resource related
I would like to use the Rest-Easy framework to develop my application.
My application is VOIP (telephony) related.
It can :
Originate a phone call between two phone numbers
Transfer a phone call
Perform CRUD actions on resources
Those phone…

Gabriel
- 163
- 1
- 1
- 15
0
votes
1 answer
Is it correct to use singular names when there is a one-to-one mapping and how to design the REST URI?
I was wondering when it is considered correct to use singular names in REST (I mean, using best practices), but more particularly when there is a one-to-one mapping between two entities.
First example, we have to manage loyalty for customers. A…

Cwellan
- 305
- 1
- 3
- 12
0
votes
1 answer
Should we use all pluralized URI in a RESTful or differentiate between uses
I have seen quite bit of different answers on how people use the URIs in REST. I tend to use plurals for collections and singulars for single ressource. But it requires more routing.
Is it ok to use plurals for all ressources? For example:
GET…

Stéphan Champagne
- 1,259
- 12
- 12
0
votes
0 answers
Adding post ID to avoid URL crashing?
I am creating a website, now it's time to decide how the URL for different posts should look like.
For SEO purposes, I am planing to add the post URL, like
example.com/post.php?v=a-very-interesting-title
To prevent URL crashing, I was thinking to…

pabloBar
- 177
- 2
- 12
0
votes
1 answer
What's the difference between a URL such as "a.b.example" instead of "b.example/a"?
Why do some websites I see have a URL in the form a.b.example, and others are in the form of b.example/a?
For example, why is it gist.github.com instead of github.com/gist?

Andi Gu
- 900
- 11
- 20
0
votes
1 answer
which URL pattern is better, action/id or id/action
I would like to know which of these 2 patterns would be better:
/photos/123/edit
or
/photos/edit/123
Currently I am using the first, which gives me a Whoops, looks like something went wrong. when I try /photos/123/editxx instead of a 404 not…

haheute
- 2,129
- 3
- 32
- 49
0
votes
1 answer
Should I include my search term in my search path or as a parameter?
I'm building a search page for my website. I see that traditionally search terms are included as parameters- i.e. /search?q=lady+gaga this is observed on pretty much every site I've encountered- including Google, Pinterest, Twitter, and stack…

infomofo
- 1,675
- 2
- 12
- 20
0
votes
1 answer
Which of these url structures is better practice
I just had a quick question about URL structures. Out of these structures which is more commonly used, and should be used more for best practice. Or if you had any other ways that are even better, that would be appreciated.
Create all add type pages…

Bobby W
- 836
- 8
- 22
0
votes
1 answer
Pass rest resource output format in url
AFAIK every resource have a url in REST design. for example /user/28 is url of user with id equal to 28 and /users will return all users.
There are some way to represent output format of the resource:
passing a query parameter like format
specify…

gate sumson
- 163
- 1
- 11