Representational state transfer, or REST, is an architectural style for networking software to transfer information through the web.

learn more… | top users | synonyms

4
votes
3answers
231 views

What is the right HTTP method for upvoting?

From a RESTful point of view, what is the most appropriate HTTP method for the action of upvoting a forum post (like on StackExchange)? I would say POST for voting and DELETE for canceling vote, but ...
2
votes
2answers
135 views

Allowing client to select data to return via REST interface

I have a rest service that is essentially a proxy to a variety of other services. So if I call GET /users/{id} It will get their user profile, as well as order history, and contact info, etc... all ...
2
votes
3answers
186 views

Rest Design concerning user login

To be as restful as possible, is a user login better designed using a GET or a POST on a REST webservice? And why?
4
votes
2answers
361 views

Standard -server to server- and -browser to server- authentication method

I have server with some resources; until now all these resources were requested through a browser by a human user, and the authentication was made with an username/password method, that generates a ...
1
vote
2answers
580 views

REST API wrapper - class design for 'lite' object responses

I am writing a class library to serve as a managed .NET wrapper over a REST API. I'm very new to OOP, and this task is an ideal opportunity for me to learn some OOP concepts in a real-life situation ...
4
votes
1answer
586 views

How should I handle a redirect to an identity provider during a web api data request

Scenario I have a single-page web app consisting purely of html, css, and javascript. After initial load and during use, it updates various views with data from one or more RESTful apis via ajax ...
6
votes
1answer
387 views

REST API rule about tunneling

Just read this in the REST API Rulebook: GET and POST must not be used to tunnel other request methods. Tunneling refers to any abuse of HTTP that masks or misrepresents a message’s intent and ...
9
votes
2answers
1k views

Is it reasonable for REST resources to be singular and plural?

I have been wondering if, rather than a more traditional layout like this: api/Products GET // gets product(s) by id PUT // updates product(s) by id DELETE // deletes (product(s) by id POST // ...
7
votes
1answer
1k views

Proper response for a REST insert - full new record, or just the record id value?

I'm building a REST API which allows inserts (POST, not idempotent) and updates (PUT, idempotent) requests to add/update database to our application. I'm wondering if there are any standards or best ...
1
vote
1answer
322 views

Using a random string to authenticate HMAC?

I am designing a simple webservice and want to use HMAC for authentication to the service. For the purpose of this question we have: a web service at example.com a secret key shared between a user ...
5
votes
3answers
967 views

What is the need for 'discoverability' in a REST API when the clients are not advanced enough to make use of it anyway?

The various talks I have watched and tutorials I scanned on REST seem to stress something called 'discoverability'. To my limited understanding, the term seems to mean that a client should be able to ...
1
vote
2answers
250 views

Should HTTP Verbs Be Used Semantically?

If I'm making a web application which integrates with a server-side backend, would it be considered best practice to use HTTP methods semantically? That is, for example, if I'm fetching data (e.g., to ...
2
votes
2answers
835 views

How to structure a set of RESTful URLs

Kind of a REST lightweight here... Wondering which url scheme is more appropriate for a stock market data app (BTW, all queries will be GETs as the client doesn't modify data): Scheme 1 examples: ...
12
votes
6answers
2k views

Do server-side sessions violate REST?

According to Roy Fielding (one of the principle authors of the HTTP specification) in his seminal thesis Architectural Styles when discussing REST, he mentions: [E]ach request from client to ...
4
votes
1answer
158 views

Why is nesting or piggybacking errors within errors bad in general?

Why is nesting or piggybacking errors within errors bad in general? To me it seems bad intuitively, but I'm suspicious in that I cannot adequately articulate why it is bad. This may be because it is ...
5
votes
1answer
168 views

Is there a standard for machine-readable descriptions of RESTful services?

I've interacted with a few RESTful APIs that provided excellent documentation for humans and descriptive URIs, but none of them seem to return machine-readable descriptions of themselves. It's not ...
12
votes
2answers
6k views

How should an API use http basic authentication

When an API requires that a client authenticates to it, i've seen two different scenarios used and I am wondering which case I should use for my situation. Example 1. An API is offered by a company ...
5
votes
1answer
616 views

API Auth vs User Auth

I have read many posts and articles on this topic but still cant connect the dots. I want to make a Rails app that is strictly a JSON API maybe using Sinatra or the rails-api gem. I also want to make ...
4
votes
3answers
5k views

Should I use both WCF and ASP.NET Web API

We already have a WCF API with basichttpbinding. Some of the calls have complex objects in both the response and request. We need to add RESTful abilities to the API. at first I tried adding a ...
0
votes
2answers
837 views

Wrapping REST based Web Service

I am designing a system that will be running online under Microsoft Windows Azure. One component is a REST based web service which will really be a wrapper (using proxy pattern) which calls the REST ...
4
votes
2answers
1k views

How to achieve a loosely coupled REST API but with a defined and well understood contract?

I am new to REST and am struggling to understand how one would properly design a REST system to both allow for loose coupling but at the same time allow a consumer of a REST API to understand the API. ...
3
votes
2answers
4k views

URL parameters in RESTful web services

I'm wondering about the appropriateness of URL parameters in RESTful resource creation. First, here's some context. I'm working on an API that will remotely update the software on embedded devices ...
8
votes
3answers
495 views

Should one generally develop a client library for REST services to help prevent API breakages?

We have a project where UI code will be developed by the same team but in a different language (Python/Django) from the services layer (REST/Java). The code for each layer exits in different code ...
5
votes
1answer
1k views

HTTP Response Header for a unique Request ID for REST service

For our REST service I want to send back a unique request ID with every response; useful for debugging internal projects but also for offering support to any third parties who might use the service in ...
30
votes
4answers
33k views

Reasons NOT to use JSF [closed]

I am new to StackExchange, but I figured you would be able to help me. We're crating a new Java Enterprise application, replacing an legacy JSP solution. Due to many many changes, the UI and parts of ...
2
votes
3answers
618 views

One or many RESTful APIs for large company?

I work for a large company which has several non-RESTful APIs. I am tasked with building a web application to interact with these APIs. Each API handles and provides very different business processes ...
20
votes
2answers
15k views

Selecting a JAX-RS implementation for a new project

I'm starting a new Java project which will require a RESTful API. It will be a SaaS business application serving mobile clients. I have developed one project with Java EE 6, but I'm not very familiar ...
2
votes
2answers
2k views

Ajax application: using SOAP vs REST ?

I'm building an ajax heavy application (client-side strictly html/css/js) which will be getting all the data and using server business logic via webservices. I know REST seems to be the hot topic but ...
1
vote
1answer
491 views

Securing Back End API for Mobile Applications

I have an application that I am writing for both iOS and Android; this application will be served by a ReSTFUL API running on a cluster of servers on "the internets". I am curious how the rest of the ...
3
votes
2answers
189 views

What are the key points to evaluate to select a good SMS gateway?

We are planning to add a "SMS verification account" option for our customers. (So we will only send SMS. We do not need a short code.) We have found several companies who offer SMS gateways through ...
2
votes
2answers
1k views

Challenges in multi-player Android Game Server with RESTful Nature

I'm working on an Android Game based on Contract Bridge, as a part of my college Summer Internship project. The game will be multi-player such that 4 Android devices can play it, so there's no BOT or ...
1
vote
1answer
523 views

Designing A 2-Way SSL RESTful API

I am starting to develop a WCF API, which should serve some specific clients. We don't know which devices will be using the API so I thought that using a RESTful API will be the most flexible choice. ...
6
votes
1answer
2k views

When should I use AtomPub?

I have been conducting some research into RESTful web service design and I've reached what I think is a key decision point so I thought I'd offer it up to the community to get some advice. In keeping ...
36
votes
2answers
2k views

What is the proper way to do REST?

Everybody nowadays does SOA, even if some don't actually understand what is all about. So they do it wrong. Using that as an analogy I know what REST is (or at least I think I do) and want to do some ...
5
votes
2answers
1k views

What is the benefit of hypermedia (HATEOAS)?

I don't understand the benefit to HATEOAS for APIs intended for use by programs (as opposed to humans directly browsing your API). Sure, the customer isn't bound to a URL schema but they are bound to ...
0
votes
1answer
327 views

REST & Grails- A solution in search of a problem?

Over the past week, I've been struggling to adapt a Grails application to use the REST architecture. Problem is, I've had nothing but trouble throughout. For this application, the choice between ...
1
vote
1answer
2k views

REST and redirecting the response

I'm developing a RESTful service. Here is a map of the current feature set: POST /api/document/file.jpg (creates the resource) GET /api/document/file.jpg (retrieves the resource) DELETE ...
11
votes
4answers
10k views

REST vs RESTful vs “normal” web service - the same or not?

I've read a couple of definitions and discussion on REST and/or RESTful applications, but I still do not understand the real meaning of it. I usually work with the apps which either fetch data via ...
4
votes
4answers
2k views

Advice on which technologies to use for a client-server desktop application

I am writing a desktop application in Java which will allow clients to authenticate to a server with their credentials, and afterwards view and manipulate some data (orders, invoices, employees etc.) ...
3
votes
4answers
7k views

REST Service Authentication/Authorization

I have a WCF rest service that will be consumed by multiple clients. The information returned by the client requires me to know who they are, so that I can return information specific to them. Is ...
4
votes
4answers
4k views

Always return single objects in an array for REST API JSON payloads?

For a REST API that I am working on, I want to return JSON in a consistent layout: { "Data" : { "Id" : 123, "Email" : "charlie@somewhere.com" "Firstname" : "Charlie", "Surname" ...
4
votes
3answers
185 views

What is the preferred Internet media type of a RESTful POST request?

Is there a preferred/recommended Internet Media Type for RESTful POST requests? For example, if I want to add a new user, should I send the data as a URL encoded string like: ...
3
votes
3answers
887 views

Designing an API on top with Java RMI and Rest APIs

I'm working on the backend of a java web application. We have a document repository (Fedora Commons specifically) where we house xml files. I want to abstract the API of the repository internally so ...
3
votes
4answers
696 views

In Search of Automatic ORM with REST interface

I have this wish that so far Google hasn't been able to fulfill. I want to find a package (ideally in PHP, because I know PHP, but I guess that's not a hard requirement) that you point at a database, ...
3
votes
2answers
455 views

“Invalid operation” status code in a HATEOAS REST API

In a HATEOAS API links are returned which represent possible state transitions. A conforming client should just be retrieving and following those links, but if a non-conforming client is constructing ...
8
votes
5answers
4k views

RESTFul: state changing actions

I'am planning to build RESTfull API but there are some architectural questions that are creating some problems in my head. Adding backend bussiness logic to clients is option that I would like to ...
12
votes
6answers
582 views

Why is a small fixed vocabulary seen as an advantage to RESTful services?

So, a RESTful service has a fixed set of verbs in its vocabulary. A RESTful web service takes these from the HTTP methods. There are some supposed advantages to defining a fixed vocabulary, but I ...
15
votes
3answers
10k views

Should cookies be used in a RESTful API?

I'm specifically interested in how users perform authorized / authenticated operations on a web API. Are authentication cookies compatible with the REST philosophy, and why?
15
votes
4answers
6k views

REST - Tradeoffs between content negotiation via Accept header versus extensions

I'm working through designing a RESTful API. We know we want to return JSON and XML for any given resource. I had been thinking we would do something like this: GET /api/something?param1=value1 ...
10
votes
2answers
9k views

What is a recommended pattern for REST endpoints planning for foresighted changes

Trying to design an API for external applications with foresight for change isn't easy, but a little thought up front can make life easier later on. I'm trying to establish a scheme that will support ...