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.

1 vote
4 answers
170 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
340 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
290 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
192 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
270 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
343 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
435 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
418 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
0 votes
3 answers
319 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
  • 111
1 vote
1 answer
458 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
190 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
153 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
84 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
0 votes
2 answers
145 views

If I have a REST endpoint such as /users/{userId} and I decide to move userId to a header parameter because it is considered senstive data what should the URL now become? It could be /users/ or /users/...
Bryn Davis's user avatar

15 30 50 per page
1
2 3 4 5
107