All Questions
Tagged with asp.net-mvc-web-api api-design
10 questions
0
votes
1
answer
114
views
API Routes: Get App by User or Get User's App
We have a .Net WebApi 2 we've been working on for quite some time. As we refactor code, we started thinking of what might be a better practice: a) "to get an app by userid", or b) "to ...
-2
votes
1
answer
411
views
How often should I request a token when communicating with a third-party API?
I have an ASP.net web API. I would like to call another API that has an authentication token inside my API.
The code flow is as follows:
My API is called → Get authentication token from 3rd party API →...
1
vote
4
answers
3k
views
Should you validate route parameters or let them fail with a 404?
So this is an example endpoint to fetch one user by its username
[HttpGet("{username}")]
public async Task<ActionResult<object>> GetUser([FromRoute] string username)
{
// ...
...
0
votes
0
answers
936
views
Separating models in a Backend-For-Frontend (BFF) API
At the moment I have a frontend client calling several backend REST APIs. For example a call may be to get information about a certain vehicle. Then the client will call REST API A to get some ...
4
votes
2
answers
2k
views
If I have ten objects, should there be ten controllers for a Web API?
Is it good design to have a controller for each object of your API? I know this is a short question, but it's really a fundamental question that I do not know. Say I have a school or a CRM. That is ...
1
vote
1
answer
151
views
In which order should page- and pageSize-parameters be used?
I'm building an api and a bit into the development I realized that I constantly change the order of the page and pageSize parameters.
Currently I use C# and javascript, so the method declaration ...
7
votes
1
answer
4k
views
One Large API to several microservices vs lots of small APIs each with their own API
I have an application that is beiong split out into a number of services. From a previous question on here, I think that initially JSON/REST is the way to go for communication.
Some of my micro ...
1
vote
2
answers
187
views
WebAPI authorisation for other apps
I would like to create a WebAPI application that can serve some of my web sites. My goal is to abstract some common task such as email sending, address resolving etc by providing an API to all of my ...
0
votes
1
answer
4k
views
REST API design for associations/aggregation
I am building RESTful API that manages persons and lists.
There can be many List and many Person each with its own set of properties. Person can be in zero or more lists, List can contain zero or more ...
2
votes
2
answers
2k
views
Is RESTFUL API as back-end service one of the best (or suitable) choice for Mobile App? [closed]
I have a background on .NET development, recently I was asked to code back-end service for a mobile app. I had experiences on MVC, and now I'm trying to understand more on Restful Web API.
My ...