Could WMS have been REST-ful? Andrew Hallam says probably not. I think he's being too strict about REST. It's quite acceptable to send data specifying aspects of your request. A REST-ful WMS request would look like:

GET http://host/wms/1.1.1?layers=one,two&...

The WMS service and version would be specified not in the query, but by the HTTP method and URI. Every other parameter is now of a kind: they parameterize a view of the WMS resource.


Re: REST and WMS

Author: Andrew Hallam

WMS could have been designed to be RESTful. Things are the way they are because they got that way. I don't think my application of REST principles to WMS is overly strict. In the case of WMS, it may not be practical, but to claim to be RESTful you should follow the principles (hence my original rant). A key abstraction in REST is that a URI identifies a resource, a "thing". That resource may have multiple representations in different formats ("views"). i.e. The URI does not identify the content transferred (the "view"), just the abstract "thing" without form. Say I request a map with FORMAT=image/gif&. I then change the FORMAT parameter value to image/png and send the request again. I consider the responses I get back to be two different representations of the same map. Same applies if I vary the BGCOLOR value. It's just a different representation of the same map. Therefore, any WMS query parameter that defines the format, or portrayal, of the map's resource representation should not be part of that map's URI. It seems like a small distinction, but it is a key part of REST.

Re: REST and WMS

Author: Paul Ramsey

I am still wrapping my head around the right ways to approach this very nice design philosophy, but I think this page has some useful perspectives on dealing with resources that can be consumed in different formats:

Re: REST and WMS

Author: Sean

Andrew, I agree completely with your comments. Did I misunderstand your blog entry? I took your point to be that a WMS request would need to be free of view-specifying query parameters to be REST-ful.