rest

What is a REST API

Possible Duplicate: What exactly is RESTful programming? What is a REST API? ...

How do you handle RESTful-type URLs with an IHttpHandler

This question has two related parts. First, I'm looking for a a small example of how to handle a series of RESTful URLs, such as /Account/{userName} and /Account/{userName}/Profile with a single HttpHandler. At this time, I'm not interested in embracing MVC or using the REST Starter Kit. Should I place the HttpHandler class in a Class Li...

Discrepancy in JSON.stringify of date values in different browsers

I have this code in an HTML page: alert(JSON.stringify(new Date())); I'm including the latest json2.js (2009-09-29 version) in my page to support older browsers without JSON.stringify(). I also have jquery-1.3.2.js included. I believe in newer browsers with native JSON support, it just passes through to the native JSON feature. Her...

Best tool for writing REST API documentation?

Hi all, I am in the process of writing up documentation for a REST API that I have developed. I am finding this to be tedious and the current way we are doing it just doesnt seem right. I am sure there is something out there which will help automate this process a little, and even provide features such as version control for the documen...

Writing a REST wrapper over AXIS2

Hi, I have an AXIS2 webservice already in place for my application. However, for an android mobile client, SOAP based webservices are too heavy. Hence, I am planning to wrap this webservice into RESTful webservice. To do this, 1. I ran wsimport on my wsdl to generate jaxb sources, since the ones I had were AXIS2 generated(with ADB). ...

Android: How to consume xml from webservice using authentication?

I am trying to call a restful webservice (that needs to require authentication) from my android app. I am doing this successfully already with a url that does not require authentication, but am not sure of the correct approach to use if I want to set up a url that does require authentication. I am currently consuming xml using a Sax Pars...

Understanding REST: REST as a high volume transport?

I'm designing a system that will need to move multi-GB backup images over TCP, and I'm looking at REST as an alternative to ONC RPC. For example, I might have POST http://site/backups/image1 where image1 is an 50GB file whose data is contained in the HTTP body. My question: is this within the scope of what REST is meant for? Is it ...

WCF - REST - Flatten a collection during serialization

Greetings I'm trying to convert a "collection of collections" into better looking xml. Basically, I want to lie to the service consumer and make it look like there's a real object. This is what WCF creates automatically <EntityPropertyCollection xmlns="http://schemas.datacontract.org/2004/07/CustomSerializer" xmlns:i="http://www.w3.or...

Rails: what is the “correct” (idiomatic) way to pass a parameter from new to create in a RESTful controller?

I have a very common situation and a solution, but I would like to ask the Rails experts out there if it can be improved. I have a very typical RESTful controller where the user supplies some of the object attributes upon creation. There is a thing model, a ThingsController and various views, including new, create, and a _form partial. ...

Making calls to a ruby lib from a java web app

We have a j2ee/spring/hibernate/tomcat web application already running on production. We are planning to integrate with a 3rd party service(recurly) which provides a ruby client lib. They don't have a java client lib yet. Their service is RESTful and their client is a thin custom wrapper over ActiveResource. I can think of a few ways to ...

Nested RESTful routes in Rails: how should I organize my views?

Lets say you have an Invoice resource, and each Invoice has nested InvoiceLine resources, i.e. a very common nested resource pattern. Now, where should one put the view for showing each individual invoice line as a row within the invoice? Should invoice lines be rendered as a partial under invoices/_line.html.erb, or should they get the...

RESTful search centering on specific record within a larger query set

So I have a query that returns lets say 1000 records. I'm using paging to grab sections of that, and I know the total number of records due to the $inlinecount=allpages tag. I'd like to be able to grab a specific record, and know where in the 1000 records it lands. Let's say the record I'm looking for actually lands on record number 4...

IIS Rest over HTTPS only

I've asked a similar question here: http://stackoverflow.com/questions/2165465/how-to-enforce-one-method-in-wcf-rest-to-be-called-via-https-while-others-can-be And it doesn't look like it is possible on the code side. Is it possible to set up an entire service to be callable over HTTPS only? I've configured a service using the follow...

Integrating REST Web Services Provision with Main Application

I have a Rails web application that also exposes a few RESTful web services. The main application is secured and obviously uses its own security mechanism whereas the web services would be best authenticated with HTTP authentication. To be very DRY, the controllers behind the web services are shared by the controllers in the main applic...

REST: Way to map URLs to services/files ?

In your humble opinion: what would be a best practice aproach to map REST URLs to services/files within one's architecture (let's assume MVC pattern here)? ...

RESTfully destroy polymorphic association in Rails?

How do I destroy the association itself and leave the objects being associated alone, while keeping this RESTful? Specifically, I have these models: class Event < ActiveRecord::Base has_many :model_surveys, :as => :surveyable, :dependent => :destroy, :include => :survey has_many :surveys, :through => :model_surveys end class Model...

Lotus Sametime web service API

Is there a SOAP or REST API for Sametime to enable an application to push presence information on behalf of all Sametime users, and to subscribe or poll, the users' presence information? Where can I find information about it? ...

Response code when POST fails to complete

Hi, I have a scenario where a client Posts to a resource and if the data in the post is not valid then I want to return back a error saying what caused the failure. I am thinking that a 409 with a response body is appropriate? anyone any thoughts or suggestions on a different response? Cheers, Chris ...

After JSON data is returned, I can't access it using javascript code

I have a WCF RESTful service that returns a complex object with the following format: {"GetMatterSearchRESTResult":{"BreakDownBypracticeGroups":[],"BreakDownByCountry":[],"TotalMatterCount":0}}. When I have this value return, I try to access it using the following code below: if (executor.get_responseAvailable) { ...

HATEOAS: absolute or relative URLs?

In designing a RESTful Web Service using HATEOAS, what are the pros and cons of showing a link as a complete URL ("http://server:port/application/customers/1234") vs. just the path ("/application/customers/1234")? ...