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
2answers
437 views

Is this a secure solution for RESTful authentication?

I need to quickly implement a RESTful authentication system for my JavaScript application to use. I think I understand how it should work, but I just want to double check. Here's what I'm thinking -- ...
4
votes
1answer
8k views

Session in RESTful web services, how it works?

In a web services, how does the server know which request belongs to which session? I know that for a web application, the web server inspects the cookie (or the sessonId query parameter in case ...
0
votes
1answer
135 views

Is ROA a specific form of doing SOA?

I have read somewhere that ROA (Resource Oriented Architecture) is SOA (Service Oriented Architecture) with specific constraints added. SOA is the abstract concept of combining discrete pieces of ...
2
votes
1answer
615 views

Role based access to resources for a RESTful service

I'm still wrapping my head around REST, but I wonder if someone can help with any suggestions or approaches to role based access control for a RESTful service, particularly from the point of view of ...
0
votes
1answer
214 views

The balance between client and server functionality

I want to bring the discussion that started in our teams and get your opinion about it. Assume we have an user account which could have different credentials for authentication and associated email ...
3
votes
2answers
86 views

REST partial bad request

I'm implementing a REST method that allows you to post a list of items. If all data is correct I obviously return a 201 and if all data is incorrect a 400. What would be an appropriate response code ...
0
votes
0answers
38 views

Which timeout should I set to an external service?

This service is a remote session pool. I need to ask for a session to work with other services. In most cases, this pool will have a session available, so in 15ms I will have a response. But ...
1
vote
2answers
2k views

REST or a message queue in a multi-tier heterogeneous system?

I'm designing a REST API for a three-tier system like: Client application -> Front-end API cloud server -> user's home API server (Home). Home is a home device, and is supposed to maintain connection ...
6
votes
2answers
3k views

Comparing TCP/IP applications vs HTTP applications [closed]

I'm interested in developing a large-scale user-facing website that is written in Java. As for design, I'm thinking of developing independent, modular services that can act as data providers to my ...
5
votes
3answers
531 views

OAuth alternative for a 2 party system

I'm writing a RESTful service (Java EE, Jersey) and a client application that communicates with it, and I wish to secure it and store any usernames & passwords dedicated in my own database. I do ...
3
votes
1answer
145 views

What are the best practices and pitfalls of doing a JS app powered purely by RESTful API? [closed]

We are starting to build a new app and I would like to explore the idea of doing a thick JS client (backbone / angular) with only RESTful API exposed by our application layer. What are some of the ...
1
vote
2answers
571 views

Can REST, Ajax and jQuery work well together?

I'm trying to use REST (usign spring MVC) as my Ajax backend but got some problems when using it with jQuery. REST best pratices recommend using HTTP status code, e.g. 200, 403, 401, etc, and I have ...
-1
votes
2answers
545 views

SQL API instead of a REST API? [closed]

What are the pros and cons of exposing an SQL API instead of a REST API? Let's assume that this would be a private API – the API developer and user are on the same team. Probably the biggest problem ...
1
vote
2answers
1k views

Django REST + Backbone/Ember/Angular Implementation Method

http://stackoverflow.com/questions/10941249/separate-rest-json-api-server-and-client In light of this post, I wanted to ask questions regarding Django and specifically the implementation methods of ...
1
vote
1answer
408 views

Applying DDD principles in a RESTish web service

I am developing an RESTish web service. I think I got the idea of the difference between aggregation and composition. Aggregation does not enforce lifecycle/scope on the objects it references. ...
2
votes
3answers
113 views

Specifying the format in which I want to get a response through POST

It's a good practice to let a client specify the format in Web REST API: GET /api/items/123.csv However, not only GET can return some answer, but POST also can do Status: 201 Created { mgs: ...
2
votes
3answers
136 views

HasMany RESTfull Implementation

So I've been reading a lot on RESTfull design - specifically dealing with resources. Taking the canonical example of Users, Posts, and Comments, with relationships as: Users ---(hasMany)---> Post ...
1
vote
3answers
147 views

Is POST for an element generally not exposed or invalid in REST APIs?

I was browsing around wikipedia on REST, reading specifically the section on REST APIs Reading the different ways to treat elements from collections I read that POST is not generally used. How does ...
2
votes
1answer
321 views

Design Issue: Service layer/ trying to maintain RESTful architecture

I'm trying to design a web-application - and after doing a lot of reading on REST + design patterns, I'm at a loss on how to handle my requirements. I think I may be getting caught-up in all the ...
2
votes
1answer
250 views

REST Relationships Besides Parent/Child

This would seem to be a pretty basic question, but I can't seem to find appropraite guidelines for it. What is the "restful" way of POSTing a relationship between two entities that are not necessarily ...
3
votes
2answers
296 views

Should a RESTful API provide data for an entire form?

Let's say I have a JavaScript web application which entirely uses a RESTful API for data. Let's say this application has a data form, and let's say I'm editing a record at /product/12345. When ...
1
vote
1answer
170 views

How to Track File Uploads and Return Upload Status with REST?

The users for our software will want to upload potentially large amounts of files in bulk to our servers. It is then desired that we display the upload status any time the user views the upload ...
1
vote
2answers
183 views

Returning view code in an API response

I have an API that returns a JSON formatted array of users within a given pair of lat/ long bounds. I'm using this data to plot a number of markers on a map, based on the location of each user. I ...
2
votes
1answer
277 views

Rest API and caching data

I have developed an application where you should be able to browse products catalog(READ ONLY) even network access is down no wifi or 3g/lte etc. Clients(windows,ios,android etc) consume the rest api. ...
2
votes
2answers
503 views

Should an Http API always return a body?

Is there some sort of standard regarding http api responses? After reading this discourse thread I started to wonder. We are developing our public http json api at my work, and we do not return ...
2
votes
2answers
3k views

Is it safe to transmit access tokens via HTTP headers?

It's the first RESTful web service and I am concerned about security issues. Is it safe to transmit my access token via HTTP headers? For example: POST /v1/i/resource HTTP/1.1 Content-Type: ...
1
vote
2answers
249 views

Architecture for REST consumer [closed]

Are there any good samples of web applications that consume restful web services? I am developing a webapp with spring, and have come to the point of reading lists of elements and element details ...
3
votes
1answer
116 views

Modelling REST endpoints with data that not all users have access to

I am trying to figure out the best way around a small problem i have with a design for a Hypermedia API i am currently building. I have a notion of a site, very simple doesn't have much going on and ...
8
votes
2answers
3k views

How should a REST API handle PUT requests to partially-modifiable resources?

Suppose a REST API, in response to a HTTP GET request, returns some additional data in a sub-object owner: { id: 'xyz', ... some other data ... owner: { name: 'Jo Bloggs', role: ...
5
votes
3answers
3k views

Is it OK to return HTML from a JSON API?

On my current project I am responsible for the implementation of a service which involves the consumption of newly created RESTful APIs, documented as solely supporting JSON. The client consistently ...
1
vote
0answers
372 views

Is OAuth (2.0) is the right choice to make WCF WebService secure?

I have WCF webservice which serves to various mobile application. This was implemented with typical HTTPS/SSL. But there are some cases like Replay Attack needs to be considered in the security ...
1
vote
1answer
409 views

necessary to migrate to Web API from MVC controller

Since the released of Web API, I've been wondering whether it's necessary or helpful to migrate/change MVC controllers to use Web API calls. Since it's hard to describe code I'll show an example of ...
-4
votes
3answers
5k views

When to use REST to handle requests vs using AJAX to handle requests [closed]

On my web page, if I wish to display dynamic dropdowns (e.g city names based on country selected), I can do it using AJAX. But I can also do it using a REST call. So which should I use? My problem is ...
19
votes
4answers
2k views

How should I architect a RESTful webservice to use 3rd party (i.e. Google, Facebook, Twitter) for authentication?

For my job we have a nice RESTful webservice we've built out that we use to drive a couple websites we have. Basically the webservice lets you create and work with support tickets, and the website is ...
5
votes
3answers
2k views

Can a webservice that uses JSON over POST be classified as RESTful?

Recently I have started using a new(to me) paradigm for web services. I use the controller to accept JSON strings sent over POST, process it and return JSON strings. GET, PUT, DELETE and other methods ...
4
votes
3answers
1k views

What can REST API do that a API using HTTP URL query strings cannot do?

I'm learning about REST and had the chance to build a basic REST API. After doing so, most of the material I read was internalized and I now have a better understanding of it. However, I do not ...
5
votes
1answer
2k views

What is the proper way of nesting resources in REST model?

I'm designing a REST API of service and got stuck on proper way to nest resources. Resources: partners, tickets, settings Connections between resources: partner has many tickets, partner has set ...
-1
votes
3answers
1k views

Why is aggregation function bad idea for RESTful? [closed]

As title: Why is aggregation function bad idea for RESTful? Although I know CRUD is good for RESTful. For example, the resource is 'employee', and client needs to retrive sum of total 'salary' of all ...
1
vote
3answers
268 views

Rest API Architecture from Rest in Practice book

We maintain an API that as part of its purpose makes a call to an external API. This external API takes a few seconds to fulfil the request we make to it. With our current architecture the request is ...
1
vote
4answers
181 views

Provide both RESTful interfaces and Java ones?

I am writing a RESTful service in Java, of course it's typical HTTP based interface. I am wondering should the service provide Java interface which has same semantic to the RESTful interface? I think ...
1
vote
1answer
609 views

Combining Single Page Application and DDD with a REST API

I'm creating a web application which on the client side consists of a Single Page Application (with Durandal) and on the server side an ASP.NET MVC site with a Domain Driven Design. The two are ...
4
votes
2answers
503 views

Where to Perform Authentication in REST API Server?

I am working on a set of REST APIs that needs to be secured so that only authenticated calls will be performed. There will be multiple web apps to service these APIs. Is there a best-practice approach ...
8
votes
5answers
3k views

REST API concepts

I have three questions about REST API design that I'm hoping someone can shed some light on. I've searched relentlessly for many hours but haven't found answers to my questions anywhere (maybe I just ...
4
votes
3answers
605 views

Best Practice: Should error messages be handled by the API or by the App?

I am designing an application that interacts with a RESTful API. When returning error messages like Unable to sign up user Should the error message be generated by the app? or by the API? I am ...
19
votes
2answers
1k views

Levels of user permissions in a RESTful API

Let's say I have a company that ranks the cutest cats on the internet. I offer a resource at /cats/ which provides users with the latest, cutest adorable cats. Users can either get just the top 3 ...
2
votes
1answer
67 views

Modelling a resource that may not be part of the parent resource

I am designing an API and am having a couple of problems with certain parts of the resource modelling. I have the notion of a SurveyItem which as a collective form a Survey: Survey Resource ...
9
votes
3answers
760 views

Are there strategies for discovering REST services using HATEOAS?

When building a REST service with the HATEOAS constraint, it's very easy to advertise the existence of resources through linking. You make a GET to the root of my site and I respond with the root ...
0
votes
2answers
75 views

Working with data and meta data that are separated on different servers

While developing a product, I've come across a situation where my group wants to store meta data for data entry forms (questions, layout, etc) in a different database then the database where the ...
3
votes
3answers
246 views

RESTful applications logic and cross resource operations

I have an RESTful api that allows my users to receive enquiries about their business e.g. 'I would like to book service x on date y. Is this available?'. The api saves this information as a resource ...
16
votes
10answers
4k views

When does SOAP make more sense than REST? [duplicate]

From my understanding of REST, the implicit assumption is that all operations are CRUD operations. Sometimes, you are not doing CRUD operations and are doing some more complex logic. In this case, is ...