Questions tagged [url-design]

Discussion of the appropriate design of URLs (e.g., for readability and hackability).

Related tags

69 questions
0
votes
1 answer

RESTful url - getting new subentity

There are 2 models: Entity and Subentity. Entity can have many connected Subentities (one:many relation). There is a method on server that returns new Subentity (let's call it GetEmptySubentity). Point is, when you want to create new Subentity, you…
Arnthor
  • 2,563
  • 6
  • 34
  • 54
0
votes
1 answer

URL design: is it bad practice to use consecutive numbering in URLs for user-submitted items?

I'm working on a website where users can submit items (in this case, proposals). The simplest URL design would be something like website.com/proposal/1, website.com/proposal/2, etc. (perhaps with a slug appended) but I've never seen this done in…
tao_oat
  • 1,011
  • 1
  • 15
  • 33
0
votes
1 answer

RESTful URL design for unauthenticated requests

I want to provide the ability for resetting a user`s password. This call obviously must not require authentification. First I thought of something like this: DELETE /users/{id}/password: generates a reset token that gets sent to the user via…
Thomas Eizinger
  • 1,404
  • 14
  • 25
0
votes
3 answers

REST resources with a triple as a parameter

When needing to create a URL that takes a finite set of parameters, where all of said parameters are semantically the same "level", what is the current consensus around the use of delimiters within URLs? Here's an example:…
timothy
  • 497
  • 2
  • 8
0
votes
1 answer

Rest design principles

Is the following a good rest design practice for listing all the subscriptions of a customer: [BaseUrl]/subscriptions/[accountid]/payTV [BaseUrl]/subscriptions/[accountid]/paywall etc... ORshould it rather…
user594883
  • 1,329
  • 2
  • 17
  • 36
0
votes
2 answers

Which one of the following is a better Rest URL?

Just a quick question. Which one of the following makes a better Rest API Url & why so? GET shop/department/{id}/{action} GET shop/department/{action}/{id} The action is a verb and it can be: GET shop/department/{id}/download GET…
Obaid
  • 1,407
  • 19
  • 36
-1
votes
1 answer

Pros/cons of passing a record ID through the URL vs. a parameter

I'm working on an API and am wondering if there are any advantages/disadvantages of accessing a record by passing the ID through the URL vs. as a parameter. Example: Getting info of a message of ID 1 You could do this with example.com/messages/1…
-1
votes
2 answers

RESTFUL formatting of URLs

Simple question, in terms of best practice is it better to format my URL like this: http://www.example.com/search?query=hello&page=1 or like this: http://www.example.com/search/hello/page/1 Can you provide a valid reason for your choice please.
Imran Azad
  • 1,008
  • 2
  • 12
  • 30
-2
votes
1 answer

URL design for city landing page: /chicago or /?_city=chicago

I am interested on thoughts about URL structure for city landing pages. Essentially best practice and reasons for implementing format (a) over (b): (a) example.com/chicago (b) example.com/?_city=chicago
redmacgirl
  • 13
  • 3
1 2 3 4
5