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

learn more… | top users | synonyms

3
votes
1answer
128 views

Can this be considered an API? [closed]

I'm writing my first API, but I think I screwed it up from the design. It's a simple CRUD API which behave like this: READ: /api/data gets redirected to api.php?data1=data. POST variables: user, ...
27
votes
6answers
7k views

Putting a password in a REST API call

Suppose I have a REST API that is also used to set/reset passwords. Let's also suppose that this works over a HTTPS connections. Is there any good reason not to put that password in the call path, let'...
1
vote
1answer
45 views

Architecture/technology for implementing Management console [closed]

I'm having a distributed environment which include several machines under the same network , which are being controlled by another computer in another network which is also running a UI for doing the ...
0
votes
2answers
113 views

Should my public webservices use HTTP or HTTPS?

The situation is a bit more complex than the title suggests (but not much). I'm working on a REST API that will have a few open / publicly available resources and a few with authentication. (The ...
3
votes
2answers
125 views

How do I model a sortable resource in sql database? [closed]

I encounter this issue when I create REST API. I cannot tell the exact scenario, but let's say it is for a website that has category and product resources. Each category has many products and both ...
1
vote
3answers
272 views

Soap vs. rest - a hybrid approach? [closed]

I have a proper SOA architecture, with web services defined with WSDL and responding to SOAP requests. But this application has also an endpoint that responds to json request and replies in json ...
2
votes
1answer
159 views

Can “REST without PUT” support optimistic locking using ETags?

Rest without PUT models immutable, append-only (event-sourced) state changes by favouring POST-ing new reified change resources over PUT-ing updates to original. Example: making and then changing a ...
3
votes
1answer
163 views

Why would a Rest Api demand a hash of the parameters?

I'm working with a Rest Api that demands to send with any request a hash of the parameters of the request: Hashkey Calculation This hash key has to be generated by the device itself and has to ...
3
votes
1answer
95 views

Image resolution in a RESTful interface

Background I have a RESTful HTTP API. I have a resource. GET /my/cat HTTP/1.1 Clients may want to retrieve the image representation of this resource. GET /my/cat HTTP/1.1 Accepts: image/png ...
2
votes
2answers
104 views

How are hypermedia rel values specified in the REST uniform interface?

I am learning a bit about REST and am intrigued by the concept of a uniform interface, and the ability of a client to follow hypermedia links in order to detect service capabilities. As I understand ...
0
votes
1answer
35 views

must all urls for a resource be same

I have a Resource named Company, that can have Post Resource, I have a path for create of post as: POST /api/company/{companyName}/post. My question is whether, must i use a path as PUT /api/company/...
2
votes
1answer
65 views

Using short-lived REST requests to obtain messages from a message queue for clients

I would like to put together a system where clients obtain messages from a REST API, but with the producer being able to use the semantics of a message queue: e.g. ordering of messages, a destination ...
6
votes
4answers
979 views

Should a REST API be able to convert datetime to appropriate clients timezone?

Whilst implementing our API, the issue of datetime and timezones came up. All dates are normalized to UTC in the database. Currently, in the non-API application, all datetimes are converted based on ...
2
votes
2answers
179 views

Rest api with a hello resource / main entry point

I'm designing a Rest API for our web application. There's one idea that came to my mind today and I haven't found in recent searches: a "hello" resource, where clients are supposed to connect as the ...
2
votes
3answers
431 views

Are colons ok in a REST API?

I see many REST API examples with URIs like http://<whatever>/widgets or http://<whatever>/widget/123, for a specific thing. For most things I would just stick with the front slash, but ...
2
votes
1answer
73 views

Modeling resources with links

Context To be fully compliant with the REST principles enumerate in Fielding's dissertation, a resource must contains links that redirect to other resources that have a relation with it functionally, ...
1
vote
4answers
166 views

Performing a username lookup before registering a User while conforming to REST philosophy

I have a REST Service based on Spring MVC. JSON is the only interchange format for any client to talk to this service. I'm working on implementing a user registration workflow. So I have created an ...
0
votes
2answers
112 views

REST Service Description in a Hypermedia agnostic way?

How do I implement REST service description in a Content-type agnostic way? Background I am developing a RESTful API for Web Application. Now this app is somewhat different than a standard run-of-...
1
vote
2answers
253 views

WCF service design

I am rather new to WCF (or rest, or Json for that matter) and I'd like to have some expert opinions on which methods to define. Some short introduction to give an idea of what the webservice should ...
1
vote
3answers
623 views

Best way to deal with Hibernate 1->Many relationship over REST/JSON service

Problem: A Hibernate bi-directional One-to-Many relationship does not map easily to JSON. If default (Jackson) mapping is used there is an infinite recursion issue as the parent contains the children ...
1
vote
1answer
219 views

Databaseless ASP.NET MVC 5 on top of an external REST API

Where you would envision an out-of the-box ASP.NET MVC 5 web application on top of an MSSQL database, I have now been placed in a situation where I'm supposed to use custom external token endpoints ...
1
vote
1answer
102 views

Is it correct to implement all the payment flow in the client rather than in the server?

I’m building a mobile app marketplace and I came to the point of integrating a payment tool. I'm using Mangopay, which has a nice workflow for making payments in a marketplace using its REST api. The ...
0
votes
1answer
89 views

sessions and stateless rest

I believe this question has been discussed to death. I was reading up on REST and it says that it has to be stateless. Yes i do understand there are application states and resource states. Taking ...
3
votes
3answers
2k views

Microservices REST or AMQP, which case

I've read many articles concerning microservices architecture and I was wondering when to use AMQP or REST. I've read that losing couple between services is a good thing and AMQP seems to be a good ...
1
vote
1answer
230 views

RESTful service layer with MVC

I need a advice on creating an architecture where I want API layer in between UI layer and business layer. UI layer should only consume REST services for displaying data. Reason for doing this is ...
0
votes
1answer
172 views

API Breaking Changes

I have a public REST API for creating new business profile records in my system. The request itself looks similar to this: { "BusinessName" : "AName", "CurrencyCode" : "USD" } You can see ...
1
vote
1answer
85 views

REST API and user rights

I am developing an application using Angular and REST API and I'm facing a problem concerning user access right. The application runs this way: A user signup The same user creates his organization ...
1
vote
1answer
49 views

Where to do post-processing of API call when used in MobileApp

Let's say I want to write an (iPhone) app, which tells you if you are in manhattan or not. This query involves additional computation after a google map API call (and is of course just an example). ...
23
votes
3answers
8k 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 authentication,...
0
votes
1answer
334 views

How to avoid LazyInitializationException using Hibernate and Jersey

I am working with Spring Boot + Jersey + JPA/Hibernate to build a RESTful API. The issue I am encountering right now is when I have a relationship in my JPA Entity that is lazy loaded I get a lazy ...
1
vote
0answers
45 views

Server responding with UI logic, String representations of data as string over flags

I think there isn't a large enough degree of separation between Business Logic, Data and Presentation in some of our products. I'm trying to explain this to collegues but I'm finding it difficult as I ...
3
votes
4answers
188 views

What HTTP status using for REST search query which returns nos results

I'm wondering how to manage empty results returned by search queries in a REST web-service : I there was a query like my_ressource_collection/{id} and the resource didn't exists i would return 404 - ...
3
votes
1answer
393 views

How should I pass login data from client to server using REST API

I want to create a new session, the new session will be created by logging in (naturally). Should I pass the username and password: via URL (POST request to session?username=:username&password=:...
1
vote
1answer
72 views

I am able to use PUT to act like GET when using my REST API

I wrote a simple REST API (just learning) using Go and I am calling it using python requests. I have two methods, "update_x", which updates the value of the resource, "get_x_times_n" which gets the ...
1
vote
3answers
139 views

Service oriented web architecture speed

Imagine a simple service architecture setup: single server where I have one service acting as a REST API (PHP), another service for rendering frontend (nodejs), and maybe a database service. They all ...
5
votes
1answer
2k views

REST API security: HMAC/key hashing vs JWT

I just read this article that is a few years old but describes a clever way of securing your REST APIs. Essentially: Each client has a unique public/private key pair Only the client and the server ...
8
votes
5answers
3k views

OAuth2 ROPC vs Basic Auth for public REST APIs?

The specific use case I'm interested in here is authenticating REST clients against publicly-available server endpoints (such as a public REST API). The simplest solution here is Basic Auth. But I ...
0
votes
2answers
705 views

Too many REST API calls on a page?

A web app designed with highly modular, small components (in this case using AngularJS directives but could just as easily be WebComponents, ReactJS components, or any other technology). Components ...
2
votes
3answers
103 views

How to consume standard routed API in a clean way?

Let's take an example of a generic API endpoint that looks as follows: https://api.imgur.com/3/gallery/{section}/{sort}/{window}/{showViral}/{page} Conditions on this endpoint are as follows: ...
2
votes
2answers
442 views

Designing a REST API: setting business logic error codes in http headers or within the response payload

I am designing a REST api backend that is meant to be consumed by a javascript front-end. I am not sure how to communicate server-side business logic errors (e.g. a user trying to retrieve his ...
1
vote
2answers
297 views

How do I prevent people from abusing my endpoint that accepts files? [duplicate]

So I have a Django app hosted on Heroku that has an endpoint which accepts image uploads. The images are saved to my AWS bucket, which is charged to me. Right now, I am able to upload images by making ...
6
votes
2answers
526 views

Rest design - Multiple calls vs returning all data in one call

I am trying to build a rest API for an android app. Suppose I have a users table with (id, name, email) and a songs table with (id, song_name, album) and a rich join association between them as ...
2
votes
0answers
126 views

Architecture: mobile apps for different clients with their own dbs different servers?

My general feeling is that this is a question which must have been answered but I am struggling to find resources for it. I know little about mobile app dev but my knowledge of web services is pretty ...
1
vote
2answers
325 views

REST autocomplete endpoint design

We're designing a rest endpoint for retreiving name autocompletion suggestions for hotel names. Currently it's defined like this: GET /suggest/:term, so that if you queried `/suggest/hil' you would ...
0
votes
1answer
88 views

Combining Fitnesse, .NET and RESTful APIs

I know there is Fitsharp for combining Fitnesse and .NET. And there is RestFixture to combine Fitnesse and REST. Is there a way to test a RESTful service with Fitnesse under .NET? If not, is there ...
1
vote
1answer
465 views

Rest Client API design and implementation (with RestEasy)

I am working on a design to create a generic rest client for our application for current and future integration's with multiple services (different external systems). Following is a high level diagram ...
2
votes
2answers
296 views

Restful User/Password Authentication

I'm currently designing a REST-API with the following properties: Backend for a single page application (Later Apps) Integrated user database for each instance HTTPS/TLS only Authentication with ...
16
votes
1answer
556 views

Rest APIs - mobile specific challenges

I'm working on a new iOS app project, on the mobile side. Some architecture changes are happening and it turns out we will have to rely on a custom built private API that will be used by the app we ...
5
votes
3answers
212 views

Designing CRUD part of an HTTP API

This question is in the context of web based applications. A web server exposing an HTTP api for clients (e.g. running in a browser but not necessarily). Usually the web server would be connected to ...
3
votes
1answer
820 views

Handling Many to Many Relationship using Restful Uri

I am having confusion while choosing a database relation and Restful URI for application I am developing. I am making a simple library application with following requirements. Book can belong to ...