Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.

Questions tagged [api]

An application programming interface (API) is the specification for which software is meant to be used by other software.

Filter by
Sorted by
Tagged with
0 votes
1 answer
59 views

How do I make a breaking change to a Nuget package?

My apologies if some details here are deliberately vague, I don't want to get side-tracked by the specifics of the language, frameworks, third-party API, etc. Some months ago, I developed some code to ...
user avatar
33 votes
10 answers
9k views

Am I right that switching programming languages will have little impact on the scalability of a CRUD API?

An external consultant to our team advised us to rewrite our SAAS offering (essentially a CRUD API) in .NET because this is more "scalable" than using Node.JS (or Rails or Flask etc.). By ...
user avatar
  • 525
-2 votes
3 answers
152 views

How do I describe a hierarchical relationship between software objects? [closed]

I'm trying to express a particular relationship between two software resources available in an API. The relationship is such that one of the resources is the "main" or "original" ...
user avatar
  • 17
0 votes
0 answers
14 views

Any good pattern to deploy and maintain multiple helm-released API version routes along with Istio Virtual Service routing?

I am deploying multiple API versions (helm chart) from automated pipeline and I want to deploy an Istio virtual service to establish routing to those version (/v1, /v2, etc.). Each of these API helm ...
user avatar
0 votes
5 answers
130 views

Standard Error response for Backend API failure

In REST APIs, http error codes 4XX, 5XX are used to convey error messages on the server. When the API itself is dependent on another backend API, is it a good practice to expose error codes or error ...
user avatar
  • 353
1 vote
1 answer
46 views

Can a REST API response include a reference and preview data

Let's say I have a REST API with resources that look something like this: /users/<id> { "id": <str:user_id>, "firstName": <str:first_name>, "lastName&...
user avatar
0 votes
1 answer
93 views

Correct way to deduplicate conditional statements [closed]

I'm facing with problem that in every function (with serves as service for endpoint) I need to check what is value of query parameter (mode). I need to check it on many callables, E.g. def create(self,...
user avatar
  • 111
-1 votes
1 answer
78 views

API request and response from event consumer

How to expose an API using the traditonal request-response style while internally it handles it in event driven way (pure or partially event driven), given that if callback style may not be possible ...
user avatar
  • 109
0 votes
3 answers
125 views

CRUD service with or without DTOs

I'm about to create a service providing a simple CRUD Json REST-API. The main requirement is that documents stored/received always conform to a schema provided as JSON schema. So here's the thing: ...
user avatar
-1 votes
1 answer
51 views

Navigating a many-to-many relationship and determining price from a bulk API Call

I think it will help to give a little context, not only about the DB architecture but the actual product. I am building a business where we will be selling pallets of liquidated merchandise. Think a ...
user avatar
5 votes
1 answer
336 views

What does "OOM-safe" mean?

(In the context of reading about the systemd D-bus implementation called sdbus (full sdbus API here)): What does "OOM-safe" mean? From this blog post, by Lennart Poettering, the author of ...
user avatar
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 votes
1 answer
101 views

Writing a API for a hardware device for mutliple platforms

We want to create an API to communicate witha device we currently sell. The API should be available for several platforms like C / C++ / .NET / Python and available for Windows and Linux. The idea is ...
user avatar
  • 99
2 votes
1 answer
201 views

Does it make sense to add an additional REST API to access a database?

I've recently joined a startup that has, in my opinion, a strange (and inefficient) way to access their database. Their implementation consists of multiple REST APIs that are exposed to multiple ...
user avatar
  • 33
-2 votes
1 answer
68 views

Is it okay to return an object in a list endpoint according to REST API specification?

I need to add extra data to a list endpoint. Basically it is the list I want to return and an extra data. Like below { "results": [...], "extra_data": { "field": &...
user avatar
2 votes
2 answers
122 views

Use of internal interface around paid APIs

Note: I'm new to using paid APIs (like Stripe, GPT-3, Twilio, ...). When you are using a paid 3rd-party API, you are essentially betting on them keeping reasonable prices in the future, right? So in ...
user avatar
3 votes
5 answers
203 views

Version REST APi as a whole, or by endpoint

I had a discussion with a colleague of mine today regarding versioning of a REST Api. We currently have an API with support for versinong by providing the correct version in the URL. So for instance: ...
user avatar
  • 193
0 votes
1 answer
101 views

Designing a system to hit multiple HTTP requests serially

Hope this is the right StackExchange community to ask this question. I am building a (Python) project that will have a list if URLs to hit. They have to be hit serially, and part of response of one ...
user avatar
  • 109
0 votes
2 answers
77 views

Is it bad style to share a Model class between two API Endpoints?

I have the following scenario: My .NET Core API has two Endpoints CreateProduct and UpdateProduct. The only difference between the two will be that UpdateProduct will need to know the ID of the ...
user avatar
  • 495
0 votes
0 answers
44 views

Best way to align multiple RESTful API's through an API gateway

We currently have a monolith public api which serves most of our api endpoints. This has introduced a bottleneck as the owning team needs to make changes to publicise anything new and other teams don'...
user avatar
  • 1
0 votes
1 answer
139 views

How far can one debug a low-level API in closed-source environments?

Assume a low-level API is provided without source code (e.g. DirectX). The API provides a virtualization of hardware resources (GPU, CPU, audio card, etc.), which enables the user to call hardware-...
user avatar
0 votes
3 answers
143 views

Should I perform simple validation (not null, max length, etc.) in a web api controller and duplicate in a command handler?

I have a question about DDD. I wonder if I should add validation in a web api controller and duplicate it in a command handler? Is it good approach to validate a DTO and a command even if the ...
user avatar
0 votes
1 answer
51 views

Decoupling data validation from data processing

I'm trying to implement a web service API client using the guidlines i've found in this article: https://www.oreilly.com/library/view/designing-evolvable-web/9781449337919/ch09.html As it comes to my ...
user avatar
  • 103
0 votes
0 answers
37 views

HTTP and gRPC status codes equivalent to Nginx's 499 code (client closed request)?

Nginx introduces a 499 code, which is used when the client closes the connection before the server could respond. This is specific to Nginx. What would be the equivalent plain HTTP and gRPC status ...
user avatar
35 votes
6 answers
6k views

Is the frontend or backend (API) responsible for formatting data in a specific locale?

In our company we had a discussion whether formatting data in a certain locale is the responsibility of the frontend application or of the API that provides data to it. Which of the following ...
user avatar
  • 495
-1 votes
1 answer
107 views

Two layers of DTO's for API's with Entity Framework

I am building an API which, amongst other things, needs to handle users. I am building it with C# 10 and .NET 6. In order to receive/return data in the API end points, I am using records. So for ...
user avatar
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
68 views

REST API Per-Method Versioning

New to writing REST APIs. Had a question about versioning. Let's say that we have a service with the following methods: Search <- Given some data, it will perform a search Billing <- Given a ...
user avatar
  • 155
0 votes
1 answer
106 views

Best way to design multiple paginations in a REST API

Let's suppose that I have a model named Collection. I can create a collection, this collection have two important fields: shared_with_company, shared_list. currently I have an endpoint: /collections ...
user avatar
1 vote
1 answer
41 views

Firebase Auth system with Rails API design

TLDR; How can I utilize Firebase Auth in my iOS application and sync the Firebase ID with a user in my API? I am in the process of designing an iOS application that reads from a Rails API. When first ...
user avatar
  • 11
1 vote
1 answer
134 views

What is the best way to design calls of post and comments in a rest api?

So, currently I have two models: Post and Comment. Where a post can have multiple comments. I have an endpoint named Posts and an endpoint named Comments that is called to retrieve comments of a post. ...
user avatar
0 votes
2 answers
127 views

When updating a model on a RESTful API, should there be an update endpoint per field? or one endpoint for the model?

For a RESTful API, consider a model schema as follows: MyCoolObject { field_a field_b field_c } Is it better to create one update endpoint to update one or many fields on the model? Or create ...
user avatar
0 votes
2 answers
54 views

Service changes for local development environment

I am developing a web app along with a backend API. The backend however must talk to other services, some of which are internal and others are not. In an ideal scenario we would spend time and have a ...
user avatar
  • 161
-4 votes
1 answer
58 views

Is there a way to use a third party Python or C API through C#? [closed]

I will receive a hardware which will have native Python API to communicate through USB. The device will continuously send image data. The vendor only supports Python and C APIs to communicate with the ...
user avatar
  • 129
-1 votes
1 answer
120 views

rest api design for bulk post [closed]

Is it OK for an API to accept either an object or an array on the same endpoint? I want to allow the user to post multiple items at once. I am thinking of creating a different endpoint, but then it ...
user avatar
  • 125
-1 votes
3 answers
299 views

What is the difference between Facade and God?

A Facade is a higher level API over a whole subsystem. A God is class that violates SRP. Where do we draw the line? Does the following code represent any of the two: enum UnitType{Demon, Paladin}; ...
user avatar
  • 6,715
2 votes
1 answer
130 views

Naming convention for the classes holding REST APIs [closed]

Our new team suffixes class names with API to indicate that they encapsulate RESTful methods. Eg: "PaymentTemplateAPI", "FeeTemplateAPI" classes. I find it odd since API is a ...
user avatar
  • 139
1 vote
2 answers
197 views

Should a client / server share error codes?

I am in two minds about sharing client / server errors codes. We are writing both ends of the system, if our API was external this would not be possible, but that requirement is very unlikely. So an ...
user avatar
  • 161
0 votes
1 answer
277 views

How to share users between multiple web application?

Objective I have to create way to use the same users to connect to multiple application, and i am thinking about how to do it and how to share the data between the applications. Details Each ...
user avatar
0 votes
1 answer
41 views

Automatically scheduling CRON jobs via API

So, I'm working on a specific solution that requires the creation of jobs that should run at a specific time, and complete a certain action. We've built a GUI where the client inputs params required ...
user avatar
  • 101
0 votes
1 answer
84 views

Javascript and payment security

I'm using a third party CRM application which allows you to build web forms using drag and drop widgets and the ability to add javascript code to manipulate those widgets. I need to build a form to ...
user avatar
  • 291
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
2 votes
2 answers
139 views

API design: how to minimize client support?

I am tasked with designing an API for a car registration service. I don't have all the details yet, but we will receive requests from car dealers via API that my client will then process and forward ...
user avatar
  • 396
0 votes
0 answers
26 views

Securing an API in production with Spring Security

At work I have to develop an API that queries data from a Hbase Cluster. They asked me to implement basic authentication in order to secure this API. The use case is very simple. For the moment we ...
user avatar
0 votes
0 answers
34 views

For a SpringBoot REST API + React frontend independent CORS project, best method to implement messaging between users?

I have been looking into adding the messaging functionality to my application and I have been struggling to figure out the best approach to take. Everything seems very heavy and complex, I have been ...
user avatar
0 votes
1 answer
94 views

SQL Foreign Key Relationships and External Data

I work for a company that wants an external system built outside of their core system. I can't share an SQL database, and can't store data in their database. So I am forced to maintain my own SQL ...
user avatar
0 votes
2 answers
182 views

How can I do a GET for complex calculation when the amount of data required may be too large for a GET?

We have an internal library that does a calculation based on several datapoints. There is a fair bit of data required for the calculation, about 5kB in total. I'd like to make this an API endpoint for ...
user avatar
  • 139
0 votes
1 answer
86 views

How to get the CSRF token when using a cross-origin REST API?

Usually, the web server that is serving a page includes the CSRF token inside the HTML. However when I'm using a cross-origin REST API, there is no "initial" page that could include the CSRF ...
user avatar
0 votes
1 answer
202 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
2 answers
78 views

How to structure URL when retrieving a REST resource by an attribute that isn't the ID?

Let's say I have a collection of cars, all identified by VIN, such that cars/xyz123 will return the car with that VIN. Furthermore, I can get subsystems (children) by using URIs similar to cars/xyz123/...
user avatar
  • 103

1
2 3 4 5
25