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
0
votes
0answers
18 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
19 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
57 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
1answer
91 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
40 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
91 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
69 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
2answers
68 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
36 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
90 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
284 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
56 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
92 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
463 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
132 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": "...
2
votes
0answers
31 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
91 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
67 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
174 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 ...
7
votes
4answers
4k 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
52 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
299 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
149 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
129 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
248 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
99 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
159 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
183 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
2k 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
73 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
79 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
70 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
81 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, ...
3
votes
3answers
1k views

Interfaces vs concrete types in DTOs and response classes

Had a discussion that i felt i needed some external input on. Normally always use interfaces instead of concrete types (on lists, injectable services and so forth). For example in lists i just pass ...
0
votes
1answer
58 views

Should two different set of login APIs follwing REST have write access to the same DB?

Like for example, /api_1/login and /api_2/login writing in the same table of the same database.
1
vote
2answers
790 views

Should an ASP.NET Web API application use Entity Framework in the API controllers?

Im a bit confused about what is best practice when working with Entity Framework and ASP.NET Web API. I am working on a project that contains a iOS/Android app and an API the app will use to ...
2
votes
2answers
178 views

HTTP 404 for REST calls from client side (browsers)

I'm having troubles with the issue of distinguishing between "real" 404s and 404s where the path is correct but the id, for example, doesn't exist when it comes to client side apps. Most REST ...
2
votes
0answers
40 views

Web Service returning serialized helper objects

I had the idea to have a route in my REST API that returns serialized (PHP) helper objects. The client code then can use those objects to format some complex JSON structures for the next request. When ...
4
votes
2answers
720 views

Authentication setup advice for web app and its backend API

I am fairly new to web development, and I am learning to build web applications. I am facing a problem figuring out how to set up authentication mechanisms for a multi-user application. Let me provide ...
0
votes
2answers
254 views

Who or what exactly does the “Same Origin Policy” aim to protect

As I understand the "Same Origin Policy" is a browser security feature that aims to protect the user. It prevents scripts to load data from another webserver (typicall with ajax). So esentially there ...
0
votes
2answers
58 views

Need suggestions for creating field level permissions which can be changed dynamically in an app

This is currently my User-Role-Permission model in the Db schema (excluded other tables to avoid confusion). My implementation goes like this: I have a Customer table and each Role has a different set ...
-2
votes
2answers
147 views

Confused about how APIs are called

I'm new to APIs. Conceptually, I understand what an API is, but I get confused when it comes to the some of the technical details. All of the tutorials I've read talk about URLs and endpoints, and ...
0
votes
1answer
98 views

How to handle adding new field / partial data update for a gRPC API?

Assuming we have following message that will be used to update data and it just got updated to version 2. message HelloRequest { string name = 1; // version 1 bool is_valid = 2; // version 2 } ...
-1
votes
1answer
152 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
0answers
37 views

Building a schedule app - best design pattern for collection on Rails API

I’m building a web app using Rails API on server side. The goal is to make a planning manager. I want my users to be able to plan ‘daily’ events, which will display at some specific weekdays, with ...

1
2 3 4 5
7