I'm struggling to determine how to design restful URLs. I'm all for the restful approach of using URLs with nouns and not verbs don't understand how to do this.
We are creating a service to implement a financial calculator. The calculator takes a bunch of parameters that we will upload via a CSV file. The use cases would involve:
U...
What's the rule of thumb for passing data in a REST URL in the query string vs. the body of a request?
Ie: You're creating a service to add hockey players. You could go with:
PUT /players
{ "name": Gretzky }
or
PUT /players?name=Gretzky
If you're passing a lot of data, you would need to go with option #1 as there is a limit on t...
Let's say you had a /companies resource that allowed clients to lookup public companies and you wanted clients to be able to lookup companies by Ticker, Location, and Location and industry
Would you keep the same URL in the form:
GET /companies/msft
GET /companies/usa
GET /companies/usa&software
This doesn't seem right. Any ideas?
...
Given this service to get information about a hotel:
> GET /hotel/{id}
< HTTP/1.1 200 OK
< <hotel>
< <a>aaa</a>
< <b>aaa</b>
> <biggie>aaa....I am 300K</biggie >
< </hotel>
Problem is that biggie is 300K and we don't want to return it with every response. What's the RESTful way to lazy load this value?
Should we set up two ...
Which one of these Uris would be more 'fit' for receiving POSTS (adding product(s))? Are there any best practices available or is it just personal preference?
/product/ (singular) or
/products/ (plural)
Currently we use /products/?query=blah for searching and /product/{productId}/ for GETs PUTs & DELETEs of a single product.
...
We are re-developing our buyonline functionality and we are doing it the RESTful way.
The process is a three step one and the customer is asked to enter data at each step.
Let's say the three URL's are;
/step1.aspx
/step2.aspx
/step3.aspx
Each step is pretty autonomous and don't require data from any of the other steps.
The questi...
Hey there,
I have a decent understanding of RESTful urls and all the theory behind not nesting urls, but I'm still not quite sure how this looks in an enterprise application, like something like Amazon, StackOverflow, or Google...
Google has urls like this:
http://code.google.com/apis/ajax/
http://code.google.com/apis/maps/documentat...
I just began looking at REST and was wondering what the basic difference between the two representations was. The first one looks pretty nice to me and the second one has to pass some attribute values but the underlying logic seems to be boiling to almost the same thing (I could be mistaken though)
http://url/category/category_id/item_i...
I want to build a RESTful web service that implements a search interface for a database of biological data.
A typical search request could involve a dozen or so attributes of the data.
For example, search by scientific name, constrain the search to water depths less than 100m.
My first instinct is to have all of the attributes in the...
I 'm really having a hard time with the RESTful paradigm + nested urls. I have asked a question that lead me to where I am right now here. My Domain is roughly this: there are schools, courses of a school and teachers of schools. Now schools, courses and teacher are not "nested" entities in the sense that you can refer to any of them wit...
I'm finding it necessary to understand why including action verbs in the URI violates the REST protocol for URI syntax? When I read the following article, I sense that too many people are making too much noise about verbs, and that they should be making more noise about content types:
RestWiki: Minimum Methods
In a perfect world, clien...
I am dealing with a very simple RESTful Rails application. There is a User model and I need to update it. Rails coders like to do:
if @user.update_attributes(params[:user])
...
And from what I understand about REST, this URL request should work:
curl -d "first_name=tony&last_name=something2&v=1.0&_method=put" http://localhost:3000/...
I read a lot of Restful tutorials for PHP.
(I don't want to go in depth into why I am not using RoR. It is due to the team being more familiar with PHP)
Because we are planning for future expansion into having APIs i read that it is important to implement Restful web services.
I have looked at tutorials such as
http://www.gen-x-des...
I understand how to use REST for doing general entity interactions - using urls names to map to entities and the HTTP verbs to map to actions on those entities. But what is the generally accepted way of looking at "actions" more like RPC?
For example, let's say I want to send a command for the device to reset? There's no real "entit...
I'm having a heck of a time resolving URLs with Spring 3.0 MVC. I'm just building a HelloWorld to try out how to build a RESTful webapp in Spring, nothing theoretically complicated.
All of the examples I've been able to find are based on configurations that pay attention to file extensions ("*.htm" or "*.do"), include an artificial dir...
I am designing a REST API where some resources can be filtered through query parameters. In some cases, these filter values would be resources from the same REST API. This makes for longish and pretty unreadable URIs. While this is not too much of a problem in itself because the URIs are meant to be created and manipulated programmatical...
Hi
Im having issues with RESTful URLs in Rails.
I have site.com/services url, and I want to have subpages under that category, thats it: site.com/services/arquitecture, site.com/services/plumbing, etc.
The pages that im serving under that category are "static" .rhtml files and I would want them to be on the same controller.
Is there ...
Hi all,
I would like to use following RESTful URL for a web site I'm working on.
http://mysite.com/Products/category=bags&colours=black
can anyone please tell me how to achieve this with .htaccess?
Oscar
...
I'm developing a REST API service for a large social networking website I'm involved in. So far, it's working great. I can issue GET, POST, PUT and DELETE requests to object URLs and affect my data. However, this data is paged (limited to 30 results at a time).
However, what would be the best RESTful way to get the total number of say, ...
Designing my RESTful API, I would like use following URI
http://[HOST]/[PLANET]/[LAT];[LONG]
e.g.
http://myserver/earth/50.2;29.1
What is the appropiate annotation of a such a method in Spring MVC? Is this the following one ok?
@RequestMapping(value = "/{planet}/{lat};{long}", method = RequestMethod.GET)
public String showInfoAbou...