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

learn more… | top users | synonyms

6
votes
5answers
1k views

How to simulate a REST API?

I am working on a new project which will query data from a 3rd party REST API. This is for a real time sports data feed, so the feed only works when a game is actually taking place. Although the 3rd ...
-1
votes
1answer
670 views

A good design pattern for a Web API where models/enities are searchable by foreign keys [closed]

I was hoping someone might have some ideas on how to create a RESTful web API where models/entities are searchable by a foreign key. I see a a lot of tutorials where the functionality consist of ...
2
votes
3answers
403 views

Payment Gateways and RESTful API

I have a RESTful API that offers eCommerce functionality. One area I'm struggling to decide on the correct implementation is how to process payments. Lets say I have the following URI GET ...
1
vote
2answers
129 views

Should I Aggregate Web API Errors?

The Situation We are writing a REST API that performs validation up-front. The code is written such that it tries to find as many errors as possible. However, each error might correspond to a ...
1
vote
1answer
81 views

Should I use the new method/action to retrieve records? (Rails)

I have an admin controller that is just used for its index action which renders a view with the most recent updates to certain resources: class AdminController < ApplicationController ...
1
vote
1answer
214 views

What kind of user authentication do I need in for a restful web api

I am doing a restful web api with asp.net Web API 2 I do not want to use any form of cookies or basic authentication (send user/pass in cleartext thus SSL needed) I do not use/need claims stuff. I ...
10
votes
1answer
461 views

How discrete should a RESTful API be?

I've never built a RESTful API before and I am wondering how discrete should it be? For example lets say I have a customer which has a name, address, phone number, email address, language, etc. Does ...
0
votes
3answers
140 views

Is it OK to use email as an identifier in a RESTful URI?

I'm working with a team building a RESTful web service, and our current implementation utilizes the user's email as a unique identifier for the user resource, yielding URIs like the following: ...
1
vote
1answer
91 views

Pointers for transitioning from SOAP to REST based services

We currently have a SOAP based web service which is being used by various teams as the primary data source. We eventually want to transition to REST based services. We are reluctant to do this now as ...
-2
votes
1answer
157 views

Why use REST with PHP? [closed]

I am developing an app in Android, i need get information from a external database in mysql and i read about Rest.. REST is using HTTP verbs GET, POST, PUT, DELETE to respectively get, insert, ...
1
vote
3answers
256 views

is using a PUT with side affects acceptable (REST)

I want to create an undo history whenever the user updates a form. Because it's an update, I want to use a PUT request. However, I read that PUT needs to have no side effects. Is it acceptable to ...
2
votes
2answers
318 views

How to organize methods that check username/email availability in a REST API?

I am developing a RESTful API in my project, but I do not have experience on that. To fill these gaps I've been watching some videos, mainly from Apigee, which are great. One situation brings a lot of ...
3
votes
2answers
87 views

How should I specify locations where clients can resolve authorization problems in a REST API?

I'm working through an API design where a user's authentication will be verified by the presence of a valid forms authentication ticket in a session cookie. However, there are additional levels of ...
2
votes
1answer
90 views

What is the most elegant way to handle a loop between two systems integrated remotely by webhook events?

So I'm developing this small engine that does a remote integration between two systems in order to sync data, both systems have webhooks for create & update events, and both have APIs (one is REST ...
1
vote
1answer
345 views

Is it an implementation of a stateful mechanism for Rest API authentication?

In many articles about Rest API's best practices, it is recommended to not depend upon sessions on server side since it leads to a stateful mechanism. I currently use Play 2.2 framework, with a ...
3
votes
2answers
251 views

Shoud I directly return a string message or rather a i18n key when dealing with JSON api?

Suppose a rest api returning this json: { "status" : "fail", "data" : { "title" : "A title is required" } } Since the client application would always adapt the error message, would it be ...
3
votes
3answers
2k views

Why REST Api do not follow the Facade design pattern

In comparing REST [api] structure with a OO model, I see these similarities: Both: Are data oriented REST = Resources OO = Objects Surround operation around data REST = surround VERBS (Get, ...
0
votes
0answers
123 views

Designing the bridge between REST layer to service layer

I am working on a project and would like to expose some rest services. The technologies used are RestEasy, EJB and JPA/Hibernate. I have structured my app so that there is a clear delimitation ...
5
votes
6answers
1k views

How to safeguard a REST API for only trusted mobile applications

How do I make sure my REST API only responds to requests generated by trusted clients, in my case my own mobile applications? I want to prevent unwanted requests coming from other sources. I don't ...
1
vote
1answer
519 views

What is the limit on REST API resource levels

When designing a REST API, how deep should the resources levels go? For example; If I have the following database tables: Companies: ID, Name Employees: ID, Name, CompanyID Tasks: ID, Name, ...
0
votes
1answer
100 views

How to configure these REST API Resources [closed]

I'm still in the design phase of my REST API, and I'm a bit stuck on how to configure the resources. The API will be consumed by mobile devices (Android, iOS, and Windows). Communication through ...
5
votes
1answer
3k views

Authenticate native mobile app using a REST API

I'm starting a new project soon, which is targeting mobile application for all major mobile platforms (iOS, Android, Windows). It will be a client-server architecture. The app is both informational ...
4
votes
2answers
391 views

How is reactive logic programming different from functional programming?

As Reactive Programming model is perfectly suited to address the change propagation required for transaction processing, that is, when the server receives change (Insert, Update, or Delete) requests. ...
2
votes
1answer
264 views

Restful WebAPI VS Regular Controllers

I'm doing some R&D on what seems like a very confusing topic, I've also read quite a few of the other SO questions, but I feel my question might be unique enough to warrant me asking. We've never ...
2
votes
2answers
353 views

How to handle fine grained field-based ACL permissions in a RESTful service?

I've been trying to design a RESTful API and have had most of my questions answered, but there is one aspect of permissions that I'm struggling with. Different roles may have different permissions ...
0
votes
2answers
139 views

Initiating processing in a RESTful manner

Let's say you have a resource that you can do normal PUT/POST/GET operations on. It represents a BLOB of data and the methods retrieve representations of the data, be they metadata about the BLOB or ...
0
votes
0answers
320 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 -- ...
3
votes
1answer
6k 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
131 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
489 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
204 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
81 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
34 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
1k 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 ...
5
votes
2answers
2k 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
489 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
141 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 ...
0
votes
0answers
50 views

Is it possible to share oAuth Session?

We are working on a project that includes a web server and a mobile application, we need to access the user's private data (facebook, twitter ...) from the web server by requesting from the user to ...
1
vote
2answers
544 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
504 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
964 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
374 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
108 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
133 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
137 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
307 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
196 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
279 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
149 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
179 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 ...