Questions tagged [web-api]
Specific APIs that communicate over web protocols, such as ASP.net Web API, as well as APIs that are exposed to web pages for network communication or apps for device communication
382
questions
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 (...
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
vote
5
answers
211
views
Purpose of async/await in web servers when stuck with legacy I/O
A couple days ago I asked about the Purpose of async/await in web servers, and got in-depth answers explaining how in fully asynchronous code, it frees up the CPU completely while also releasing the ...
23
votes
4
answers
8k
views
Purpose of async/await in web servers
I don't understand why I keep seeing async/await recommended (or sometimes, even enforced) for ASP.NET Core web applications and APIs.
As far as I can tell, every request is already being run on a ...
0
votes
2
answers
149
views
Allow-Rendering-Prevent-Download Architecture
I am trying to devise a simple system that, with the use of tokens, allows a specific file to be rendered in the client's browser, yet prevents the user agent from being able to download the file. ...
0
votes
1
answer
83
views
How to create QueryBuilder to work with concurrent requests
I need assistance with the QueryBuilder that generates OData query. Following is my implementation and it approach has couple of issues
If user forgets to SetRootTable then it will cause serious ...
0
votes
1
answer
104
views
Return response from controller or raise exception from service
I need some guidance on how to send error responses to client from WebAPI controller for an update operation. I need to check if data is changed and if it has duplicate data. I have service class that ...
2
votes
3
answers
353
views
Does it make sense for an API with 1 daily job to do to be asynchronous?
This is a conceptual question about whether my specific use-case warrants the use of an asynchronous API.
Language: Python 3.11
Framework: FastAPI (ASGI)
I believe I am confused about what an ...
1
vote
2
answers
108
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
4
answers
357
views
How exactly is the cancellation token mechanism implemented over HTTP?
In a web application with a frontend and a backend part, how exactly is the cancellation token mechanism implemented over HTTP? HTTP is a stateless protocol and it does not allow "sharing" ...
0
votes
1
answer
365
views
Is 10 KB a large amount of data to pass around each time a user makes an API call?
Each time a user of my APP / website interacts with the APP such that it makes an API call to the backend, the backend will make an API call to the mongoDB database to retrieve the document that holds ...
0
votes
2
answers
1k
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
174
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/...
1
vote
2
answers
1k
views
Why do Streamlit applications often consume a FastAPI backend?
I am fond of writing Streamlit applications (when a front-end is needed) and fastAPI backends when I just need a REST API.
I've seen many blog posts where these two are combined - with the Streamlit ...
0
votes
2
answers
307
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 ...