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

REST MVC Confusion For An Enterprise Appplication Architecture

I already have experience working with MVC based web apps and started reading recently about REST. But went into confusion when re-thinking about how existing web app not using any kind of framework/...
2
votes
1answer
89 views

REST API design: distinction between searching and getting all instances of a resource

At the moment, my (pretty standard) REST interface looks like this: POST /foo # creates a new foo PUT /foo/{id} # updates a specific foo GET /foo/{id} # returns a specific foo GET /...
3
votes
1answer
63 views

Microservices in the Large (specifically: foreign refs)

There are lots of good resources on μServices that focus on concepts like Single Purpose, REST, Implementation and Deployment, CI/CD, Encapsulation and Isolation, Separating UI from API, etc. However,...
1
vote
2answers
102 views

Is it safe to say that AJAX is a particular way of using HTTP?

I really need someone to confirm the following, and if necessary help me filter what I have read so far. AJAX, which stands for Asynchronous JavaScript and XML, is used to exchange data and is a ...
0
votes
1answer
42 views

REST API with optional resource creation

I have a web app with JavaScript front-end which communicates with back-end via REST API (AJAX calls). Front-end have a Sign Up page. When user decides to register, front-end makes REST call to ...
4
votes
2answers
151 views

Is it okay to use static classes while creating a wrapper for REST API?

I am consuming a web service in C# using REST APIs. So, I have created a wrapper classes for each endpoint. It seems like a good idea to implement the wrapper using statics. This makes code look much ...
0
votes
1answer
52 views

designing php POST interface to mobile app

Currently I am working on php application, to create interface that will receive POST data from mobile app, and process them into shared database. To do things right at a first time, I was searching ...
0
votes
1answer
87 views

How do I integrate hibernate and REST web service in java?

I am going to develop which will be web application as well as mobile (android / iOS / windows) application. The database in this application will be managed by Hibernate. Also as it is cross platform ...
7
votes
1answer
224 views

By the book REST vs Too Many Requests

From Roy Fielding's comment on his own article decrying fake REST apis: A truly RESTful API looks like hypertext. Every addressable unit of information carries an address, either explicitly (e.g....
0
votes
0answers
46 views

POST REST api request parameter structure

I am working on building a REST api for a web service which aggregates results from multiple backend systems. The current structure is the following { "query" : "test", "sources": [backend1, ...
0
votes
1answer
46 views

Multiple complex parameters in a REST post call

This is a blindspot in my understanding of REST. I understand how to make get calls (and Post) if the call is simple, and requires maybe a few parameters. Example: https:\\randomAPI\get\coats\size:...
0
votes
1answer
149 views

Reduce server hit for reports by caching REST resources

We have a conventional application built using ASP.Net Web forms which uses SQL Server for database. Reports are generated using SSRS. We have a main table called ManifestContainerDetails - this table ...
3
votes
3answers
128 views

What is the advantage of API clients

At my new job I am working on a basic existing CRUD web application in MVC + with an angular front-end. The MVC API has a swagger spec and it's used to generate an API client with auto rest. That API ...
1
vote
4answers
222 views

MVC and RESTful API service

MVC is pretty straightforward. There is a Model, a Controller and a View. When we create a website, it all come together as 'client sends REST keyword request to server -> the server matches the ...
0
votes
1answer
74 views

Designing a RESTful API for a file manager

I am building a file manager web UI (front end ReactJS, back end Flask). RESTful API seems to be very suitable in this situation at first sight, but I get into trouble. I need API contain: List ...
-3
votes
0answers
62 views

How to deal with concurrent accesses to ArrayList? [duplicate]

I have an ArrayList that stores some data about users. Users can be created, deleted, and updated via REST calls. How do I ensure concurrent accesses to the ArrayList are consistent?
6
votes
5answers
334 views

Should I treat a worker as another 'user' in my system?

Basically I am designing a web-enabled application that should have an API in the middle. I found this question on Stack Overflow, which unfortunately has no answers. Let's say there is a system, ...
0
votes
1answer
85 views

Is it a Good Idea to use REST API from Javascript Code

I am Developing a E-Commerce Web Application as a part of my learning using Spring Hibernate and AngularJs. I have written some Rest API's Controllers in Spring and then from the Web Component i am ...
0
votes
0answers
12 views

Include Internal User ID into JWE token

Lets say there is an REST service, that needs an internal user id with each of request. Each request is authorised using JWT. I do not want to expose user id, and do not want to create an external id,...
1
vote
2answers
99 views

When interacting with an ArrayList over REST will a ReadWriteLock maintain consistency?

I have an ArrayList of objects that may be added/deleted/updated via REST calls. In order to prevent issues that may result from concurrent accesses, will a ReadWriteLock be appropriate, and efficient?...
0
votes
1answer
45 views

REST api design that allows fetch of distinct non-key attributes for an entity type

We have a REST api under design, to fetch an entity, eg persons, as follows GET /endpoint/version/persons/ Now we can get persons who live in a particular city, as follows: GET /endpoint/version/...
1
vote
1answer
71 views

Consume ASP.Net REST API service

I am creating ASP.Net REST API application and stuck on the part where I should consume the REST service. I am not sure how to find the way let me accomplish the following: 1. I don't want it to be ...
1
vote
2answers
93 views

What API design makes the most sense for changing a user's password?

Consider a web page where a user changes his password after clicking on an emailed password reset link. The page will be implemented against an API using ajax, rather than as an ordinary form ...
1
vote
3answers
104 views

REST API - proper way to handle non-CRUD items with REST

So, there are many times where I have to do things with my REST API that seem outside the boundaries of REST. In this particular instance I need to have an endpoint that checks whether a member is ...
0
votes
0answers
24 views

Providing an API for Cancel(QueryID) i.e. Cancelling a long running query through JDBC in RESTful service

We went through few blogs on internet, which suggested to use Statement.close() method. Our scenario : We have developed RESTful service. We execute an SQL query through JDBC framework behind an API ...
6
votes
2answers
141 views

Why include IDs of parent resources in REST endpoint?

Say I have a company directory application, so Companies have Employees. It's pretty clear to me why you would have the following GET endpoints: api/companies # Get all company records ...
-1
votes
2answers
60 views

what is the utility to a REST API for SIP trunk's?

Why does Twilio offer: Trunking REST API docs - Provision, configure, and modify SIP Trunks and phone numbers with the REST API. What are the top usages for this API? I appreciate that the ...
1
vote
1answer
45 views

Specialized API endpoints or multiple calls to generic resources?

This problem came up while designing the API for a SPA web application, which communicates with the server via AJAX. On one page the user, who is creating a list of people to invite to an event, has ...
2
votes
4answers
120 views

Best practice for RESTful API calls with variations

How do I name API endpoints that serve the same entity in different ways and still adhere to the RESTful API guidelines? Let's consider I'd like to get a customer with ALL his details. I just ...
1
vote
2answers
159 views

Structure of RESTful Service with Java Spring for Beginner

I am relatively new in terms of Java web development skills. I have a project that I think would make a good candidate for a RESTful service from what little I understand about APIs. I'm trying to get ...
0
votes
0answers
24 views

Volley with AsyncTask

I'm developing an Android library so that other apps would use, which is a kind of an API 'driver', to be used with an external services API and contains also UI components. On most of the requests ...
2
votes
2answers
103 views

Idempotency and concurrency in a REST web service

Is concurrency and idempotency mutually exclusive for a REST web service or can it be done so a service can be both concurrent and idempotent? Using a optimistic lock methodology like using Version ...
2
votes
3answers
219 views

How to design a REST API to handle non-CRUD operations?

I'm trying to convert a set of SOAP-based services to a RESTful API. I started by identifying resources by analyzing operation names and I got the resource Subscription. When I need to update the ...
0
votes
1answer
99 views

How to structure a REST API response for a Flux/Redux frontend?

I have a question about how to structure a response where I return objects related to other objects (one-to-many/many-to-one), and to tell me if the way I've structured my endpoints are wrong or not, ...
1
vote
1answer
60 views

jersey post with a huge payload

I have a requirement to write a POST endpoint where the payload is huge(not normal). In the order 10s of Megabytes. And this endpoint will be accessed by a lot of clients (in the order of 1000s) ...
0
votes
1answer
42 views

How to deal with automatic binding exceptions with Jersey?

It's really nice to have automatic binding with Jersey-Jackson (well, I believe it's actually MOXy the one who manages the bindings), so object serialization and deserialization is done under the hood....
2
votes
2answers
163 views

Should I return a 204 or a 404 response when a resource is not found?

I am developing a simple RESTful service for tournaments and schedules. When a tournament is created through a POST request containing a JSON body, the tournament is inserted in a BiMap, declared as ...
4
votes
3answers
83 views

GET resource state with JSON body or HTTP code

I want to provide rest api for my iot service to read state of a sprinkler on/off. So far I've come up with two solutions: GET /api/sprinkler that returns 204 if on and 404 if off GET /api/sprinkler ...
0
votes
1answer
101 views

js spa rest backend business logic vs presention logic

I am very confused about what should a SPA's REST backend do and expose. In most blog posts and books I read they depict the backend pretty much like a direct access to the DB, practically CRUD ...
2
votes
2answers
134 views

Ubiquitous language and resource based REST API?

I have posted a question regarding Ubiquitous language and maturity level in REST API. Ubiquitous language and maturity level in REST API? After some extensive coding I realized that further ...
2
votes
3answers
127 views

Preventing abuse of a RESTful Web API (can the server trust the remote IP address?)

I'm designing a RESTful API for my organization. We do use password-based authentication, which generates tokens. One part of our API requires that the users be physically in the office, i.e. there is ...
3
votes
2answers
166 views

How to represent object references in JSON?

I am trying to figure out what's the best approach when dealing with object references in a JSON to be sent to my server for deserialization. To clarify, what I mean is how to refer to data contained ...
2
votes
1answer
100 views

Is it anti-pattern to alter domain model on front end?

We are making a quiz application, I'm trying to integrate my Angular 2 UI with the REST api. Our Quiz domain model consist of the following (simplified) hierarchy: -Quiz -Category -Question -Choice ...
1
vote
3answers
223 views

What is wrong with treating a client session as a resource/application state in REST architecture?

Given these example REST API / HATEOAS applications: InfoQ How to GET a Cup of Coffee example Java Spring REST API example ... where POST/PUT/PATCHING resources clearly alters the state/...
3
votes
2answers
88 views

RESTful service and DAO: deciding on responses

I am developing a RESTful API and I am using DAOs to serve data to the service. I am having trouble deciding where certain responsibilities should fall, whether in the service or in the DAO contract. ...
4
votes
3answers
135 views

Should an idempotent service always return the same

When designing REST endpoints idempotency is a crucial tool. Say we have a HTTP endpoint accepting PUT which we would like to be idempotent. In case a client makes the same request multiple times, ...
1
vote
1answer
99 views

REST services with a local or remote application

I have several uncommon questions related to the design of REST services hosted on a server communicating with local or remote applications. As an example, let's say that I have 2 machines ("A" and "...
5
votes
2answers
113 views

REST server user authentication

So i am creating my first larger scale application (by larger scale i mean something i see myself publishing in the app store) and i am not sure of how to handle user authorization. The client will ...
0
votes
0answers
48 views

Client REST UI on top of node based REST Service with OAUTH2 and role managment

I have a REST service with oauth2 authentication and a role based access control on top of my API. For an example, users can be account owners and may be able to get and post to /account/123/users. ...
-1
votes
1answer
142 views

Using sessions with Jersey in a REST API

I am starting to develop a REST API with Jersey to retrieve a schedule for a given sport tournament. The client sends a JSON containing a tournament with its different categories, domain, definitions ...