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
57 views

null vs missing key in REST API Response [on hold]

Say in my application, some users give us their last name, and others do not. In a REST API response, which body is preferred: With a "null" value: {"firstName": "Bob", "lastName": null} Or just ...
1
vote
1answer
76 views

REST - Recommendation route: POST or GET?

I'm building an api route which will pull data from our server. This data is sorted in an arbitrary (changing and unknown to the client manner), and will never return the same data more than once. ...
1
vote
1answer
51 views

Is hiding complexity from API clients by merging resources a correct practice?

So let's say we have three simple resources: Groups, Users, and GroupUsers. Groups - Represent interest groups which can be subscribed by users. { name: 'Colorado Mountain Biking Group' ...
0
votes
2answers
71 views

How should an API or server respond when a device connects with a different account than it is bound to?

In my system we have users accounts and user devices. Rules: A user can have only one user account. Each user can have many devices. A device can be bound to only one user account. Upon initial ...
0
votes
1answer
36 views

API authentication with a single ID

A typical API authentication usually rely on a pair of API ID + SECRET, my question is: if the API ID is unique and randomly generated and is considered strong enough (e.g. SHA512), why a SECRET is ...
6
votes
3answers
96 views

REST API design: POST (implicit userId) vs PUT (explicit userId)

For some routes on an API, like GET /news, one would asume the user only wants news that pertains to them, so the userId is implicitly taken from authentication info. However, some of the routes on ...
1
vote
0answers
40 views

Will using a pure MQTT approach be the right decision?

I plan to provide additional functions for a closed-source 3rd party point of sales application. That application is used in restaurants, is run on Windows and uses dbase style databases. I know the ...
2
votes
3answers
79 views

Large file / data transfer in a Microservice Architecture

My company is currently working on adopting a microservice architecture but we are encountering some growing pains (shock!) along the way. One of the key contention points we are facing is how to ...
3
votes
1answer
100 views

How to avoid multiple calls to a REST API? [closed]

Suppose I have a REST API and I can fetch the list of my friends and the favorite songs of each friend in my list. Now I want to fetch all favorite songs of all my friends. The problem with REST API ...
-1
votes
0answers
36 views

Spring Java based configuration

I am trying to write web application in java without using frameworks, but decided to use Spring for request handling layer. In that case should I configure Spring in a different way than as in case ...
2
votes
1answer
72 views

How should pagination allowing links to arbitrary pages be handled in a RESTful API?

How should a RESTful API handle pagination in the situation where a client may want the ability to jump to arbitrary pages? Let's assume we are using the Link header in the way the GitHub API does: ...
-1
votes
1answer
65 views

JSON Web Token & RESTful Web Service - How to securely store the Secret Key?

I was building a RESTful Web Service when I came across JSON Web Tokens as an alternative to traditional cookies for authentication. The concept core of this method is that the server is the only ...
1
vote
0answers
56 views

Simple REST API calls using Spring? [migrated]

Okay I'm having a simple REST API that is now running. I also got a mobile app (Android) that would be ready for some network communication. But here is the thing: I now got a fancy API created with ...
2
votes
2answers
51 views

What is the function of URLs as “key” names in markup used for a RESTful API?

I just finished reading REST in Practice as my first* introduction to REST APIs. I found the book quite enlightening, but am left with one nagging question, and Google has yet to clear it up. This ...
3
votes
2answers
158 views

Is embedding URLs as query parameters in URLs an acceptable REST API design pattern? [closed]

We are designing some resource oriented web services. Service B needs to be able to make calls to Service A passing in a reference to a resource in service B that service A will use when formulating ...
5
votes
2answers
66 views

Partitioning REST API resources into areas based on business domains

In a major application REST API that covers several related domains, does it make more sense to split resources into 'areas' based on the business domain they belong to or is it better to to maintain ...
14
votes
2answers
301 views

Conceptual mismatch between DDD Application Services and REST API

I'm trying to design an application that has a complex business domain and a requirement to support a REST API (not strictly REST, but resource-oriented). I have some trouble coming up with a way to ...
0
votes
1answer
47 views

Calling RESTful service from browser and handling 4xx class responses

I have a resource called Logins, and I invoke a GET via AJAX from the browser. The current behavior is to return a 404 when the specific login cannot be found. I'm using this to check whether a ...
8
votes
2answers
185 views

Role-based REST API?

I'm building a REST API for which several users with different roles will have access to the resources it contains. To keep the scope simple let's take the "student/teacher/class" domain: GET ...
0
votes
0answers
91 views

How long should a GET request via a REST call take? [closed]

I am building a Single Page Application, and get the data through a REST API from a PHP backend. The admin view contains a list of all available websites in the system. There, a website is an object ...
6
votes
1answer
147 views

RESTfully Returning Diagnostics Data With Response

In a REST API I am working with, under certain circumstances (ex/ request originated in network) diagnostics data is returned with the response. Right now, a property is appended to the root object of ...
2
votes
4answers
236 views

why do people do REST API's instead of DBAL's?

At the past two companies I've been at REST API's exist for querying data via a web app. ie. instead of having the web app do SQL directly it calls a REST API and that does the SQL and returns the ...
0
votes
0answers
53 views

REST Services with ASP MVC WebApi architecture feedback

I'm working on a new project and I had to design some REST Services with ASP MVC WebApi. I would like to show you my app architecture and learn from more experienced architects what I have ...
0
votes
0answers
45 views

what is the relationship between CORBA, JMS and MDB?

In the context of my previous fuzzy question on microservices, please help me break down the terminology involved in these technologies: CORBA JMS MDB Utilizing JNDI, I believe it's possible to do ...
14
votes
6answers
1k 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
vote
1answer
50 views

REST API, nested routes without providing identifiers at every nested level

Obviously a RESTful API could contain base routes such as: api/competitions api/competitions/{id} api/teams api/teams/{id} api/players api/players/{id} And nested routes such as: ...
3
votes
2answers
65 views

Does sending system-profile information with HTTP GET request conform to RESTful practices?

I'm using the Sparkle framework to update an app, and want to make use of the framework's ability to send system-profile information. The way this is done is by adding the information to the HTTP GET ...
0
votes
0answers
42 views

Richardson Maturity Level 3. What about form input

In many ways RMM level 3 is similar to the world wide web we know where every resource is available with the click of a link. In www we have links, but we also have forms where a form with ...
2
votes
1answer
140 views

Mixing REST and websocket in the same API

A bit of background first, I'm working on an application that manages a piece of physical equipment with motors, stuff like that. When I started on the project, there was an existing application, ...
1
vote
2answers
118 views

Testing front-end app that hits a REST service

A lot of questions about testing here... And I have another one. Forgive me, but I want to make sure I do this right. Let's say I have a front-end application, be it a mobile app, or a single-page ...
1
vote
1answer
47 views

What is the idiomatic way in REST to handle field level permissions?

REST APIs conventionally expose resources addressed at the object level. While it's easy to do object level permissions using the appropriate HTTP responses, handling field level permissions is a bit ...
3
votes
1answer
158 views

Nested REST urls and parent id, which is better design?

Okay, we have two resources: Album and Song. Here is API: GET,POST /albums GET,POST /albums/:albumId GET,POST /albums/:albumId/songs GET,POST /albums/:albumId/songs/:songId We know that we hate ...
4
votes
4answers
464 views

What architecture/design to adopt when consuming a RESTful API? (iOS App)

TL;DR Part 1) I want to refactor the biggest part of the app on which I work - and it is pretty much spaghetti. It's a single class that makes the requests to the server, parses the JSON and saves ...
5
votes
2answers
234 views

Grouping and nesting of REST APIs

My question is around best practice of aggregating or grouping REST APIs. I have a scenario where there are many different vendors, data sources, etc. and I think grouping REST APIs would make a lot ...
0
votes
1answer
58 views

REST and foreign key constraints

I have a rather complex database schema using foreign key constraints. This database schema will be accessed with REST services. Should REST or the database be responsible for referential integrity? ...
0
votes
1answer
40 views

What is the best way to expose services to mobile devices? [closed]

We are working on providing services to mobile devices(Android, iOS and Windows). These services mostly return data and nothing OS or any programming language specific. We are currently planning on ...
1
vote
3answers
73 views

Design of actions handlers requiring some order

I have a REST application where 'actions' can be executed to perform anything in the system. For example: user.save, user.get, etc... I also have pre and post execution 'handlers'. For example a ...
0
votes
1answer
216 views

proper way to design REST interface with nginx lua.

I'm a noob at nginx and lua. But I'm trying to design a REST interface. The plan is to create a location entry that will match URIs like this: curl -i -X GET ...
8
votes
6answers
575 views

Many small requests vs. few large requests (API Design)

I'm currently working on a project with an organization as follows: Client - Gets data from the main server via REST api. Server - Requests data from various other servers via third-party APIs ...
2
votes
1answer
118 views

How do I write a REStful API's functional specifications?

I've been looking for answers about writing functional specifications for a software for a while now but I can't seem to find an answer to my specific case. I think I understand the difference ...
0
votes
1answer
81 views

Is this pattern RESTful? Or something else?

I'm working on a new project that will create a web-based API to perform CRUD operations on a relational database. Originally, I was going to create the API as http-based, and make it RESTful so ...
4
votes
2answers
89 views

Is ReST useful in Read/Write Operations that involve over 100 Gig

I work in Healthcare and we use SAS to Extract and Transform medical and pharmacy claims data for use in downstream reporting applications. For a given Report Request(usually 40 are running at a ...
2
votes
1answer
94 views

Transactions and subresources with JAX-RS

I'm porting an existing application RESTful API to a Java web framework -- I don't actually care which -- but it's proving hard to get the basics right. The core of the problem appears to be getting ...
1
vote
0answers
146 views

How shall I project CQRS command and query services through WCF

I got directed to this site for more conceptual questions. Here is my issue: Im designing an application that uses CQRS to expose functionality to higher levels in the stack. This looks like below ...
3
votes
4answers
139 views

Persistent RESTful state on client without cookies

I'm reading Roy Fielding's dissertation Architectural Styles and the Design of Network-based Software Architectures, which introduces the REST architectural style. Roy explains that cookies are a ...
1
vote
1answer
72 views

RESTful basic http atuhentication credentials

I am currently working on web application which has front-end, and back-end. Back-end has RESTful architecture, or something that looks like RESTful to me (this is my first attempt to make something ...
1
vote
1answer
34 views

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

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

Event sourcing and REST

I came across Event Sourcing design and I would like to use in an application where a REST client is needed (RESTful to be precise). However I fail to connect these together as REST is quite CRUD-like ...
0
votes
2answers
77 views

Secure Rest api from authenticated user

Let's say that my Rest api is secured using OAuth 2. Let's say my client is a mobile App. Let's say that i have an Api call: @Post /increasePoints host:https://www.example.com/increasePoints ...
1
vote
2answers
52 views

Should I specify the userId in the REST URL structure?

Basically, one feature of my app is to retrieve the logged user's friends. Actually, I hesitate between both kind of endpoints: GET /api/users/friends GET /api/users/:userId/friends Using 1, ...