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

learn more… | top users | synonyms

17
votes
6answers
2k views

What to call an HTTP API that is not RESTful? [closed]

What would you call an API that is HTTP-based, uses URI to name resources and HTTP verbs (PUT, POST, DELETE, GET...) to manipulate those resources? According to Roy Fielding's complaints it is not ...
-1
votes
0answers
29 views

J-Boss, Jackson, RESTEasy: what do these RESTful tools do?

I'm sure that question seems very asinine. I understand the purpose of these sorts of tools is to… Remove an unnecessary outer layer of Java servlet code that can be replaced by annotations. Handle ...
2
votes
2answers
82 views

Is it correct to use PUT with multipart content?

We are using Spring and want to implement a REST with a "override file" call so we think using PUT verb with a multipart body only to find that Spring don't accept it. My question is it can't be done ...
1
vote
1answer
70 views

What's the proper name for the type of security where we secure resources by ownerrship?

I work on a REST API that mixes two types of security: First you have standard role-based security - so we have multiple roles such as administrator, read-only user, super user user, etc. Then we ...
4
votes
1answer
72 views

Considerations for decoupling and refactoring business logic to a REST API

We've got a .NET Solution consisting of a MVC Website and a bunch of libraries for business and data logic. In the past the website was the only way to interact with our business logic, but we're ...
-3
votes
0answers
32 views

Connecting ASP.NET and Android applications to the same Database

I am starting to build a web application with ASP.NET which will help people who are looking for rides inside a city find drivers offering rides from defined start points and destinations. The web app ...
7
votes
3answers
127 views

In REST parlance what is the difference between a resource and a representation?

My understanding of REST that is enables modelling service operations as representation of state and transition from one state to another making use of HTTP. I have always understood resources as ...
0
votes
2answers
44 views

Modelling a REST Object Question (Python)

I have a REST API that I want to model in a class so I can access the properties using the dot notation (JS list notation). I explicately defined the properties on my class using the @property tags ...
0
votes
1answer
74 views

REST is not appropriate for business applications because of necessary to distribute business logic accross layers. REST alternative required!

I have Spring+Java Server Faces (Facelets) application for which I would like to create Single Page Application (SPA) version, e.g. using AngularJS (which is the best and most popular GUI framework). ...
4
votes
2answers
196 views

Creating entities with validated Addresses via REST API

I am building a REST service. This services enables the user to create an entity that has an Address. For simplification, let say this other entity is 'House', so 'A House has an Address'. The system ...
2
votes
3answers
120 views

Correct RESTfull way to refresh a resource

Imagine we have resources like reports. We have a collection because every report contains its own settings to build some data. Every report calculates its values on regular basis but not to often. ...
5
votes
3answers
14k 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
1answer
38 views

Eventing solutions for java legacy applications too old for real JMS queue/topic eventing?

What are some architectural solutions that can mimic eventing for systems (Java) that are too old to implement eventing solutions, such as conventional Queue/Topic based JMS messaging? I have a ...
2
votes
2answers
103 views

Warnings in a REST API as not critical errors

I have a REST API that for some of entpoinds like DELETE, POST or PUT I have some validation rules that can return an error. Now I need a new type of an error like a non-critical error, that it ...
5
votes
1answer
118 views

REST API - What HTTP code should be returned when resource is not in a state required to complete the operation?

Our API accepts PUT requests in order to change status of resources. Think of this as a state machine. Client can specify the target state of the resource via PUT request but it is possible that the ...
3
votes
1answer
120 views

How do I go about setting up my Sinatra REST API on a server?

I'm an iOS developer primarily. In building my current app, I needed a server that would have a REST API with a couple of GET requests. I spent a little time learning Ruby, and landed on using ...
4
votes
5answers
185 views

Proper RESTful web service response code usage

Assuming I create a RESTful web service that looks up a user in a database given the id as a parameter. If the user does not exist, should I return a 404 response (because user not found)? Or a 200 ...
7
votes
2answers
121 views

Prevent abuse to REST API endpoint

Question 1 I have a login API endpoint http://127.0.0.1:8080/api/account/login It checks if the phone number has been validated. If not it will call POST http://127.0.0.1:8080/api/account/sendsms ...
0
votes
1answer
77 views

How to design a system that interacts with several competing REST APIs? [closed]

Understandly is a web application that lets people manage the translation of marketing content (such as AdWords campaigns). Currently, people have to use "their own" translators. We're looking to ...
4
votes
2answers
162 views

Ubiquitous language and maturity level in REST API?

According to Richardson Maturity Model there are several levels of maturity in REST approach. http://martinfowler.com/articles/richardsonMaturityModel.html Since DDD uses ubiquitous language, I am ...
7
votes
3answers
219 views

Best solution to authorize that a user is only allowed to modify/act with their own resources in a REST API

Background: Currently in the process of building out a REST API, using node w/express and it is consumed by a mobile app and eventually a (modern browser based) website. I'm trying to identify the ...
2
votes
1answer
73 views

How can I find out network latency in rest service

I have two Java applications deployed on tomcat. For inter application communication I provide jar file of application (Java API) to other application and it becomes a method call which is fast. Now ...
1
vote
1answer
44 views

Sync client-side data after service invocation in SPAs

Here's a simple scenario: We have a list of tasks and can mark a task as completed by invoking a web service. Doing so will transition the status of the task to completed as well as initialize a ...
2
votes
1answer
37 views

RESTful HTTP and websocket in the same application?

If an application has already an opened WebSocket for live feeds, should I use it over AJAX for the other communications with the server? Because the connection is already opened, should we use it ...
3
votes
1answer
59 views

RESTful API/Data Modeling - How to model an subordinate resource that will only ever have one element

I'm creating an API and data model for a multi-user document-creation application and I'm having trouble with a particular part of the data model/API design. Below is my current line of thinking: ...
4
votes
1answer
156 views

How to build notification system in Azure

I have a system running in Azure that accepts messages via a REST endpoint. The customer has a certain number of devices that send some data for example temperature and we present this data in a web ...
13
votes
3answers
519 views

HTTP Status Code for “Still Processing”

I'm building a RESTful API that supports queuing long-running tasks for eventual handling. The typical workflow for this API would be: User fills in form Client posts data to API API returns 202 ...
1
vote
3answers
72 views

Alternatives on how to deal with data fetched from external API

We are planning to build a web application which will consume data from an internal REST API that centralizes all of our "core" business data. For matter of demonstration, let's say this API exposes ...
1
vote
1answer
23 views

Rate-Limiting in an OAuth REST API: per token or per consumer?

I am building a REST API and intent to use rate limiting (using the leaky bucket algorithm) as a way to protect against crawling and enumeration. The API will be consumed by a Mobile/Tablet App ...
1
vote
1answer
39 views

Am I making use of REST if I have implemented an Android app that connects to a localhost?

Would I be using REST or would my app be considered RESTful if I was using the Google Volley library to connect to a database on localhost?
28
votes
2answers
12k views

Suggested HTTP REST status code for 'request limit reached'

I'm putting together a spec for a REST service, part of which will incorporate the ability to throttle users service-wide and on groups of, or on individual, resources. Equally, time-outs for these ...
-1
votes
1answer
122 views

Code structure of third party framework [closed]

Is an API always returning 200 OK, an issue?
23
votes
7answers
16k 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
0answers
21 views

Implementing real world Consumer-Driven Contracts in a single web application

I've been leaning towards the idea of Consumer-Driven Contracts in order to allow separate API consumers evolve on their own. To approach this concept initially I'm tempted to dip my toes in slightly ...
5
votes
9answers
4k views

Convincing a Client to Offer a RESTful Web Service instead of a SOAP Service? [closed]

BACKGROUND: I develop custom WordPress plugins for my clients that they then distribute via the WordPress plugin repository. I'm increasingly running into clients who want my WordPress plugins to ...
2
votes
1answer
134 views

REST api design: How to manage multiple type of resources in URL?

Lets say I have an Organization and Users inside that organization. To get a user in particular organization what should be the GET request url from below options? 1. ...
19
votes
3answers
6k views

REST API security Stored token vs JWT vs OAuth

I am still trying to find the best security solution for protecting REST API, because the amount of mobile applications and API is increasing every day. I have tried different ways of ...
0
votes
1answer
60 views

Should models be returning data directly to the client, or to the controller instead?

Disclaimer: This is my first time: using node, creating a REST API, and trying out MVC server side. (so, just statistically speaking, I'm probably doing something wrong ¯\_(ツ)_/¯) I'm working on ...
1
vote
4answers
106 views

Where is the place for contracts/protocol in RESTful communication?

I am trying to explore and understand RESTful approach to things. I've read that the interface be should not be contractual. That is what I get from HATEOAS. But surely there must exist some ...
5
votes
2answers
1k 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 ...
6
votes
3answers
68 views

RESTful way of requesting server generated resource

I want a server to be a producer of tasks for the client to process and be sent back. What is the proper HTTP method in RESTful approach to create and return a new resource? This seems silly, but the ...
4
votes
1answer
44 views

How to structure path-colliding REST webservices with role-access

I have a bunch of REST webservices that my client uses. For instance, to create a user, I have POST /users and to modify it POST /users/{id} The problem is, some fields, as marketArea, are ...
1
vote
3answers
112 views

REST: Can I use POST request to read data?

Is it against best-practices to use a POST request to read data? Are there any exceptions to this? e.g. Authentication requests where you have to POST data to perform a read action. I have an API ...
10
votes
3answers
359 views

RESTful API. Should I be returning the object that was created / updated?

I'm designing a RESTful web service using WebApi and was wondering what HTTP responses and response bodies to return when updating / creating objects. For example I can use the POST method to send ...
11
votes
8answers
6k views

Which HTTP verb should I use to trigger an action in a REST web service?

I am implementing a RESTful web service and one of the available actions will be reload. It will be used to reload configurations, cache, etc. We started with a simple GET to an URI like this: ...
0
votes
3answers
97 views

Should REST APIs contain the ability to dispatch email?

When building a service that uses both a back-end REST API, and (a) front-end application(s), is it proper to build into that API the ability to dispatch email? Take Twitter for example; for those ...
4
votes
1answer
113 views

Boolean endpoint within a RESTful API

I am currently designing a JSON RESTful API which should have a boolean endpoint such as /item/vote which can either be false meaning that a user has not voted for a specific item or true meaning that ...
-2
votes
2answers
166 views

Where is it implied that REST is not based on HTTP [closed]

I've been over Fielding's paper on REST and all over the web, including StackOverflow trying to understand this. After reading everything I can about REST, I was under the impression that Fielding ...
6
votes
1answer
117 views

Paging Strategies : Page Token vs Skip/Start Index

I am seeing that more and more new APIs use page tokens to let the user move between the pages of results containing a lot of items. However from an API designer point of view I'm not clear on what ...
6
votes
1answer
98 views

Implementing a composite REST service

The past years I have had the need to implement business logic in a larger type of service, most often orchestrating a handful of atomic/microservices. Operations like "search and update document, ...