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

learn more… | top users | synonyms

0
votes
0answers
16 views

Using REST to get/post/etc polymorphic types stored in Table-per-Type database

I've got a Table-per-Type database something similar to this: public abstract class WorkItem { public int WorkItemId {get;set;} } public sealed class CancelingWorkItem : WorkItem { public ...
2
votes
3answers
59 views

Recommended HTTP status code for “plan limit exceeded” response

I'm designing a REST API for a project where users are always on one of several "plans" - each plan defines some resource limits, such as the max number of users an account may have or the max number ...
3
votes
0answers
69 views

Is there a language for defining restful web services? [on hold]

I'm implementing a restful service automation tool for client applications. Basically, the tool takes a config file that defines restful resources, and creates some DTOs and resource classes for ...
2
votes
1answer
32 views

Status transitions with extra information in RESTful interfaces

How would you design a REST interface that triggers a status change of an object, but requires additional properties in that moment? For example, the deliverer of a package needs to change the status ...
5
votes
3answers
89 views

REST API: Resource Ownership

Let's say there are Users and Pets. Each Pet has a single User as its owner, and a globally unique id. Endpoints could be /users/1/pets/2 /pets/2 I feel like the first option could be unintuitive ...
0
votes
1answer
151 views

Is it a common practice to first develop a RESTful backend (no MVC), then build thin client on top of it [closed]

This is what I currently have in mind: Build these components: Pure RESTful ASP.NET Web Service backend Thin native mobile apps Thin desktop client (WinForm/JavaFX/Angular/Whatever) This will ...
4
votes
0answers
129 views

Does REST is only limited to optimistic concurrency control?

Context Due to the statelessness of the REST architectural style involving that each requests stands completely alone, leading server to never store any informations about client. Thus, pessimistic ...
0
votes
1answer
48 views

REST API - Updating a Variable

If you are updating a variable in a RESTful API, for example person's weight, how should this be laid out? What I have thought of: PUT /person/1/weight?weight=150 PUT /person/1/weight {"weight": ...
4
votes
3answers
199 views

Java & REST API: How do I check for duplicate before inserting record?

I am developing an application in Java to parse and upload records from a CSV to an online database, via a REST API. While I know for sure that there are no duplicate records in each CSV file, I ...
0
votes
0answers
34 views

LDAP Authentication with RESTFUL API

I am developping a RestFul API with Symfony2. (v2.6) The front-end application is build with AngularJs. (v1.3.16) I would like to install SingleSignOn Authentication with an Active Directory. Both ...
2
votes
1answer
54 views

URI construction for REST API and use of verbs as resource?

I have two questions. 1) I have a issue of understanding the correct URL construction for a REST API. For example, ...
2
votes
6answers
295 views

What is faster? Using REST API or querying a database directly?

What is faster performance wise? Creating a REST API and having your web app use the REST API to do all interactions with your database OR querying your database directly (i.e. using whatever typical ...
0
votes
0answers
23 views

API Architecture

I have a Laravel web application. Imagine if our company has many customers. Each customer has one or more addresses. Each Address can have multiple fences and each fence has points which define ...
0
votes
0answers
30 views

Best way to consume REST service within Servlet on same server?

I'm builiding a web app and I'm implementing a RESTfull API to expose the server to all sort of clients. On the web client I want to have both server rendering and client rendering. The majority of ...
0
votes
2answers
34 views

How to acquire data and render page in context of REST/API application?

In typical REST/API application, build on MVC architectural pattern, what is the best available technique for acquiring data for rendering views? Should it be: as in any non-API application: data ...
2
votes
3answers
89 views

Appropriate use case for “accepted”?

We have a task enqueued by a REST endpoint that will create a resource and then enqueue a task either immediately or delayed based on some business logic. I was thinking of using HTTP/1.1 200 OK for ...
2
votes
2answers
122 views

What's the best way to return an array as a response in a RESTful API?

Assume we have resources like this, book: type: object properties: author: {type: string} isbn: {type: string} title: {type: string} books: type: array items: ...
3
votes
2answers
81 views

Best practice to handle POST with array of objects if at least one object rise an Exception

I want to POST an array of objects and make an insertion in database concerning each of them. What is the best practice if one object is not conform and rise an Exception ? (cancel all transactions or ...
1
vote
2answers
43 views

ID's in resource URLs: database id or per-user id?

For REST interfaces or webapps with nice-looking URLs, I constantly ask myself on what numbers to use if we want to refer to specific resources/pages. A typical approach seems to be to use the unique ...
0
votes
1answer
12 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 ...
-3
votes
1answer
31 views

Validating Server Response [closed]

I have written a REST API and a c# program. how do i validate that the response is real, and from my server. SCENARIO: i distribute a freeware to a certain community, which will then require them to ...
-2
votes
0answers
21 views

Google CustomSearch API Image Search Not Working [migrated]

using System; using System.Net.Http; using System.Threading.Tasks; using System.Web; using System.Configuration; namespace Foo { class MainClass { public static void Main (string[] ...
0
votes
0answers
34 views

Adding a chat api to infrastructure

I currently have a REST Api and will be adding a new real time chat feature. I want the applications to have a separation of concerns. I initially was planning on adding a new realtime messaging ...
3
votes
1answer
106 views

null vs missing key in REST API Response [closed]

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
89 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
57 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
82 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
39 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
122 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
64 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
123 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
116 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 ...
2
votes
1answer
83 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: ...
2
votes
2answers
78 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
167 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
83 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
365 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
61 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
248 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 ...
6
votes
1answer
149 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 ...
3
votes
5answers
373 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
82 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
54 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
66 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
66 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
45 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
256 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
191 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
60 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 ...