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

learn more… | top users | synonyms

1
vote
1answer
50 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 ...
0
votes
0answers
13 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
85 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 /...
1
vote
2answers
101 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 ...
28
votes
8answers
19k views

How to safeguard a REST API for only trusted mobile applications

How do I make sure my REST API only responds to requests generated by trusted clients, in my case my own mobile applications? I want to prevent unwanted requests coming from other sources. I don't ...
3
votes
1answer
60 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,...
13
votes
5answers
12k views

How best do you represent a bi-directional sync in a REST api?

Assuming a system where there's a Web Application with a resource, and a reference to a remote application with another similar resource, how do you represent a bi-directional sync action which ...
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
97 views

Is pure RESTful required for Angular JS / Backend running on same web server?

I am developing an application with Sprintboot + REST + Angular. While I am working on the REST API, I am trying to design as RESTful as possible. I'm encountering certain pages where the Angular UI ...
0
votes
1answer
41 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
147 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 ...
28
votes
3answers
10k 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
51 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
2answers
70 views

Modelling a REST Object Question (Python)

I have a REST API that I want to model in a class so I can access the properties using the dot notation (JS list notation). I explicately defined the properties on my class using the @property tags ...
7
votes
1answer
219 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
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 ...
5
votes
2answers
213 views

Creating entities with validated Addresses via REST API

I am building a REST service. This services enables the user to create an entity that has an Address. For simplification, let say this other entity is 'House', so 'A House has an Address'. The system ...
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, ...
3
votes
3answers
127 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
218 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
148 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 ...
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
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
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,...
6
votes
5answers
332 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, ...
1
vote
1answer
67 views

Eventing solutions for java legacy applications too old for real JMS queue/topic eventing?

What are some architectural solutions that can mimic eventing for systems (Java) that are too old to implement eventing solutions, such as conventional Queue/Topic based JMS messaging? I have a ...
0
votes
1answer
72 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 ...
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?...
-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?
3
votes
2answers
165 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 ...
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 ...
1
vote
1answer
70 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 ...
0
votes
1answer
44 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/...
3
votes
1answer
157 views

How do I go about setting up my Sinatra REST API on a server?

I'm an iOS developer primarily. In building my current app, I needed a server that would have a REST API with a couple of GET requests. I spent a little time learning Ruby, and landed on using Sinatra,...
2
votes
1answer
60 views

More scalable alternative to a transaction-per.request in a SQL+REST stack?

I'm new in web programming with SQL database. So please forgive my ignorance. I'm using some modern framework to make a REST server with a SQL database. I'm using transaction only when I think I need ...
1
vote
3answers
102 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 ...
9
votes
2answers
7k views

REST API - Should API Return Nested JSON Objects?

When it comes to JSON APIs is it good practice to flatten out responses and avoid nested JSON objects? As an example lets say we have an API similar to IMDb but for video games. There are a couple ...
2
votes
1answer
131 views

Fine-grained data level permissions on a laravel RESTful API

The problem: We want to restrict access to properties returned from our services. Details: We have route level permissions working with no issue. For a user that can view /product/{id} for example,...
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
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 ...
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 ...
7
votes
3answers
309 views

Best solution to authorize that a user is only allowed to modify/act with their own resources in a REST API

Background: Currently in the process of building out a REST API, using node w/express and it is consumed by a mobile app and eventually a (modern browser based) website. I'm trying to identify the ...
-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 ...
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
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 ...
0
votes
0answers
23 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
2answers
9k views

Why should I use JAX-RS REST instead of normal servlets?

I'm teaching myself J2EE technologies using Glassfish as my webserver and EJB container. I'm very interested in learning REST as well, and developing an application that is adherent to the rules of ...
2
votes
3answers
216 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, ...