Skip to main content

Questions tagged [rest]

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

10 votes
5 answers
1k views

I am having a hard time to deal with one particular issue in API design that might be very common. Let me give the concrete example I have: I am writing a RESTFul API for a store and have the ...
user1620696's user avatar
  • 5,105
1 vote
5 answers
347 views

I'm working on a Spring Boot application with a VoucherService and VoucherController. I currently have the service method return an ApiResponse<T> directly, like this: @Transactional public ...
Conquer the world's user avatar
1 vote
1 answer
388 views

Where I work, they have never implemented web APIs. At my previous job, which I left 11 years ago, I would write several web APIs to be used for applications, reports, etc. So when I came to this job ...
Rod's user avatar
  • 173
1 vote
3 answers
470 views

I’m building an app that lets users manage data across multiple tables. I also expose an API so they can fetch their data and process it in external services. I’d like to enhance the API to support ...
Axel Chalayer's user avatar
1 vote
2 answers
274 views

I’m designing a REST API where a single person can hold multiple account types. For example, one person might have both a CareProvider and a CareSeeker account. Each account type can have its own ...
Mizan Rifat's user avatar
2 votes
3 answers
3k views

In the context of POST/PUT endpoints, is it ok to retrieve the id from the authentication token instead of forcing the user to send it via a path variable? For example, PUT /api/users that updates the ...
Sergey Zolotarev's user avatar
2 votes
3 answers
310 views

(related: Fetching records matching multiple joined attributes) If Spring Data doesn't allow GET requests to have a body (and it's considered bad practice anyway) curl -X 'GET' \ 'http://localhost:...
Sergey Zolotarev's user avatar
1 vote
2 answers
412 views

Imagine an updating PUT endpoint receives a DTO that contains an id that corresponds to no record. { id: 12345, name: "George" } Options I see: Do nothing. Return an error response. ...
Sergey Zolotarev's user avatar
5 votes
3 answers
504 views

I'm having a hard time of understanding at what point is multiple layers of validation protection necessary rather than a single point of failure and if the performance hit is a concern Lets say you ...
Observable Stone's user avatar
1 vote
5 answers
491 views

I am currently working on a project using .NET APIs and have a few questions regarding controller design. Specifically, I have separate controllers for users and orders, and I am considering the best ...
Lemon juice's user avatar
1 vote
3 answers
382 views

I recently read through Hypermedia Systems, and found its arguments incredibly compelling. The book brought a lot of clarity and structure to ideas and frustrations that have been bouncing around in ...
DMJ's user avatar
  • 121
1 vote
1 answer
558 views

For a long time, I’ve been using Repository pattern to abstract data access logic from actual business logic, always using SQL or noSQL databases as my data source. But how much valid is it, to ...
Hexley21's user avatar
  • 127
-1 votes
1 answer
214 views

I have a REST API with protected endpoints, which require an AccessToken for access. For the user to receive the AccessToken, they need to access the login endpoint and with the correct credentials (...
Joao's user avatar
  • 11
2 votes
0 answers
191 views

We know that combining a domain entity, a DTO, and a REST API serialization class into one won't pass code review: @JsonInclude(JsonInclude.Include.NON_NULL) @Data @Builder @Entity @Table(name = "...
sfinja's user avatar
  • 129
1 vote
0 answers
115 views

Suppose I've got a spring controller as follows: ⋮ @RestController public class MyController { ⋮ @PostMapping(value = { "publicAPI/addItem", "internalAPI/addItem" }) ...
zZz's user avatar
  • 11

15 30 50 per page
1
2 3 4 5
107