Questions tagged [restful-url]

Representational state transfer (REST) is a style of software architecture for distributed hypermedia systems such as the World Wide Web.

https://en.wikipedia.org/wiki/Representational_state_transfer

1351 questions
4
votes
1 answer

How to create RESTful URLs from page title in Spring MVC?

When the user of my application creates a new page, she is asked to enter a 'Page Title' among other details. (e.g. she entered: "Page Title by Megan") The application saves the instance into db. Now my requirement is that when anyone tries to…
LittleLebowski
  • 7,691
  • 13
  • 47
  • 72
4
votes
2 answers

What's the RESTful way to structure an URL for user interactions with other entities?

I'm trying to figure out what's the correct RESTful way to structure an URL for user interactions with other entities? For example, I have three entities: users, posts and tags. How do you represent "user likes post", "user follows tag" or "user…
Jorge Pedret
  • 1,037
  • 1
  • 9
  • 16
3
votes
1 answer

Whats the best way to have RESTful URLs and still track pageview counts using analytics?

What I Wanted I was going to use urls like /item/xxx (viewing an item) and /item/xxx/photo (viewing the full screen photo of an item) because I thought that looked better and was more RESTful. Problems I realized that I wouldn't be able to track…
jasongregori
  • 11,451
  • 5
  • 43
  • 41
3
votes
1 answer

Is it correct to use PATCH for a partial delete of resources?

I want to do a partial delete of resources, which means that after calling that API, some of the data will be deleted, but we will retain some minimal information about the deleted data, this data will be accessible by the user. On the one hand, I…
shinzou
  • 5,850
  • 10
  • 60
  • 124
3
votes
1 answer

How should a resource edit path looks like on a restful web app?

Do you know how a resource edit path should looks like on a restful web app? Can't find any serious reference but the Ruby on Rails way that it's just a convention. I'm not talking about the put request that is used to update the resource but the…
Roberto Decurnex
  • 2,514
  • 1
  • 19
  • 28
3
votes
2 answers

How to invalidate 'other' URIs in case of a PUT request?

A resource can be identified by multiple URIs. e.g. /person/1234 /person/list?fname=John /person/list?lname=Doe all of the above might contain a resource: Person - id: 1234 fname: John lname: Doe age: 10 Say you want to change John Doe's age from…
Sam
  • 99
  • 1
  • 2
  • 7
3
votes
2 answers

RESTFUL API: Using path parameters vs Query parameters

First, I do know path parameters need to be used when you are pointing at a resource and query parameters are meant to be used when you define something that can add a "property" (or change in time). However, let's assume i need to get data belong…
PeakGen
  • 21,894
  • 86
  • 261
  • 463
3
votes
0 answers

Naming convention for Query parameters in restful api

What is the common best practice for query parameter naming convention. Camel case/ snake case/ pascal case/ kebab case? How should it look like in the URL ?
user1354825
  • 1,108
  • 4
  • 21
  • 54
3
votes
2 answers

Why am i receiving error 404 when fetching video data?

I'm trying to display the video which is in mp4 format of the code's folder. When i try to fetch the video by clicking on the button it shows an empty space but doesn't display the video.display of the output The error i'm receiving from the…
Thatt
  • 61
  • 7
3
votes
3 answers

out of START_ARRAY token in Spring restTemplate

I have a SpringBoot app. with this config file: @Configuration public class ApplicationConfig { @Bean public RestTemplate restTemplate() { RestTemplate restTemplate = new RestTemplate(); MappingJackson2HttpMessageConverter…
Nuñito Calzada
  • 4,394
  • 47
  • 174
  • 301
3
votes
2 answers

Is it possible to have route multiple parameters in asp.net mvc using maproute

I want a user to be able to access objects (could be JSON or XML) using a restful syntax rather than having to use query strings. So instead of http://mywebsite.com/objects/get=obj1&get=obj2&get=someotherobject/ they could do something like…
Darcy
  • 5,228
  • 12
  • 53
  • 79
3
votes
3 answers

How to secure are MVC RESTful Urls from Hacking?

I read an interesting article recently on the CitiGroup Hacking incident http://www.nytimes.com/2011/06/14/technology/14security.html?_r=2&pagewanted=1&ref=technology This got me thinking, say I have a table of sensitive Employee data in my database…
Click Ahead
  • 2,782
  • 6
  • 35
  • 60
3
votes
0 answers

Creating an API proxy for an Azure Static Web App

I have a static website (React SPA) hosted as an Azure Static Web Application, I also have a flask backend that is hosted online, is there a way for me to add the URL of the backend so that all requests will go there? (Similar to adding a proxy to…
3
votes
4 answers

FInd by ID and Username in RESTful Web Services

I'm confused as what is the best preference for singleton resource. I want to have endpoint which has user id as: /users/{id} But I also want username as parameter: /users/{username} I'm using Spring MVC (via Spring Boot) and it says the 2 endpoints…
Julez
  • 1,010
  • 22
  • 44
3
votes
3 answers

multiple requestparam in springboot pageable

i know that this question may be duplicated but i tried a lot with no success I need to make multiple RequestParam in spring boot rest controller as following : @GetMapping("/prd-products/test") @Timed public ResponseEntity>…