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

Filter by
Sorted by
Tagged with
-2
votes
0answers
34 views

How to break up a request into multiple requests

I have a question about following scenario I am trying to implement in Java JAX-RS REST: a client app sends request to my api, lets call it MY-API MY-API receives request, and sends it to vendor api (...
-2
votes
0answers
14 views

backend api design tradeoff for password reset& password changing& role changing& info updating

the admin of my application can reset password of common user, can changing the role of common user. the common user can changing his passowrd, can update information of himself like real name, etc. ...
1
vote
5answers
281 views

What http codes should i return when user request file which doesn't meet his requirements

i have a case where user can filter and download multiple pdf documents merged into single file. The client should display an error message when no document's meets the filter, and ask for ...
1
vote
0answers
26 views

In OAuth / OpenID Connect, does the redirect url matter for server to server API calls?

In OAuth / OpenID Connect, does the redirect url matter for server to server API calls? I'm currently setting up Azure AD to secure our API's. The first implementation will likely only be server to ...
2
votes
1answer
90 views

What do you call the combination of endpoint and HTTP method in a REST API?

Let's use the Twitter API as an example. My understanding is that we refer to /statuses/update as an endpoint and we refer to POST as a HTTP method. So what would term do you use to refer to the pair ...
2
votes
3answers
133 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 ...
0
votes
0answers
29 views

Security and cookie practices for an API of a website

I'd like to create a web API. It would be used on my websites and potentially by others as well. I intend to use a single token to authorise users. You see, this API acts as an OAuth2 client (or ...
1
vote
1answer
81 views

Architecting multiple codebases calling our public API + private API for first-party applications

Currently, we have the issue where we have two codebases (API & Website) calling the same database (along with some duplicate business logic) and we want to streamline this so all requests are ...
1
vote
2answers
95 views

Is it reasonable to ask API consumer (client) to provide sync response to notification/callback?

We have an API platform which allows user to create and manage a certain type resource. Client is expected to provide a callback url where our server will send notification to when the resource is ...
3
votes
1answer
166 views

Where should I place more complex business logic related to what a Web API does but consumed by a single client?

I have been debating with my colleagues about the following and we still did not reach consensus. The architecture is as follows: medium size monolith application for intranet usage a small ...
39
votes
1answer
3k views

How to design a REST API that can “prompt” the client about long-running operations?

Say you were to develop a REST API that provides access to a set of complex, long-running, operations. The typical paradigm for an API like this (as I understand it) usually involves (the client) ...
1
vote
1answer
78 views

Where to place the business logic for an external application that is tightly coupled with an internal application and how to adapt the architecture?

I and a colleague had a rather strange discussion with our boss related to the architecture of the applications we are currently developing. The C4 (second level) diagram of the existing architecture ...
0
votes
1answer
40 views

Designing asp.net core web api to add sub classes/specialized objects

I have not worked with EF for a while. As an exercise, I am writing a core web api that allows keeping track of a user medias. A media can be a postcard, a photo album, a recording, a book... I would ...
0
votes
0answers
24 views

How to structure/design a webapp using a large number of APIs

I am writing a webapp that aggregates a multitude of different APIs to gather data related to astronomy, and then returns the aggregated data in a single API endpoint. There are 7 API's being used, ...
-4
votes
1answer
64 views

Which API building practice is better?

Im working on a ERP product, In which backend logics are to be APIs. Right now I have around 80 Tables. Proposal 1: Creating CRUD APIs for all tables and manipulation of data to be handled in front ...
3
votes
2answers
149 views

API Design: Errors passed between APIs

I work as a developer on a few different APIs that make calls to each other. Let's take two and call them API-USER and API-BUSINESS. A user application makes calls to API-USER, which in turn makes ...
-2
votes
1answer
43 views

How to organize my controllers in projects in .Net API?

I'm working on a project that is a API with many controllers and modules. Which of the following is the best architectural practice to organizing my API controllers by dll (.NET 4.7 WebAPI)? Why? ...
-4
votes
1answer
93 views

Does it makes sense to implement a REST API for every app?

Is it mandatory to implement a REST API even if it doesn't make sense? I have created an app consuming REST services from other apps. Now that I have the final result, I wonder if it is needed to ...
-2
votes
2answers
70 views

Signing up users who have not registered

I am building an app where you can invite your friends to join the platform and discuss various topics. (almost Reddit). Functionality: When you create a topic you can enter the email of users you ...
3
votes
1answer
87 views

Separation of concerns and other best practices across Controllers, Services, Providers and Stores in ASP.NET when building a REST web api

I am traditionally a desktop app developer, but circumstance has thrust me into the role of doing web client and corresponding REST api logic for a project I am involved in. Unfortunately, I'm a one-...
0
votes
0answers
39 views

Should I use a Web API between a client and Entity Framework?

I am creating a database that will keep track of my company's clients, and an app that will allow users inside the company to read/update/etc. the database. I'm using code-first EF Core to manage the ...
1
vote
2answers
97 views

Web server archicture

This may seem like an odd question but it's something I've yet to find a "proper" answer for. I've tried googling but I don't get anything useful (maybe I'm looking for the wrong terms). I'm ...
3
votes
3answers
289 views

Coworker wants to use POST to pass ID's in API routes

We've recently started working on an API, and I'm running into a philosophy issue. This is only my second API I've worked on, but the standard I've seen for retrieving a single model is always a GET, ...
1
vote
0answers
17 views

Cart Checkout Item Check alternative

Not to sure if this is the right place to ask this. But I have more of a Theory Related question then Completely Technical I want to Propose my Issue at hand and then I'm looking for someone to give ...
1
vote
1answer
64 views

Should I separate client-side API calls into a separate .js file and class, and reference that?

Summary Instead of calling WebApi straight from a Web Forms User Control, I have created JS class which contains functions returning jQuery AJAX requests. The control would instantiate the class and ...
0
votes
0answers
32 views

Can reactive streams simplify API development even for low-scale applications?

The mainstream opinion about using a reactive non-blocking backend is that it increases performance for large numbers of clients but sacrifices maintainability due to increased complexity. I am in a ...
-2
votes
1answer
144 views

What is a simple implementation of onion architecture for C# ASP.NET Core WebAPI and SQL db that is not full DDD and CQRS?

I'm a programming teacher. My students learn structured and then object oriented programming in JavaScript and C#. They learn SQL, MS SQL Server, Dapper and EntityFramework Core. After this they ...
10
votes
3answers
480 views

API endpoint POST vs GET

Help me settle an internal question. We have an endpoint which we all agree should be a GET, because all it's doing is calling a stored proc and returning a set of data. However, there is a set of ...
4
votes
5answers
133 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": "...
1
vote
1answer
45 views

How do I make my Browser Extension send a Selection it captured to a Database/Web App so it can be stored in the user's account?

I am building a Browser Extension that captures a Selection made by the user in any web page, and stores it in his account. I don't quite know how to proceed with this, however. My initial thought ...
1
vote
2answers
95 views

JSON:API - I don't think I have an `id` or `type` to return

I'm building a Restful API and trying to use JSON:API format for my response. Looking at https://jsonapi.org/format/, it states: A resource object MUST contain at least the following top-level ...
0
votes
1answer
72 views

GET Parameters in Restful API

I'm in the starting phases of designing an API. I'd like it to be Restful and comply with what's commonly considered best practices. One of my resources need to accept several query string parameters....
0
votes
1answer
62 views

REST api - search url

I'm building a REST api and want to make sure to follow the best practices. I need to expose a method which will return a 'Document' entity by its 'Lot' number. It is possible that for a specific '...
0
votes
3answers
180 views

How to calculate the costs for an on-prem API request in terms of money?

My manager asked me how much it costs (in money, currency, $) to make a REST API request from our client application to one of our services. We do not use cloud, we have on-prem servers. The payload ...
8
votes
4answers
6k views

Is it a bad idea to pass JSON objects on the query string for an API “search” operation?

I'm building an API endpoint for a UI grid to search, filter, and display a list of domain objects, let's call them "widgets." In the past, I would have built this with a list of named query string ...
0
votes
0answers
53 views

Which authentication should be used for external users (not registered with the system)

I'm working with a project that uses ASP.NET Core 2.2. The main solution contains different projects, including APIs for a mobile application, APIs to integrate the system with third parties, a web ...
0
votes
1answer
551 views

Web API layer vs Application layer

I am just wondering should the presentation layer connects to the Web API layer first then WEB API layer connects to the Application layer? Let's say for ATM system which has Check Balance function, ...
0
votes
3answers
178 views

Which HTTP method to run an algorithm on input and return result?

I have a requirement to get input from a web app UI, send this input to the server who will run an algorithm on it. The web server will send back the output of the algorithm the the UI. Is an HTTP ...
2
votes
3answers
167 views

Rest application header based vs path based service routing

i have a rest API that is a front end to a more complex SOAP based service. The soap based service uses extended(custom) WSA-addressing headers in order to perform its routing. The extension of the ...
-3
votes
1answer
250 views

How do I overcome the limit of 4000 results returned from the REST API?

I have an application which records the company man hours of employees and other related details. Because it gets updated everyday or when a new employee is added, it tends to lead to a very large ...
0
votes
1answer
114 views

Using WebAPI as infrastructure layer in ASP.NET MVC

I'm starting a new asp.net mvc core project and for my infrastructure layer I'd like to use WebAPI as this layer should be usable in other solutions besides this one. I'm not really experienced with ...
1
vote
3answers
188 views

which layer must check if something(like account etc) exist in database

I am implementing a web api and i have crated three layers,data access layer,business layer and presentation layer. In data access layer I have a method which create a user.I use a transaction which ...
0
votes
2answers
196 views

Is it wrong to build as much granularity as possible into a REST API?

I was recently considering the difference between using raw SQL and using a query builder like knex.js for writing dynamic queries so that I get any level of granularity for filtering database tables. ...
1
vote
1answer
127 views

Corrrect to send JSON object in params?

Maybe I'm being dense, but is it common practice to create an API which requires users to submit GET params as an object? I've encountered one which has me submitting GET requests like... http://www....
2
votes
4answers
3k 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 ...
2
votes
1answer
77 views

How to handle frequent update requests to an API which is connected to the database?

In a document editing web application such as Google Docs or Evernote, sync/save has to happen almost instantaneously to make sure data loss is minimal in case of a connection failure or a client ...
0
votes
0answers
31 views

Restricting web API access to a resource to the unauthenticated resource creator

My question is about the best way for allowing an unauthenticated user who has created a resource to subsequently access and modify that resource they created via web API. My web API identifies ...
0
votes
1answer
80 views

How to manage breaking updates in an API & database

So I have been working on my mobile app for a while and it is live and in production. Because we released the app prematurely and are continuously improving current features and making them more ...
0
votes
2answers
71 views

Architecture for business functions impacting several Dataobjects/database tables

I am trying to create an example project Web API to see how "clean" I can remake the Delphi(Pascal) API we are developing on my job. I have created a solution which as of now contains 3 different ...
1
vote
2answers
83 views

REST: How to reference existing resources in a HTTP POST request body?

This question relates to a somewhat more specific case than the one discussed in How can I create a RESTful calculator? It should be assumed that the values to be calculated are not simple integers, ...

1
2 3 4 5
7