Questions tagged [rest]
Representational state transfer, or REST, is an architectural style for networking software to transfer information through the web.
1,567
questions
2
votes
1
answer
266
views
REST - different response from same resource dependent on requester
Let's say I have a single resource of employee that belongs to user:
{
"id": 1, "name": "John Doe", "userId: 1
}
When making a GET request to /employees/1, I'm ...
2
votes
2
answers
4k
views
Multiple JSON REST Responses for the same API
I want to send two different json response for the same API based on a flag.
I have a final response json as below for /api/v1/student/, which is created by fetching responses from few other REST apis....
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 ...
20
votes
2
answers
17k
views
REST API security: HMAC/key hashing vs JWT
I just read this article that is a few years old but describes a clever way of securing your REST APIs. Essentially:
Each client has a unique public/private key pair
Only the client and the server ...
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
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 ...
8
votes
3
answers
10k
views
REST API Design: Should the update (PUT) request include the ID in the resource URL?
When designing a REST API for update request. Usually PUT is used. Question: should the resource URL include the id usually?
For instance, there is a book resource: http://localhost:8080/library/book
...
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 ...
-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 ...
0
votes
1
answer
1k
views
How to setup REST API in Codeigniter 3.0
I am creating the REST API using codeigniter. I downloaded this library and installed in my application. It works great! https://github.com/chriskacerguis/codeigniter-restserver
But I have an doubt. ...
-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 ...
4
votes
4
answers
2k
views
How to mock REST services for testing
I am currently building an application that consists of multiple small rest services that communicate between them. For example, a request to service A might make requests to services B and C in the ...