All Questions
9 questions
3
votes
2
answers
2k
views
Proper URL structure in REST API to change status of one particular record
What's the proper URL structure in REST API for changing state of one particular record (e.g. change from "new" to "processed").
Now I work with this URL without request body:
PATCH /employees/123/...
0
votes
1
answer
226
views
Is a URC (Uniform Resource Citation) synonymous with a Query String or Url Parameters?
Reading this:
https://renenyffenegger.ch/notes/development/web/URI-URL-URN-IRI-URC
URCs provide a set of attribute/value pairs that describe properties of URIs like authorship, publisher, copyright ...
-1
votes
1
answer
531
views
How can I translate an ip address to a url in a Java Webserver?
I host my own webserver through Java. The problem is I can only access it through a web browser by using an ip address. Can I spoof a url? For example, I type in 192.168.2.111 into the address bar,...
2
votes
2
answers
1k
views
ID's in resource URLs: database id or per-user id?
For REST interfaces or webapps with nice-looking URLs, I constantly ask myself on what numbers to use if we want to refer to specific resources/pages.
A typical approach seems to be to use the unique ...
17
votes
2
answers
9k
views
Should I specify the userId in the REST URL structure?
Basically, one feature of my app is to retrieve the logged user's friends.
Actually, I hesitate between both kind of endpoints:
GET /api/users/friends
GET /api/users/:userId/friends
Using 1, userId ...
25
votes
2
answers
11k
views
Levels of user permissions in a RESTful API
Let's say I have a company that ranks the cutest cats on the internet.
I offer a resource at /cats/ which provides users with the latest, cutest adorable cats.
Users can either get just the top 3 cats ...
6
votes
5
answers
751
views
When did the first "REST"-model and friendly URL web technology come to be?
Everyone knows that the "current" way to do things is to have user-readable URLs. Like:
http://example.com/blog/edit/1234
Rather than:
http://example.com/blog.php?action=edit&id=1234
When ...
1
vote
3
answers
8k
views
Is path in Set-Cookie URL encoded?
I'm writing some code that sets cookies and I'm wondering about the exact semantics of the Set-Cookie header. Imagine the following HTTP header line:
Set-Cookie: name=value; Path=/%20
For with path ...
3
votes
1
answer
1k
views
Should I implement slugs with my already fairly long URLs? [closed]
I'm considering implementing slugs in my blog. My blog uses MongoDB. One of the side-effects of using MongoDB is that it uses relatively long hex string IDs.
Example
before: http://lastyearswishes....