All Questions
41
questions
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 ...
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 ...
-1
votes
2
answers
292
views
Proper ways to manage evolving inter-communicated microservices APIs?
I'm working on a big C# application that is currently under development so we have some room for structural refactoring.
The application is divided into 10 microservices, which some of them ...
3
votes
1
answer
4k
views
Multiple HttpClients in .NET Core Console Application
I'm building a .NET Core class library wrapper for a REST API that, ideally, could be used in both console applications and ASP.NET Core web applications. So far, I've based development on supporting ...
1
vote
1
answer
1k
views
SDK design: Should I parse enum as string or as enum?
I am building a SDK that will simplify the use of my API.
The problem is if when I have to return property of type enum. For example, I use strings instead of int for displaying enum such as
{
"...
1
vote
3
answers
158
views
Should we consider immutability for local scoped variables
I have the following code:
const string endPoint = @"foo{0}?pageNum={1}&itemsPerPage={2}";
const int itemsPerPage = xxx;
InvoiceCollection response = await _apiClient
.GetAsync<...
-2
votes
1
answer
377
views
Centralized REST API call management?
I was given a solution with many projects. Multiple projects call multiple REST APIs. These calls are scattered around the spaghetti code. Trying to figure out what calls are done in what sequence ...
2
votes
1
answer
3k
views
How to parse a dynamically changing Json file? (c#)
So I know a little bit about parsing Json data but not too much so pardon if I am not describing everything as I should. Lets use this Json file as an example:
{
"firstname": "John",
"...
-3
votes
1
answer
171
views
A True RESTful API | Help needed
I know that a RESTful would have unified API and it treats everything as a resource (a noun, example a book, a product,...) and it can be applied with CRUD operations using HTTP Verbs (GET, PUT, POST, ...
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 ...
4
votes
3
answers
2k
views
REST API: what should PUT do with complex objects?
Let's suppose I have the following objects in my domain:
class Warehouse
{
int Id;
string Address;
Item[] Inventory;
}
class Item
{
int Id;
string Name;
int Price;
int ...
2
votes
4
answers
8k
views
How do you manage objects that are shared between back-end services and front-end services/apps?
I have multiple REST-ful APIs that I'm using as my "back-end". I also have multiple web apps (.NET MVC). These web apps make calls to the APIs for data. So, an object being returned by an API will be ...
2
votes
3
answers
1k
views
Determining response codes from void functions OOP
I am trying to create a Put endpoint using rest. Let's say that under the link
/addresses/12345
I am trying to add a new address (if that id doesn't exist) or I'm trying to update it if it does ...
2
votes
1
answer
90
views
Trying to figure out how to make the syntaxes of 2 different API's the same
I'm doing research to a problem occurred in our company. We have a front-end web portal which communicates by API with a back-end in a same syntax, for example: "www.123.com/api/v1/getCustomers".
...
1
vote
1
answer
2k
views
Long running server process. How to update client
What I'm looking for is a pattern for the client triggering a server process, then the server process signalling the client when its finished.
preferably with examples available in .NET or dotnetcore
...