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

Asp.net MVC web application and iOS mobile app

I am currently writing a web application in ASP.NET MVC, so far it is mostly a simple CRUD web app. The database is hosted on the cloud and I am using Entity Framework to interact with it. I know ...
0
votes
0answers
33 views

Better Approach for retrieving multiple RESTful calls

I have an Android application that associates bluetooth beacons with data that is retrieved from a server via RESTful calls. Once the app is launched, we have a page with a table that is being filled ...
0
votes
0answers
14 views

Field level permission checks for REST API - is this validation?

Let's say that we have some sort of "schema" for a rest resource, something like (pseudocode): ExampleResource: field1 = field(validate=is_string()) field2 = field(validate=is_int()) ...
0
votes
0answers
18 views

SPA with RESTful backend

I'm building an app based on ng-seed which is angular setup with routing out of the box. I'm backing the app with a rest interface of which I aim for Richardson level 3 compliance. Often it seems ...
2
votes
3answers
126 views

Best practice for a REST-ful API where objects would naturally have a “/” in their identifier

I am designing a REST api for a document management system. To make the API more natural, I thought about using the natural identifier for a file, which is it's path (usually having forward slashes ...
0
votes
1answer
55 views

What is the best way to organize RESTful endpoints [closed]

Let's say I have two types of resources I want in my API: person and class. These two have a many-to-many relationship. As such, would I expect to be able to interact with the following endpoints: ...
1
vote
0answers
67 views

Why does convention say DB table names should be singular but RESTful resources plural?

It's a pretty established convention that database table names, in SQL at least, should be singular. SELECT * FROM user; See this question and discussion. It's also a pretty established convention ...
-1
votes
0answers
32 views

System Architecture: Transferring Digital Assembly Instructions [closed]

Assignment: Transferring Digital Assembly Instructions (Ship Building) to Android Devices. Since I am inexperiente I am looking for opinions on how to build this system and what technologies ares ...
3
votes
1answer
31 views

How to handle mismatched request body and content-type header?

If someone makes a request with a Content-Type that doesn't match the syntax of the request body, how should the server respond? Is there a standard way of handling this (seems like there would be), ...
-2
votes
1answer
52 views

Less PHP request to REST API

I had an argument with my PHP developer today who tried to convince me that REST API has to provide all the request from PHP since a server is faster than client devices such as desktop. As I am a ...
1
vote
1answer
76 views

What is a good way for Tomcat to interact with another Java application running on the local machine

I'm new to using Java within a web environment. At the moment I have a Java application that we run on a local machine, we'll call it the server app. We want to add the ability to communicate with ...
1
vote
1answer
66 views

Why use a unique hashkey for form submissions?

I have multiple forms and use AJAX to submit them. I asked my boss if he needed any specific format for the form ID and he told me to generate a unique hash and keep it in session; check it whenever ...
0
votes
0answers
19 views

Resource manager for restful service

I was just brought onto a project with a service oriented architecture. There is a central WCF "profile service" that all projects call to get information on users etc. That central profile service ...
2
votes
5answers
265 views

Securing ajax calls to rest api

I need for my app to consume a rest api service and since I will call it from javascript/jquery i need to expose it to the end user. In this case I would also need to expose credentials to the end ...
2
votes
1answer
55 views

How can I create a RESTful-style website if HTML forms only allow to use GET and POST?

Let's say that I want to create a website where users will be able to create, edit and delete some kind of resources, for example posts. I have created a RESTful API, so user can create a post by ...
0
votes
1answer
84 views

When to implement WCF Rest Service and WebApi

I have gone through many articles to understand why we need WebApi's when we can create restful architecture using WCF rest services but could not find some solid reason. Can we use these ...
2
votes
1answer
57 views

REST API paging via headers

Let's say I have REST API which provides me list of something and I want to implement paging support - possibility to tell "give me records 20-29 (page 3)". Currently, I don't care about ...
2
votes
1answer
56 views

what the best practice in REST to append or delete to a list

Suppose GET /users/<id> { user_id : "asdasdas-da-sd-asd-as-d", firs_name : "asdasd", .... department : [{ id : "asdas-da-sdasd-asd", name : "asdasdasdasd", ... ...
0
votes
0answers
33 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
100 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
78 views

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

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
36 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
105 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 ...
5
votes
3answers
296 views

Is REST 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
52 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
272 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
95 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
68 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
443 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
31 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 ...
2
votes
3answers
153 views

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

I'm builiding a web app and I'm implementing a RESTful 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
45 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
95 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
170 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
98 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
53 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
15 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 ...
0
votes
0answers
38 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
168 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
98 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
59 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
85 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
41 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
144 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
79 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
162 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
142 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
99 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
104 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 ...