Discussion of the appropriate design of URLs (e.g., for readability and hackability).
Questions tagged [url-design]
69 questions
1
vote
2 answers
Best practice for naming URLs of edit pages
I have a website which contains a campaign and each campaign has multiple surveys.
If I were to edit a campaign, I have the URL named
campaign/edit/1
If I wanted to edit a survey in a campaign I have a URL named
campaign/edit/1/survey/edit/3
My…

lost9123193
- 10,460
- 26
- 73
- 113
1
vote
1 answer
Is that a good practice to provide a aggregation API in a Rest or a normal WebAPI Design?
I have provide such REST API for getting base user info and user's space info.
/v1/users/{user_id}/profile, which will return such a JSON:
```json
{
"id":123,
"name":"foo",
"sex":0,
"email":"foo@gmail.com",
}
```
/v1/users/{user_id}/space ,…

Chen
- 119
- 9
1
vote
1 answer
Handling URLs that change
If an example website contains blog posts created by users this would be an easy way to structure the URLs for each post:
www.example.com/jane-smith/my-first-blog-post
If the user was to change their username (which is unique per user) or the title…

Pav Sidhu
- 6,724
- 18
- 55
- 110
1
vote
0 answers
user account url without prefix
I try to create a website contain user account system,
the user profile page, url path is domain.com/:username. I don't want to use prefix like domain.com/user/:username .
So I have to find strings avoid user register,
My website other url path…

user1575921
- 1,078
- 1
- 16
- 29
1
vote
1 answer
Uri design aggregation
I am designing a flexible web service to aggregate data.
If we use sales as an example. A sales resource has properties of:
Sales person
Product
Price
Customer
Id
Department
Date
etc.
So the basic URI to access sales would be similar to the…

Stuart
- 143
- 9
1
vote
2 answers
What is the correct query parameter for "match-all" in a REST filter when there is a default?
If a REST API endpoint gets all, then filters are easy. Lack of a filter means "get all results".
GET /persons - gets all persons
GET /persons?name=john - gets all persons with name of "john"
But if there is a default, then I need some way to…

deitch
- 14,019
- 14
- 68
- 96
1
vote
1 answer
URL format - Action before or after object?
I'm building a web application and I came across one question. Here at the office we have divided opinions so I thought it would be nice to share the question and listen to the very best (you!)
When creating the URLs for the application I was…

Thiago Mambretti
- 70
- 1
- 7
1
vote
1 answer
Where to add the ID in a URL?
I’m using friendly URLs, like so:
http://localhost/gallery/photo/this-is-a-url-friendly-photo-caption
On the friendly URL, I need to add the ID of the photo, but looking around, I’ve seen two ways of adding the ID to the friendly URL, pre and post,…

Marco
- 2,687
- 7
- 45
- 61
1
vote
1 answer
REST - Get updated resource
I working on a service which scrapes specific links from blogs. The service makes calls to different sites which pulls in and stores the data.
I'm having troubles specifying the url for updating the data on the server where I now use the verb…

Boedy
- 6,647
- 1
- 21
- 24
1
vote
1 answer
AR retrieving what information from XXXJSON page
I began to make an app similar to layar, I know it is quite tricky. But from the examples I get, all of the information is being retrieved from pages such as;
GeoNames
OR
Twitter
My question is what is contained in those pages, I want to…

SoftwareEnthusiast
- 271
- 2
- 9
- 26
0
votes
1 answer
Describing "greater than"-filters search in a REST API URL?
I'm designing a REST API where the /widgets endpoint can be filtered to only show widgets with a certain number of connections. This seems like a natural design:
/widgets?connections=4
I also want to allow filtering for widgets using lesser than…

Anna
- 2,645
- 5
- 25
- 34
0
votes
1 answer
Storing UI state in URL segments/parameters vs. cookies or session state
Is anyone aware of documentation, RFCs, guides or research that can help move a discussion about URL design from opinion and emotion to research, documentation and facts?
Say we're building a traditional non-SPA HTML-based bank application where one…

Peter V. Mørch
- 13,830
- 8
- 69
- 103
0
votes
1 answer
REST combined all records and one record
I am building REST endpoint that has invoices. I need to build both list of all invoices in 3 levels of description (detailed which is default, sums only and one with customers information).
I also need to build endpoint for individual invoices that…

developer1
- 35
- 4
0
votes
1 answer
Separation of SEO-friendly URLs
I need to create a site (e-shop) in Laravel using SEO-friendly and hierarchical URLs.
Some examples are:
www.example.com/cat1/cat11 (which points to a category product-listing)
www.example.com/cat1/cat11/cat111 (which points to a category…

Maverick
- 21
- 6
0
votes
1 answer
Is it better to use a "?" or a ";" in a URL?
In my application, I redirect an HTTP request and also pass a parameter. Example:
http://localhost:9000/home;signup=error
Is it better to use a ; or shall I use a ? i.e. shall I do http://localhost:9000/home;signup=error or…

Manu Chadha
- 15,555
- 19
- 91
- 184