All Questions
Tagged with rest web-development
49
questions
0
votes
1
answer
40
views
Should I check the ownership of every "somethig_id" fields from a POST request?
I have an endpoint API for a POST request in a multi-tenant application, let's say it is for a Payment, where we have to store these fields:
tenant_id (this is the account owner)
amount
date
payer_id ...
1
vote
1
answer
66
views
POST-ing lists of new resources to add/merge/remove
I am working on the backend of a web application that exposes a REST-like API to the frontend of the application.
Currently, I am exposing a "Users" resource, where each user can be ...
-1
votes
2
answers
197
views
Is there a name for this common web application architecture?
It's an architecture where the client-side consumes data from, and sends data to, a back-end REST API. I would like to learn more about it, but I don't know the name of it.
2
votes
2
answers
153
views
Authenticate users (REST-API)
What I'm trying to build
REST-API using Express and SQLite
5 to 10 authors should be able to post articles to /articles
except them, no one is allowed to post anything
My approach to build it
...
4
votes
1
answer
191
views
Accessing Animal not belonging to User: 400, 401, 403, 404, other?
Consider animals being some REST resources. User has animals assigned to him.
The endpoint /api/animals/{animalId}/feed is used to feed a given animal by the authenticated user.
User should not be ...
2
votes
3
answers
2k
views
Back-end solution for pulling from CSV files
I'm building a data visualization that displays COVID information for the United States, at the city, state, and county level.
The ultimate source of truth are three CSVs published by the New York ...
-3
votes
2
answers
280
views
How do I organize my REST API codes along with the codes for generating the website?
Using github as an example, www.github.com is the website people visit and api.github.com is the REST api server programs will visit. But they probably share some codebase and in my case they share a ...
7
votes
5
answers
513
views
How to designing API JSON Response with nullable fields
We were discussing how to design a API response, for simplicity, think of having to give information of all the different types of facilities available in a city:
{
"city": {
"cityName": "...
12
votes
5
answers
16k
views
Is creating ViewModels in Web API a bad practice?
So, somebody at work who is twice as experienced than I am, told us that we must not create ViewModel classes within Web API. (We are using Angular for UI)
In his opinion ViewModel is ASP.NET MVC ...
-1
votes
1
answer
892
views
Is there a reason to have multiple projects for a single API? [closed]
I entered yesterday to my new job and while browsing their repositories, I noticed they have a project for every resource of a REST API. For example, if they need to add a REST resource called "people"...
0
votes
1
answer
878
views
Adding resources to subresource REST API
I'm trying to build an web API that closely represents a library of books. I currently have the following routes.
GET /api/books
GET /api/books/:bookID
GET /api/libraries
POST /api/libraries
This ...
1
vote
1
answer
205
views
API Architecture: Should the API update the database on it's own? Or should there be another service to tell it to update the database?
I am working on a project which has a requirement to records in the database every day. I currently have a REST API which does the usual CRUD functions. Should I create a service within the ...
0
votes
0
answers
459
views
Testing REST API with nested object creation and endpoint transactionality
I'm building a location based REST API using Spring Boot, and I have run into a bit of a testing philosophy question. I have an object called Location that, among other things, requires a Google ...
0
votes
1
answer
1k
views
Refactor Django application - split monolith into REST API and frontend
I am in the process of refactoring a Django web app. It is written in the usual MVT style, and I would like to change this for a REST + frontend approach. In my first iteration I would like to do as ...
1
vote
1
answer
734
views
How to architect a very big web application using server and / or client rendering?
I recently finished a project which contains more than 30 different pages/features. Each one with some CRUD and more subpages. Each page is totally different from another in purpose. All of it was ...