rest

Implications of migrating several systems over from direct JDBC to a RESTful Webservice

Within my department we have around 20 or so applications which use direct JDBC to obtain similar sets of financial data from the same database. I'm looking at introducing a Service to expose this financial information and then migrate the various applications over to use the Service (rather than direct JDBC). The intent here is to have ...

How do I structure a real-world API according to REST principles?

We're reworking some APIs and are considering a REST-style approach, but we're realizing we aren't sure how to deal with certain situations (lists of resources with parameters that influence what is selected, etc.), or even how to effectively structure urls for resources that may be referred to by themselves but are conceptually subordin...

Why isn't SOAP-based web service RESTful?

I understand RESTful is an architecture style, but what exactly makes SOAP-based web service not count for RESTful? It's not clear to me which points below (from Wikipedia), is not conformed by SOAP. Client-server Stateless Cacheable Layered system Code on demand (optional) Uniform interface Identification of resources Manipulation o...

Get Image as stream or byte array using OpenRasta

Would anyone be able to give me a quick pointer as to how I can get an OpenRasta handler that returns a byte array. To be exposed in the ResourceSpace without it being a JSON or XML object. i.e. I don't want it transcoded, I just want to be able to set the media type to "image/PNG" or similar. Using ASP.Net MVC I can do it using a FileC...

Help me to understand <script src="some.js?param1=one;param2=two" />

I observed chunks like below sometimes on web pages. So i am curious to know what this really does? or why its written in such a way? <script src="somefile.js?param1=one&param2=two" /> i can only make out following few intentions behind it Its not page URL (i mean .aspx/.php/.jsp etc.) so its not hacking kind of code where user can ...

What's an appropriate HTTP status code to return by a REST API service for a validation failure?

I'm currently returning 401 Unauthorized whenever I encounter a validation failure in my Django/Piston based REST API application. Having had a look at the HTTP Status Code Registry I'm not convinced that this is an appropriate code for a validation failure, what do y'all recommend? 400 Bad Request 401 Unauthorized 403 ...

creating new records using REST and AJAX

I created a simple application in Rails for storing the names of cars: script/generate scaffold car name:string I'm looking to create an application which will connect to this using REST and AJAX to create new car names. However, I want this application to be separate from the application which I created in Rails to actually hold the ...

Silverlight ASP.NET MVC RESTful approach

I use Silverlight 3 with ASP.NET MVC. For database operations I query SQL Server database using FOR XML, and send the data as XML over wire to Silverlight client where it is deserialized to business object. Is this approach good? I do not find much resource on Internet about using Silverlight, ASP.NET and XML together. ...

Restful Service in ASP.NET

Apart from using ADO.NET Data Services or WCF Services,When i want to use RESTful services in ASP.NET (consider if i want to use it ASP.NET 2.0), do i need to download any specific API inorder to use Rest Webservice.If so,where can i download the same? ...

Using HttpClient with the RightScale API

I'm trying to use the WCF Rest Starter Kit with the RightScale's Login API which seems fairly simple to use. Edit - Here's a blog entry I wrote on using Powershell to consume the API. Edit - Created a generic .NET wrapper for the RightScale API - NRightAPI It's exactly as simple as it looks while using CURL. In order for me to obtain...

Can anyone recommend a good C/C++ RESTful framework

Rather than possibly reinventing the wheel (by "rolling my own") - I thought I'd ask in here first. Anyone knows where I can download a good C/C++ RESTful framework?. I have had a quick look on google, but there is nothing too impressive so far - maybe someone in here has written one already (that they dont mind sharing), or may know a ...

RESTful API Documentation

Hi, I'm going to design a RESTful API soon, thus I need to describe it in order to enable other people to start implementing clients using it. I've looked around a bit, but unfortunately, I've not found any standardized form of describing web-based RESTful services. What I'am looking for is something like JavaDoc, although it don't ha...

Web service construction toolkit / wrapper for PHP?

I am developing a number of Web Applications and CMSes - and have old ones - that I would like to enrich with a RESTful API: The possibility to programmatically access library functions like, say, creating pages, moving them, deleting them, querying content, the things that an API does. What I am looking for is some kind of a web servic...

rails, REST and context

hi all. I'm developing my latest rails app using a REST style. I've hit a bit of a problem with context however. Let's say I have an Item model. I'm using edit/update to handle the processing, but the model is edited differently depending on the context. sometimes all I'm doing is changing a 'status' attribute and don't need to show the...

How to do WCF REST Caching?

I have a WCF REST service which needs to return both Static and some filtered data based on what parameters were passed in by the clients(which are fat windows clients) Since the data store which feeds this service doesnt change too often, I wanted to cache this data on the service(Server side caching), The data store is an Azure Table,...

Best way to implement Server-Side redirection using WCF REST

We want to receive a GET request in www.contoso.com/Service(123) and based on some logic (token information in a custom header) redirect the request to www.contoso.com/Data/123.xml or to www.contoso.com/123_bak.xml without the client being aware of the redirection ...

Configure Apache to route "GET /user/foo" to /user/GET.php and "PUT /user/foo" to /user/PUT.php

I would like to arrange things so that a GET request for e.g. http://example.com/user/[email protected] internally calls the script /var/www/example.com/rest/user/GET.php and a PUT request for the same URL internally calls the script /var/www/example.com/rest/user/PUT.php and so on for the other HTTP verbs POST and DELETE. It's almos...

Construct a datatable from the REST response received from quering table entities in azure

I query the Azure tables using REST API and the response is transformed to xmldocument. Is there an easy way to convert this xmldocument to datatable without manually parsing the xml in code? I would know the schema for the table/entity only at runtime. Alternatively, what would be the best way to display the azure table data in a grid ...

How to Use the "Source" Parameter with the REST API Of Twitter??

Hello, my name is Fernando and I want to write an extension for Firefox which is a client for Twitter.Eu been studying and came across the fact of having to use OAuth to bring up the "From Name" as example. Fact is that I've never seen it before, I am not very mainstreamed with OAuth and Firefox does not provide facilities to use it full...

getting a 'name' based URL in RESTful routes instead of an id based url

If I implement RESTful routing for a controller 'galleries' like as follows: map.resources :galleries By default the show url for this controller would be: /galleries/:id which would respond to any requests to /galleries/1 etc. What if I had a gallery record in the database with a 'name' attribute with value 'portraits'. Could I...