Questions tagged [rest]
Representational state transfer, or REST, is an architectural style for networking software to transfer information through the web.
1,567
questions
0
votes
1
answer
74
views
Using both websocket and REST for the application requiring two-way communication
I am currently implementing front-end part of the collaborative application requiring two-way live communication between server and the web app. Cloud service responsible for the data exchange will be ...
1
vote
0
answers
59
views
How to model api error type with errorCode and parameters
I work on a spring kotlin backend which has an angular and a mobile frontend. We are currently working on error handling and we decided that the backend should return an error code, a general message (...
3
votes
3
answers
381
views
Encapsulating a central soap service in a microservice?
I am currently developing an application (rest-backend and SPA) that requires information from people (personal data, department, superior... ). Our company has a central directory for this purpose. ...
0
votes
0
answers
52
views
Multi-tenant (realm based) REST Web API authentication
We're building a multi-tenant setup with a C# Web API and KeyCloak for auth and APISIX as application gateway. APISIX handles the authentication and passes an X-Access-Token to our API when ...
0
votes
1
answer
126
views
How to model two bounded contexts with tight coupling between them
Context
Hello, at my company we have been working with DDD for some time now. We have a monolith and some services. The bounded contexts in the monolith use HTTP calls to communicate between them or ...
-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 ...
-3
votes
1
answer
102
views
HATEOAS API - best practice to create multiple entities in one request
I have a HATEOAS API (in ASP.NET) with an endpoint:
POST /api/messages - to create a new message and it returns the location of a new message
Now I have a requirement that in some cases based on ...
11
votes
5
answers
3k
views
Why split up data retrieved from a database into multiple endpoints, if we need ALL the data anyway?
I have a "Games" API which retrieves video game data from a large database.
The /games endpoint returns some very basic information about the game, such as the title, description, etc.
More ...
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 ...
0
votes
1
answer
157
views
How to handle different json response for the same api rest endpoint and different http status
I have an endpoint similar to GET ../produtcs/123 where 123 stands for an ID. The REST service response
with either status 200 and a json object A {"deliveryData": {"status": 200, ...
-1
votes
2
answers
122
views
Efficient access control list for collections of objects returned by REST api
We have a REST api endpoints that return collections of objects where users could perform different types of actions on those objects. We need it to turn on/off different UI options based on that ...
0
votes
1
answer
227
views
POST and PATCH for a nested resource in REST API
One post can have many comments.
How can I design REST API urls for HTTP POST and HTTP PATCH for comments.
My idea is to have the following endpoints:
HTTP GET: /posts/{postId}/comments
HTTP GET (all ...
0
votes
1
answer
74
views
Alternative ways to transfer records from one environment to another
I'm working on an application which has a feature of syncing records between two environments. For example, a record A is created in environment A. After a user verifies it, the user can use the sync ...
1
vote
2
answers
108
views
Request validation on API proxy
I am creating an API proxy that acts as a bridge between our frontend application and an AWS opensearch server. This proxy has additional features such as retries and timeouts.
One of the features I'm ...
1
vote
2
answers
163
views
Creating associated resources before creating the main one in a REST setting
I'm not sure how common of a scenario this is, but what are some approaches to creating associated entities before you have the actual main entity they're supposed to be linked to? (basically having ...