rest

Usign C# with REST and BlinkSale

I'm looking to use the Blinksale API I had a quick look at using ADO.NET Data Services specifically the client code. Does anyone know of the best way to go about this. There are some different headers with this api as well, so if anyone is an expert at setting up data services I'd appreciate some advice on the best way of going about th...

Limiting access to a WCF REST (webHttpBinding) Service using the ASP.NET Membership Provider?

I have found a lot of material on the web about using the ASP.NET Membership Provider with the wsHttpBindings, but I haven't seen any reference to using it with webHttpBindings. I am looking for a system that will work in two scenarios: The user is logged into an asp.net website and the website is making calls to the service. The user...

How do you handle 'actions' on resources in a RESTful design, like marking an email read?

How would you integrate things like this in a RESTful design? Marking an email as read Voting on a story Reporting a message as inappropriate Additionally, how would you do it in such a way that one could make a small icon link or button to do the action without too much wizardry? ...

Rails - make_resourceful with nested resources

I am using the make_resourceful plugin in my Rails app, and attempting to use nested resources. My controller code looks like this: class ClientRegionsController < ApplicationController make_resourceful do actions :all belongs_to :client response_for(:create) do |format| format.html { redirect_to client_client_regi...

Fitnesse RestFixture on Linux

I've been using the RestFixture in Fitnesse to test a REST service which is running under Tomcat. When Fitnesse is run on Linux (Redhat to be precise) the fixture doesn't pass any querystrings to Tomcat (the log entries prove this). However, the exact same fixture running through Fitnesse on a Windows machine works as expected. Has anyo...

OperationFormatter encountered an invalid Message body

I'm creating a WCF Client to an External REST API, but are getting the following error: OperationFormatter encountered an invalid Message body The client hits the server correctly and does the 'Post' that I am requiring, but it is expecting a different response Element, basically appending 'Response' to the name of the OperationC...

CDN options for image resizing

Background: I working on an application on Google App Engine. Its been going really well until I hit one of their limitations in file size -- 1MB. One of the components of my application resizes images, which have been uploaded by users. The files are directly uploaded to S3 (http://developer.amazonwebservices.com/connect/entry.jspa?ext...

How do you GET a RESTful resource by something other than ID?

There may be situations where I would need to find an object by parameters other than ID. What is the proper RESTful way to do that? For example I might want to find a User by username and password, so the strictly RESTful "GET /users/1" wouldn't work. According to the Rails docs this is the URL pattern for getting all the instances of...

Is it RESTful to limit resource properties?

Our resources consists of dozens of fields (attributes). Some of our clients don't need all resource's properties. To save network payload we implemented a query string parameter to limit the resource properties. So for example, the next URL will return a collection of resources with all their fields: http://myapp/myresources But when ...

RESTful URL design - how to query using OR between parameters

How would you design a RESTful query to support OR operand between parameters. Let's say my resource has two fields field1 & field2. How would you design the URL to enable the following query: "Get myresources where field1=x OR field2=y" Designing queries in REST is pretty straight forward, but I have only seen queries that supports A...

Advice needed on REST URL to be given to 3rd parties to access my site

Important: This question isn't actually really an ASP.NET question. Anyone who knows anything about URLS can answer it. I just happen to be using ASP.NET routing so included that detail. In a nutshell my question is : "What URL format should I design that i can give to external parties to get to a specific place on my site that will b...

In RESTful design, what's the best way to support different kinds of GETs?

In a current project I need to support finding a User by login credentials and also by email address. I know that in RESTful design you use a GET to find resources. In Rails... GET /users # => UsersController.index -- find all the users GET /users/1 # => UsersController.show -- find a particular user But I also need something aki...

Can ActiveResource models integrate with ActiveRecord models?

I'm working on a Rails app that will serve as an authentication system for other Rails apps through Rails's ActiveResource functionality. The authentication app has an ActiveRecord model called User. The client app has an ActiveResource model called User. I know that in the client app I can do stuff like user.save and it will perform a ...

RESTful Design: Paging Collections

I am designing a REST api that needs paging (per x) enforces from the server side. What would be the right way to page through any collection of resources: Option 1: GET /resource/page/<pagenr> GET /resource/tags/<tag1>,<tag2>/page/<pagenr> GET /resource/search/<query>/page/<pagenr> Option 2: GET /resource/?page=<pagenr> GET /resou...

RESTful webservice to sum a list of numbers.

PHP makes this sort of thing dirt simple but I'd like to know how other languages do it. To standardize on a simple example, how would you implement the following webservice to sum a list of numbers: http://server.com/sum?summands=LIST where LIST is a list of space-separated real numbers. For example, http://server.com/sum?summands...

Do WCF Web Service components have to be coupled to the web?

I'm learning about WCF Web Services and I'm concerned about all of the coupling that I'm seeing. The way I see it, I should be able to write a component and then use it just about anywhere - in-proc, across the intranet or from an ASP.NET page and only ever need to just change the way it's hosted. Once you start working with System.Ser...

Patterns for handling batch operations in REST web services?

What proven design patterns exist for batch operations on resources within a REST style web service? I'm trying to be strike a balance between ideals and reality in terms of performance and stability. We've got an API right now where all operations either retrieve from a list resource (ie: GET /user) or on a single instance (PUT /user/1...

RESTful delete strategy

Let's say I have a resource that can have two different behaviors when delete is called The resource is deleted. The resource is moved to the recycle bin. How would model it in a REST compliant way? I thought about the following solution: DELETE /myresource moves the resource to the recycle bin (default behavior) DELETE /myreso...

WCF REST parameters cannot contain periods?

So here's a super simple interface for doing rest in WCF. [ServiceContract] public interface IRestTest { [OperationContract] [WebGet(UriTemplate="Operation/{value}")] System.IO.Stream Operation(string value); } It works great, until i try to pass a string with periods in it, such as a DNS name.....

Browser Extension Idea: Provide HTTP Auth Values through Web Forms

I want to bounce an idea around. I have been building web services and web applications for over a decade now, and have more recently been focusing on providing as RESTful a service as possible (eg. using the same URI for both browsers and API clients, but having them modify accept: to decide if to send XML or XHTML). One big sticking p...