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
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
0 votes
3 answers
944 views

Should a REST endpoint return always the same JSON fields?

For example, let's say that I have an endpoint to get a list of buildings, that can be either apartment or house. The client can filter by apartment or house. Apartment has a property floor that house ...
Henrique Andrade's user avatar
1 vote
3 answers
642 views

Filter using routes in REST API

I am working on making changes to an existing Web API that exposes information about orders for specific customers. As a developer, I am used to seeing "more or less" RESTful APIs, and I ...
bakided698's user avatar
1 vote
1 answer
624 views

Exchanging data between two Microservices

I am facing this problem and would like to review my approach to it here. A Client sends an HTTP request to Service A and is expecting an answer. Service A is connected to DB A. When it receives a ...
Solidak's user avatar
  • 167
-1 votes
1 answer
252 views

When does a REST API stops being one in terms of state management?

As far as I understand, there is no certain boundaries for the RESTness of an API. However, I would like your help to understand how large and long (in terms of running time) a caching or state ...
yokus's user avatar
  • 7
1 vote
1 answer
59 views

How to deal with mixing models between services?

I am working on an API that has a User resource to represent the current user and a User service that handles business logic for representations of this user. I need to introduce an Organization ...
JRhodes's user avatar
  • 19
0 votes
0 answers
233 views

How can I secure the backend in a meaningful way when users log in via OAuth2 in the frontend?

I'm thinking about a rewrite of a existing application. This legacy application does not separate frontend and backend. It's a single application with server side rendering. I want to rewrite it to a ...
samjaf's user avatar
  • 121
0 votes
0 answers
415 views

Howto design a Rest-Client in c# the right way?

apologies, if my question is to trivial. But i after doing some research i couldn't find an appropriate answer to this seemingly simple question. As a developer with some experience, i know that i ...
Michael's user avatar
2 votes
3 answers
353 views

Rest API: paths versus queryparams for user accounts

I'm looking for some guidance around REST design for user account endpoints. I generally understand REST and some of the principles involved, with paths being used to fetch items from a resource: /...
aroooo's user avatar
  • 255
0 votes
1 answer
422 views

Testing REST API endpoints. How do I setup the tests?

When writing tests for my FastAPI endpoints I am not sure which is the best way to setup the test (store data in the DB, prepare data for the body of a POST call, etc.). I can either use: direct ...
user's user avatar
  • 479
-1 votes
1 answer
165 views

How to auto-scale a service based on requests count and internal processes

I have a service which is used to register tasks. These tasks are asynchronous and executed in background using a state management engine. The state management engine is running inside the service and ...
S7H's user avatar
  • 107
-1 votes
1 answer
62 views

How to break a bloated decorator into smaller parts in Django?

In a project I am doing, I have to perform a lot of repetitive checks at the beginning of each API end point. As the amount of duplicate code started to grow, I thought of using a decorator to wrap ...
Farzad's user avatar
  • 3
9 votes
7 answers
3k views

Implicit vs. explicit data structure retrieval from a REST API

I'm using a REST API to retrieve data from my back end at my front end. I'd like to figure out which way of receiving data from the back end is the better one (= clean, robust, and best practiced). ...
DarkTrick's user avatar
  • 207
2 votes
2 answers
4k views

What's the proper response when I try to update an existing entity but with not found parent ID

I have an update API (PUT/PATCH) entity/{id} to update a certain entity in my DB. Let's say: entity { id: number, // Primary key, unique, not null content: text, parentId: number // Foreign key, ...
Leo von Barbarosa's user avatar
-1 votes
4 answers
3k views

RESTful Batch Delete

When batch deleting a resource. e.g. deleting all Orders that belong to Customer 99: DELETE /customer/99/order If there are defined business rules1 that prevent Orders that meet specific criteria ...
Geeson's user avatar
  • 3

15 30 50 per page