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

49 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
3 votes
3 answers
866 views

Strategy for ensuring consistency when integrating using an API?

How do I ensure consistency between two separate systems which store and maintain the same set of data, when the method of communication between them is REST APIs and webhooks? Is it possible? I find ...
Alex's user avatar
  • 159
3 votes
0 answers
613 views

Can an http service queue up work via a timer?

I'll preface this by saying that I'm not particularly familiar with writing http services. To keep things simple, I'll use the metaphor of creating a collages from images selected by the user. The ...
itsmatt's user avatar
  • 271
2 votes
0 answers
41 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 ...
Benni's user avatar
  • 121
2 votes
0 answers
487 views

How to side-load data using web api and entity framework?

I am working on a web api c# project using onion architecture and repository pattern and entity framework among other things. Doing some research I discovered a technique called side-loading https://...
John's user avatar
  • 775
1 vote
0 answers
483 views

How to handle relationships between resources in Restful API

Problem Hi, we have an API that it's pretty similar to a standard CRM. That is, we have a really big amount of resources (even our own customers can define new resources). All of these resources share ...
Antonio Gamiz Delgado's user avatar
1 vote
0 answers
87 views

What is the benefit of performing authn/authz at the API gateway instead of at the service?

I want to know is if we should perform authentication at the API gateway, at the individual service, or both. Let's frame this question and descussion in the context of new development. Specifically, ...
Mike G's user avatar
  • 239
1 vote
0 answers
33 views

Two step provisioning using OIDC and AD?

A client requested that we implement the following authentication/authorisation flow: User authenticates using OIDC via a IAM (Salesforce in this case). If user is an external user, then a flag is ...
dd_dent's user avatar
  • 33
1 vote
0 answers
95 views

How can I improve this API solution

Intro I'm creating an app and I'm not sure if the structure of the solution is correct. I have a BaseController that uses generics. This controller is inherited by others that do not have to ...
Emily's user avatar
  • 19
1 vote
0 answers
38 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 ...
Kyle J V's user avatar
  • 226
1 vote
0 answers
223 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 ...
Craig Brown's user avatar
1 vote
0 answers
19 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 ...
Someguy's user avatar
  • 111
1 vote
0 answers
59 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 ...
KawaLo's user avatar
  • 129
1 vote
0 answers
60 views

Are REST Resources and GraphQL Object Types conceptually equal?

I'm in the process of outlining the intended business logic of a web service. At this point, I'm not too concerned with implementation details. On the contrary, I'm looking for ways to abstract them ...
Willem-Aart's user avatar
1 vote
0 answers
304 views

What is the best way to implement an HTTP endpoint with different return types?

I need to make an HTTP endpoint with different return types based on query params. There are several options to do that: Return an object with one property set and the rest equal to null: public ...
nicks's user avatar
  • 523
1 vote
0 answers
987 views

Angular + WebAPI: DTO shapings Client vs Server

I'm currently creating a small single page app for myself. I'm using Angular and ASP.Net Core 2 Web API. On the server side, I'm also using the DDD approach (just for learning purposes, the app isn't ...
Matthias Müller's user avatar
1 vote
0 answers
451 views

Create A Complex Resource Atomically With Nested Objects Through REST

Background: There is a UI Client and REST Webservice. The user interface form allows you to create a complex object. The complex object is composed of primitive types (string, integers,...), and ...
Omri L's user avatar
  • 111
1 vote
0 answers
636 views

Are there any performance considerations when reading web.config AppSettings?

I'm writing a REST service with Web Api. One of the actions reads an AppSetting value from the web.config during execution. I would assume the web.config is loaded into memory, but during high load, ...
Daniel Minnaar's user avatar
1 vote
0 answers
53 views

Does Facebook Mobile Application call Graph API directly?

Does anyone know that Facebook mobile application is using their Graph API directly? or they create another layer specifically for handle their mobile application? Thanks.
tanapoln's user avatar
  • 111
1 vote
0 answers
78 views

Implementing real world Consumer-Driven Contracts in a single web application

I've been leaning towards the idea of Consumer-Driven Contracts in order to allow separate API consumers evolve on their own. To approach this concept initially I'm tempted to dip my toes in slightly ...
jpierson's user avatar
  • 291
1 vote
0 answers
82 views

Alternatives to setting up an API system

I want to launch a service that could support integration by third-parties. Unfortunately it’s way out of hand to build an entire API by now. Here’s my question: Would there be any possible solution ...
Fane's user avatar
  • 121
1 vote
0 answers
61 views

Posting different-shaped json documents to the same resource in an API

Is it a good idea to create an API in such a way that clients can post different shaped JSON documents to the same Resource? Let me give you an example and and explanation to why I am asking this. I ...
user1431072's user avatar
1 vote
1 answer
45 views

Logging web API POST requests for retry to outside service

My web API talks to an outside service running elsewhere, based on the web API requests (mostly POST). There is a message queue (RabbitMQ) that sits in between them, for request/response from either ...
shonjs's user avatar
  • 111
0 votes
0 answers
260 views

.Net Core Api - multiple Dto’s for single entity

I want to know the best Practice is about having multiple dto’s for different use cases. Let’s say we have an api with a set of controllers to handle requests coming from a administration backend and ...
Martin C's user avatar
0 votes
0 answers
56 views

What would be the best way to queue asynchronous calls received simultaneously by a web service cluster?

I have an API where every time is called there are multiple calls to multiple webservices in the background, sometimes it takes up to 20 seconds to process the request calling up to 10 different web ...
Mario Arturo's user avatar
0 votes
0 answers
622 views

add web api endpoint, which return html from view

I have ASP.NET 5 Web Api and need to do the following task: Add endpoint, which get cshtml page and return generated html, so it should do the same what is does razor view engine. What is better way ...
Alexan's user avatar
  • 249
0 votes
0 answers
57 views

Repository Pattern to support Bounded Context

I am building a REST Api from scratch so i am overthinking and revisiting various approaches and best practices. I have a Materials repository that serve all the sub-domains of our logic. Also i have ...
e4rthdog's user avatar
  • 267
0 votes
1 answer
148 views

How would one go about connecting API routes from one GitHub repository to another?

This may be a basic question, but I'm having some difficulty finding an answer online. My project is a MERN application that draws from an existing open-source API. This API utilizes a database that I'...
Serendipital's user avatar
0 votes
0 answers
227 views

How to change data after success URLs sent to partner API's if they can only be GET requests?

A lot of times there's a parameter in a partner API endpoint like success_url where you provide the partner API with an endpoint on your internal API to redirect the client. For example, on Stripe you ...
Dashiell Rose Bark-Huss's user avatar
0 votes
0 answers
57 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 ...
Felix's user avatar
  • 347
0 votes
0 answers
73 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 ...
Div's user avatar
  • 167
0 votes
0 answers
43 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 ...
Ergwun's user avatar
  • 502
0 votes
1 answer
791 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 ...
Charlie Fish's user avatar
0 votes
0 answers
758 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 ...
Force444's user avatar
  • 643
0 votes
0 answers
71 views

How do I arrange an ASP.NET Web API with authentication that is hosted on another subdomain?

Suppose I am designing a web application and also building a Web API with authentication via Kerberos/NTLM. The Web API is first for my app, but I imagine I want to make it general-purpose. My ...
Patrick Szalapski's user avatar
0 votes
0 answers
1k views

Sharing authorization logic between ASP.NET MVC 4 and WebAPI 2 projects

Pretty similar to this question here the current application that we are working on has a separate MVC 4 and WebApi 2 projects, where the MVC project is processing the user request to the WebApi which ...
Leron's user avatar
  • 217
0 votes
0 answers
108 views

Login Tokens Remote DataServer for use in a Javascript/HTML-PHP environment

I've asked this question on stackoverflow, but i think this is a more appropriate place for it. I'm creating an app for iOS, Android and the Web. I created a separate Restful Data Service that is ...
projectnard's user avatar
0 votes
3 answers
733 views

Web API Bad Request design

My organization is developing a Web API server. We will also develop the only clients authorized to access the API. We will follow the usual technique of returning Bad Request (400) errors for data ...
Anon_unique's user avatar
0 votes
1 answer
203 views

Should a Java wrapper around a 3rd party product's API be packaged as a Bean?

For the sake of personal use and for the educational reasons I wanna make a Java wrapper around a certain service's web API. That is, no additional software is required to use it on a client machine - ...
Semisonic's user avatar
  • 101
0 votes
1 answer
1k views

Asp.net MVC web application and iOS mobile app

I am currently writing a web application in ASP.NET MVC, so far it is mostly a simple CRUD web app. The database is hosted on the cloud and I am using Entity Framework to interact with it. I know ...
Fynnen's user avatar
  • 1
-1 votes
1 answer
48 views

Dashboard based on 3rd party application - duplicate data to local db or should I view the third party as my database?

I am currently building a web based solution based on an application used in my organization. The application have an integration (SOAP-based API). To keep things simple, I want to build a analytics ...
oliverbj's user avatar
-1 votes
1 answer
161 views

ASP.NET Web API - what is the design pattern?

In Visual Studio, ASP.NET MVC project template is designed for MVC pattern, but what about ASP.NET Web API project template? I know that we can create API from MVC project, also we can build MVC app ...
veryfreaky's user avatar
-1 votes
1 answer
254 views

Best practices for data manipulation to use in admin dashboard application?

I am trying to create admin dashboard to track sales and inventory. Using React front end and Django rest backend API. Right now I am pulling sales and would like to make some charts. What's the ...
user1079002's user avatar
-1 votes
1 answer
297 views

What is the optimal pattern to ensure a priority API gets cycles over its related (non-priority) API?

I have two synchronous web APIs that perform the same work but one needs to be prioritized over the other (the former is called from a client, whereas the latter is a caching optimization for before a ...
Craig's user avatar
  • 453
-1 votes
1 answer
43 views

Advice on accessing an API Service

I have a requirement to validate a data field (a reference number for payments) in our finance system by connecting to one of our vendor's API services. The finance system does not have the ...
djay's user avatar
  • 1
-1 votes
1 answer
97 views

How to architect a communication of objects between 2 software (B2B, so called, communication)?

There's a 1st software module (s1) that generates data and then there's one or more software modules (s2, s3) that will receive that data (objects), based on pre configured actions that define the ...
Vitor Silva's user avatar
-2 votes
1 answer
535 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 ...
Terje Kolderup's user avatar
-2 votes
1 answer
2k views

How do I use the same entities in multiple projects with the entity framework?

I have to create two different projects with the Entity Framework: Web API Services UI and Business Logic (MVC). Both the projects have to work with same POCO entities. I see two alternatives and ...
MNP's user avatar
  • 9
-3 votes
1 answer
395 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 ...
Ankit Kumar's user avatar
-4 votes
1 answer
76 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 ...
Naveen GS's user avatar