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

learn more… | top users | synonyms

1
vote
1answer
287 views

Database data structures for RESTful api

I am creating a RESTful API. I am struggling to decide on the best way to design my database tables around my resources. Initially, I though a table per resource would be a good way to go, but I'm ...
11
votes
2answers
4k views

Trailing slash in RESTful API

I have been having a debate about what to do with a trailing slash in a RESTful API. Lets say I have a resource called dogs and subordinate resources for individual dogs. We can therefore do the ...
0
votes
0answers
484 views

design pattern to expose MongoDB to REST api?

We are setting up something like a document library on Amazon AWS. The architecture is basically 1. AMI server running MongoDB 2. A bunch of PDF documents on elastic block storage 3. Some server-side ...
8
votes
7answers
1k views

Will Authentication over HTTPS Slow My Application?

I am building a web application and RESTful web service. I have been reading various articles about the best way to authenticate the requests to the web service. The best option for me seems to be ...
1
vote
1answer
124 views

What's a good strategy for managing static data in an SOA?

I'm working on a web application that sits on top of a number of RESTful web services, interacting primarily with those services through JSON formatted messages over HTTP. Our application has a great ...
-1
votes
1answer
622 views

Appropriate selection of security framework [closed]

I have a web application to be developed using RESTeasy API and for this I have to implement security (Form based authentication). So i am not sure about the most appropriate fit for this. As I ...
2
votes
3answers
343 views

RESTful Design: Multiple Relationships Between the Same 2 Entities

I am in the process of designing RESTful web services and got stuck at one point. The design is very simple with 3 entities: - Project - Status - Employee The part I am having trouble with is ...
9
votes
2answers
4k views

Implementing the command pattern in a RESTful API

I'm in the process of designing an HTTP API, hopefully making it as RESTful as possible. There are some actions which functionality spreads over a few resources, and sometime needs to be undone. I ...
15
votes
3answers
916 views

Does decoupling trump DRY in REST?

I am building a REST API to expose most of functionality of an existing Java API. Both APIs are for internal use within my organization; I do not have to design for external use. I have influence ...
6
votes
3answers
6k views

The best way to implement authorization for a REST API

We develop social-based applications for mobile. Every application consumes RESTful API web-services. When I implement login I usually store the username and password somewhere on device. Then I send ...
6
votes
1answer
9k views

PHP Framework for RESTful Web Service [closed]

I have been going round in circles with this question for days - which is the best PHP framework to use to create a RESTful Web service? I've trawled the web for info and have come across three main ...
6
votes
2answers
416 views

Versioned Resources to Improve Cacheability

Here's an API concept which could be useful for performance optimisation. It's an example of key-based cache expiry applied to a broader internet-wide context instead of the internal Memcached-style ...
9
votes
3answers
2k views

Represent actions(verbs) in REST URI

I have a print operation to perform for my customer documents. I need the other standard operations to be performed as well, like add,update, delete. so, I have following: For creating new ...
10
votes
7answers
2k views

Is this “anti-pattern” and should I stop using it or is this clever design?

I've basically stared to do the following when creating a REST service: HTML is requested service returns the desired web page but without the requested "resource", eg. data web page contains ...
15
votes
3answers
5k views

When are RPC-ish approaches more appropriate than REST?

After watching this talk on REST, Reuse and Serendipity by Steve Vinoski, I wonder if there are business cases in greenfield projects for (XML-)RPC-ish setups, that REST could not solve in a better ...
2
votes
1answer
288 views

REST efficiency on count and sum methods

For example, if I have a Customer Transactions Table and I create a REST for it. The fields are: date, description, and total_amount. I am trying to figure out which one is much more efficient when ...
10
votes
3answers
918 views

How to do external API testing (blackbox)

Assume you are using APIs from a vendor, how to make sure their API is working as expected? My main concern is sometimes the vendor pushed the changes to their code and break the API, we want to have ...
2
votes
1answer
617 views

Tomcat 7 vs. ehCache Standalone Server (Glassfish) Configuration with RESTful Web Services

My requirements consist of using ehCache to send and store data via RESTful web service calls. The data can be stored in-memory or via the filesystem... Never used ehCache before so I am having some ...
4
votes
3answers
241 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
142 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
195 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
432 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
657 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
714 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
482 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
2k 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
2k 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
359 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
1k 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
263 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
904 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
3k 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
160 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
172 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 ...
13
votes
2answers
7k 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
687 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 ...
5
votes
3answers
6k 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
942 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
5k 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
542 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
2answers
2k 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 ...
35
votes
4answers
41k 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
722 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 ...
23
votes
2answers
19k 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
514 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
201 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
2k 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
635 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. ...