Skip to main content

All Questions

Tagged with
-1 votes
2 answers
192 views

Idempotency for a financial transaction API

Say you have a REST API endpoint like POST /move-money which transfers money from your main account to a savings pot. There are three path parameters accountId for the user's account potId for the ...
MZokov's user avatar
  • 101
1 vote
3 answers
313 views

How can I avoid duplicate annotations when validating both Entity and DTOs?

I am using the Spring Boot framework to create a RESTFUL API and I need a way to avoid the duplication of validation rules when using multiple DTOs as request/response objects for my endpoints. Using ...
Marco Pierre White's user avatar
1 vote
5 answers
495 views

DTO vs POJO (Entity) on POST request

If I have for example a User POJO like the following @AllArgsConstructor public class User { @Id private final String id; private String username; private String password; private Date createdDate;...
iqueqiorio's user avatar
-2 votes
1 answer
77 views

How to Implement Spring Boot Endpoint for Confluent Cloud-Like Batch Payloads?

I'm currently working on a Spring Boot application where I need to create an endpoint similar to the one mentioned in the Confluent Cloud documentation (link). The cURL example provided in the ...
Manupriya Logus's user avatar
1 vote
4 answers
3k views

Multithreaded processing of single REST requests

Background: We're providing an API that provides information about all users within a given group. Our API is a high level facade over another low-level REST API. To gather those information we first ...
das Keks's user avatar
  • 213
1 vote
1 answer
1k views

Best method to differentiate between two REST methods with the same pathparam (in Quarkus)

I have an issue regarding the differentiation between two Rest methods that have the same amount of path parameters: @GET @Path("image/{ratio}/") @Produces("image/png") ...
SirHawrk's user avatar
  • 249
0 votes
3 answers
157 views

Communicating error conditions in client API for remote RESTful server, what's the best way?

I'm writing an application based on a RESTful API located in a server (written in Python). An Android app will access the API endpoints to get, post, put or delete data. The usual. The server has a ...
ismarlowe's user avatar
0 votes
1 answer
37 views

Is there a set of guidelines on how to handle/code execution of Spring Microservices RESTful API calls?

I'm building a RESTful web api using Spring Microservices. I am following the Controller/Service/Repository Structure. Where can I find some guidelines on what the responsibility of each class should ...
Lucas T's user avatar
  • 753
0 votes
2 answers
1k views

How to implement resources of a REST API as classes?

I need to access and process different resources from a REST API. For this I've come up with two different approaches: Approach 1: Create one class per resource, that handles accessing the data from ...
sininen's user avatar
  • 129
8 votes
6 answers
6k views

How should an API handle unsupported fields?

Let's assume I have this API on /api/v2/persons that enables me to create new entries by POSTing this JSON: { "name": "me" } The API is implemented using Spring Boot and if ...
Marged's user avatar
  • 225
0 votes
3 answers
2k views

How to design RESTful API for response object properties dependent on request parameter

I have a RESTful service where clients provide product codes, start date and end date. In response, the service returns a list of price metrics for the products over the date range. Start date is ...
James's user avatar
  • 285
1 vote
1 answer
788 views

Java REST services - What are best practices regarding DTOs?

I've been working on a project that communicates with a service which sends very complicated REST responses. Current "best practice" on this team is that we use POJO DTOs to handle all data ...
Astrum's user avatar
  • 143
3 votes
2 answers
172 views

Checking the user in almost all use cases

I have a web application that has Users that belong to Companies. A User can only belong to 1 Company at a time and they can manage their own company information. I'm using java spring and I'm ...
Jordi Pagès's user avatar
1 vote
1 answer
5k views

Design Pattern for accessing data over RestAPI calls

I am looking out for a general design strategy or pattern designing various components in my client application. Here are high level details: The data is accessed my making a RestAPI call. The data ...
theimpatientcoder's user avatar
2 votes
2 answers
387 views

Should I create two synchronous or a single asynchronous rest APIs?

Here is the situation. System A sends the notification as it completes the work items to System B. System A does not know how many items the project consists of. It's just a pass-through system. ...
user1473349's user avatar

15 30 50 per page
1
2 3 4 5
8