2022 Developer Survey is open! Take survey.

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
-1 votes
1 answer
35 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 ...
user avatar
-3 votes
0 answers
46 views

How can youtube and spotify apis used together commercially? [closed]

Plan is to use spotify & youtube API and their own players to combine the two and add my own functionality to a multisource player. Plan is to read spotify tracks & playlists and read user's ...
user avatar
0 votes
0 answers
22 views

Add API for smartphone APP requests (Ionic6) to Flask APP working with browser requests

We have a working multi page python flask web MVC application using bootstrap. We are looking to create app for smartphones and we decided ionic would be the better framework (along angular) since we ...
user avatar
  • 101
0 votes
0 answers
13 views

Whats the common "flow" for authentication using ADFS and OpenId Connect when building an API?

Im trying to "grasp" how a user should authenticate to our API. Our API is setup to use OpenID Connect thats issued by an ADFS-server. However.. as a "consumer" of our application, ...
user avatar
  • 193
0 votes
2 answers
68 views

REST Api - deleting a resource based on either ID, or its OwnerID

I have this list of Notes: public static List<Note> _notes = new List<Note> { new Note { Id = new Guid("00000000-0000-0000-0000-000000000001"), CategoryId = "1", ...
user avatar
1 vote
1 answer
50 views

Testing API with Auth0-enabled user authentication and authorization

I have a REST API and a SPA application, with Auth0 server issuing access tokens and enabling end users to login with their social identity provider. The API expects to receive a JWT access token with ...
user avatar
  • 113
0 votes
0 answers
18 views

E-commerce website -> third party business management software API

I'm little bit confused about one aspect, so I came here to seek help :) Let's say we got this scenario: I want to build myself a e-commerce website. I can think of following steps: Simple site to ...
user avatar
0 votes
1 answer
55 views

Versioning REST APIs that communicate with each other

Thanks to mergers & acquisitions, our company now owns several different products that manage different aspects of our customers' business processes. Obviously it would be advantageous if these ...
user avatar
0 votes
0 answers
75 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 ...
user avatar
-3 votes
4 answers
123 views

How to detect user location and divide your APP / website up by Country? [closed]

So here is the problem that I need to solve for my APP / website. It will be available for everyone on the planet. But Users will only interact with and see content from other Users of the same ...
user avatar
-2 votes
1 answer
95 views

How often should I request a token when communicating with a third-party API?

I have an ASP.net web API. I would like to call another API that has an authentication token inside my API. The code flow is as follows: My API is called → Get authentication token from 3rd party API →...
user avatar
0 votes
1 answer
66 views

How to Properly Design an API Prefetch System

I'm creating an API for a web service. There are a couple of endpoints in this API that require some time (lets say +5min) to compute, so I'm creating a prefetch system that will call in the ...
user avatar
  • 131
0 votes
3 answers
244 views

Should I unit test functions internally used by API I expose?

I'm writing a CRUD app in Python that exposes web API. At first I wrote functions for communicating with DB and wrote tests for these functions. def crud(): # do something with db def test_crud(): ...
user avatar
1 vote
2 answers
173 views

What Is the Industry Standard of Specifying APIs for Frontend-Backend Handshake?

I am somewhat new to web development and maybe this question belongs to stackoverflow, but there is a human-interaction component here. Here is the scenario. I am serving some neural network models ...
user avatar
  • 119
0 votes
1 answer
59 views

Best mapping practices in an enterprise application

This question might seem like a trivial question. But here it goes. Currently, I'm working with this .NET Core application, an N-tier application consisting of a Vue frontend, business logic layer, ...
user avatar
  • 111
0 votes
1 answer
197 views

RESTful web APIs using MVVM architecture

As the title implies, I would like to know if it is possible to create RESTful web APIs using MVVM architecture? Or we can use just MVC pattern to create web APIs?
user avatar
  • 103
0 votes
0 answers
75 views

C# Web API Requests and multipart forms with json and files and not buffering the filestream in memory

I'm looking for some C# web API architecture advise on how best to minimize my memory when doing a "multipart/form-data" request which consists of a json payload with a single file upload. ...
user avatar
  • 1
0 votes
0 answers
44 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 ...
user avatar
0 votes
0 answers
46 views

Can/Should Refit (API) Contracts be the same of MediatR (CQRS) Commands?

I'm creating a microservice using Clean Architecture principles. The following picture shows the project structure: On the Application layer, I am using MediatR (using CQRS), where I have the ...
user avatar
1 vote
0 answers
56 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, ...
user avatar
  • 229
0 votes
0 answers
14 views

Consume Identity enabled WebApi in an MVC Project

I have an MVC project with no authentication. The project uses webapi as a backend to retreive and send information through the controllers. Now we need to add authentication to the webapi project as ...
user avatar
1 vote
3 answers
150 views

Is the "archetype controller" really complies with REST architectural style

I've read the Fielding's thesis that defines the REST architectural style and noticed that the defined style appears to significantly conflicts with the so called "archetype controller", ...
user avatar
0 votes
0 answers
24 views

Web API: Use proxy or auth

Meta Hi, I am a new developer and new to this stackexchange stuff. I dont have much experience but I read a lot. Introduction I am working on a monolithic web application and realized that it may be ...
user avatar
0 votes
0 answers
47 views

Spring Cloud Gateway - combine service-to-service authentication with user authentication

We are trying to find the best option for applications from the Public Cloud being used by corporate (internal users) to be able to make authenticated calls to APIs published in the internal network. ...
user avatar
  • 9
2 votes
1 answer
125 views

Best practice for designing a WebAPI for exposing data in a SQL database interacting with C++ and C# applications

I am looking for general guidance or any relevant links for a complex project. We are a small business that sells a construction materials testing software. The client is a Windows application with ...
user avatar
0 votes
0 answers
257 views

and 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 ...
user avatar
  • 249
0 votes
1 answer
71 views

Should integration tests cover calls from web app to API?

My solution consists of an API for data access and a web application that calls it. I have integration tests set up for the API. However, the actual Web application that calls the API is not a part of ...
user avatar
  • 103
0 votes
2 answers
324 views

JWT logout: Sharing blacklisted invalid token among services

I am working on a microservices project involving 4 services - Auth Service, Service-A, Service-B and Service-C. All the services are implemented using Spring Boot. The Auth Service is responsible for ...
user avatar
0 votes
1 answer
1k views

Blacklist JWT tokens or whitelist JWT tokens

I am working on a Spring Boot web application. The REST APIs are secured by JWT tokens. Currently I have only access token generated (not implemented refresh token concept). My question is related to ...
user avatar
4 votes
3 answers
476 views

GET vs POST when exposing machine learning model predictions using a REST API

So the recommendations for using GET vs POST in a REST API that I've read on stack overflow are geared almost exclusively toward CRUD operations involving a database. However if you are simply writing ...
user avatar
  • 247
2 votes
7 answers
335 views

Representing a large list of complex objects in JSON

I am currently developing an API that returns JSON structures. One of the domain objects returned is a time series, which is a potentially large list (many thousands of elements) of complex objects. ...
user avatar
  • 184
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 ...
user avatar
  • 33
3 votes
2 answers
1k views

What layer do third party API request/response models go in and what do you call them?

I have a RESTful API service that has three layers: Application/Domain, Infrastructure, and Presentation. Application/Domain contain my interfaces and models. I currently have three different types of ...
user avatar
0 votes
0 answers
55 views

Fetching data in separate servers

I have a monolithic REST API and a separate WebSocket server that’s used for real-time updates. They're both separate so that I can scale them independently. The API fetches data from the database and ...
user avatar
  • 1
0 votes
0 answers
24 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 ...
user avatar
  • 267
3 votes
2 answers
637 views

Should I return always a JSON for only one value in a REST API or is it ok to return just the value?

For example, I create an API endpoint that provides the next available label for creating some items, so I call it like this: GET /api/v1/get-next-label/ Is it ok to return just: LBL-000001 Or is it ...
user avatar
  • 139
0 votes
1 answer
90 views

How to architect a collaborative web application for live updates?

When using collaborative applications like issue trackers, planning tools, etc. it can be very frustrating to have to keep hitting refresh to make sure you're viewing the same state as your colleagues....
user avatar
0 votes
1 answer
217 views

REST: How to "upsert" a resource without an specific resource URL

I'm trying to create a REST API that allows the user to: create a resource if it doesn't exist. update a resource if it exists. with the same request. Given an example: I have a company that has ...
user avatar
-3 votes
1 answer
141 views

Should I restrict my api with CORS?

Should I restrict my backend API (api.cool-domain.com) to be only accessible by my frontend (cool-domain.com)? Seems like it will provide some amount of additional security, I am just asking is it ...
user avatar
4 votes
2 answers
2k views

REST API: POST and PUT for nested resources

I am wondering how to deal with nested resources in a REST API. I've seen other questions on the subject here, but I didn't find one that answered my question. More specifically, should POSTing/...
user avatar
  • 169
0 votes
1 answer
95 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'...
user avatar
0 votes
0 answers
90 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 ...
user avatar
-1 votes
2 answers
138 views

How to test a web service / API?

Our product is a C++ server component implementing a REST API. We have automatic tests that check whether the responses are byte-identical to the reference. The new requirement that came in is that ...
user avatar
  • 355
-1 votes
1 answer
146 views

Can I call a WCF endpoint from ASP.Net Web API?

I have a web api with controller methods that use rest http(post/get calls). Clients consume this API with normal httpclient calls and I pass an http response back. My use case is I have a legacy ...
user avatar
1 vote
1 answer
92 views

Designing an API without knowing most of the requirements

Say we have a company that provides services and they would like to build a new API to sell to clients who will use it for their websites. Some things to consider: The company has an old API that the ...
user avatar
  • 27
-1 votes
1 answer
101 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 ...
user avatar
0 votes
1 answer
143 views

Is this the right way to call async and await

Hi I am new to async/await in C# . I have created a controller which is accessing result from HttpClient injected through HttpFactory. Here is my working example class MyController { private ...
user avatar
  • 109
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 ...
user avatar
  • 19
0 votes
4 answers
274 views

What problems could be caused by inserting into a database on an HTTP GET?

I have code that checks if the scanned qr code exist in the database and if it exist it will insert data into another table but I did it in the HTTP GET request, is this alright to do it this way or ...
user avatar
8 votes
5 answers
423 views

How to map "mv" operation to HTTP verbs?

In designing a RESTful api the problem arises as to how best to allow resources to be moved between collections. Renaming a resource could be done by using PATCH but this is not the same thing as ...
user avatar

1
2 3 4 5
8