All Questions
128 questions
0
votes
1
answer
400
views
Should you use nested routes within NestJS for a "RESTfull" API
Here is an Example API for managing companies, employees, and their children. My entity relationships are as follows:
company -1:n-> employees -1:n-> children
I’ve structured the API routes ...
1
vote
0
answers
94
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 (...
0
votes
0
answers
122
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
vote
2
answers
251
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 ...
0
votes
2
answers
2k
views
Do we need APIs to just access databases?
At work, we have a Web application, which makes queries to databases, and I’m asked to determine if using Web APIs could be an added value.
Personally, I’m not convinced it is.
I know Web APIs are ...
0
votes
0
answers
228
views
REST Api filtering, sorting and order
I've seen in several REST API guidelines recommendations to use filtering in form of, e.g.:
/products?filter=name eq 'Milk' or price lt 2.55
(example from: https://github.com/microsoft/api-guidelines/...
0
votes
2
answers
320
views
Is this service considered "an API"? Could it benefit from being Restful?
I'm confused about the meaning of API, specially in the context of REST. I'm thinking of one example.
My company creates an application that runs on a server (the "backend"). (JavaScript in ...
1
vote
0
answers
717
views
How to handle relationships between resources in Restful API
Problem
Hi, we have an API that it's pretty similar to a standard CRM. That is, we have a really big amount of resources (even our own customers can define new resources). All of these resources share ...
0
votes
2
answers
2k
views
REST Api - deleting a resource based on either ID, or its OwnerID
I have this list of Notes:
public static List<Note> _notes = new List<Note> { new Note { Id = new Guid("00000000-0000-0000-0000-000000000001"), CategoryId = "1", ...
1
vote
2
answers
624
views
What Is the Industry Standard of Specifying APIs for Frontend-Backend Handshake?
I am somewhat new to web development and maybe this question belongs to stackoverflow, but there is a human-interaction component here.
Here is the scenario. I am serving some neural network models ...
1
vote
1
answer
2k
views
RESTful web APIs using MVVM architecture
As the title implies, I would like to know if it is possible to create RESTful web APIs using MVVM architecture?
Or we can use just MVC pattern to create web APIs?
1
vote
3
answers
696
views
Is the "archetype controller" really complies with REST architectural style
I've read the Fielding's thesis that defines the REST architectural style and noticed that the defined style appears to significantly conflicts with the so called "archetype controller", ...
6
votes
3
answers
2k
views
GET vs POST when exposing machine learning model predictions using a REST API
So the recommendations for using GET vs POST in a REST API that I've read on stack overflow are geared almost exclusively toward CRUD operations involving a database.
However if you are simply writing ...
6
votes
2
answers
7k
views
Should I return always a JSON for only one value in a REST API or is it ok to return just the value?
For example, I create an API endpoint that provides the next available label for creating some items, so I call it like this:
GET /api/v1/get-next-label/
Is it ok to return just:
LBL-000001
Or is it ...
3
votes
1
answer
4k
views
REST: How to "upsert" a resource without an specific resource URL
I'm trying to create a REST API that allows the user to:
create a resource if it doesn't exist.
update a resource if it exists.
with the same request.
Given an example: I have a company that has ...