Skip to main content

Questions tagged [api-design]

Application Programming Interface (API) Design discusses best practises for creating libraries intended for general purpose or public use.

Filter by
Sorted by
Tagged with
2 votes
3 answers
183 views

Say I have the following header #ifndef WINDOW_HPP #define WINDOW_HPP // includes... namespace window { struct Window { GLFWwindow *handle = nullptr; }; struct ...
user avatar
1 vote
1 answer
128 views

I am currently rethinking my API response schema and caching strategy while implementing ETag-based caching for a paginated REST API (for example, listing places). Each paginated response looks like ...
Meds's user avatar
  • 19
1 vote
2 answers
569 views

I just started learning about the specification, but I still have some doubts about why GraphQL simply hasn't replaced REST since it was created. REST APIs are very inflexible and straightforward. ...
Sami Daniel's user avatar
0 votes
1 answer
151 views

I want to create one service that reads data from two databases and passes it to the customer devices. Is this an overall bad design decision? I think that since it is only read-only, it should be ...
Travis's user avatar
  • 121
2 votes
1 answer
179 views

Preface: This will not be available publicly or to third parties, so I am not concerned about users having the background knowledge to properly form GET requests. These are also not only analytical ...
user avatar
2 votes
3 answers
282 views

A typical search query looks something like GET example.com/entity/search?q=John If we want to add some filtering to this endpoint, we could for example add ...&filter= followed by a URL encoding ...
aioobe's user avatar
  • 957
1 vote
1 answer
241 views

I came across this system design question and have been wondering what is a good approach. Requirement : We have a typical blog or a mini social media kind of website where users create "Posts&...
brahmana's user avatar
  • 154
0 votes
1 answer
269 views

I'm devising an API - or actually, a wrapper API for another, lower-level API - in a programming language with objects. This API represents some entity E which is reference-counted (for example - a ...
einpoklum's user avatar
  • 2,808
2 votes
3 answers
2k views

I am building a web application. This application is meant to be a home for player rankings and tournament results for a competitive community. I have planned to do this in three layers: a database to ...
John Johnson's user avatar
1 vote
3 answers
151 views

This may be one example of a very general design question. Suppose I am building a service and I want the client to provide the location of some data on S3 which I will then read and process. How do I ...
allstar's user avatar
  • 123
-1 votes
1 answer
81 views

SMHI´s API have the below documentation for its properties. What intrigued me is the value range (0-8) for 'tcc_mean'. Not only does it differ from other properties on the API, for example humidity ...
David's user avatar
  • 313
0 votes
1 answer
524 views

Here is an Example API for managing companies, employees, and their children. My entity relationships are as follows: company -1:n-> employees -1:n-> children I’ve structured the API routes ...
Doku's user avatar
  • 111
0 votes
2 answers
292 views

Starting Point: According to https://www.rfc-editor.org/rfc/rfc9110.html#name-safe-methods, when making a GET call, the client is not requesting and not expecting the call to lead to any state changes....
user1995099's user avatar
1 vote
1 answer
201 views

I need suggestion / recommendation on the design approaches mentioned below. UseCase: I have a usecase where a client uses my system to generate some recommendations. Now, these recommendations are ...
Passion's user avatar
  • 19
7 votes
4 answers
2k views

I'm working on a API for the logistics department, and I have a resource called logisticTransport, which is an entity in our database. I'm facing a challenge with maintaining consistency when ...
danidcode's user avatar
1 vote
1 answer
231 views

What would be the best way to have a single REST API but with multiple "backends" (Not sure if this is the correct terminology)? Currently we have a basket/cart API that handles product ...
gsck's user avatar
  • 137
0 votes
1 answer
218 views

I am making a webapp that deals with money movement. All the financial actions are done through an API. For example, right now I can create an account for a user, add funds to their account, transfer ...
Mitchell Jeppson's user avatar
-1 votes
2 answers
593 views

Say you have a REST API endpoint like POST /move-money which transfers money from your main account to a savings pot. There are three path parameters accountId for the user's account potId for the ...
MZokov's user avatar
  • 101
0 votes
1 answer
138 views

Just for some context, I am a CS student in my second-year who is working on a C++ desktop application (using the Qt framework) made by an engineering professor. The application is an educational tool ...
Johnny's user avatar
  • 1
11 votes
5 answers
3k views

I have a "Games" API which retrieves video game data from a large database. The /games endpoint returns some very basic information about the game, such as the title, description, etc. More ...
Yeager's user avatar
  • 121
0 votes
1 answer
704 views

One post can have many comments. How can I design REST API urls for HTTP POST and HTTP PATCH for comments. My idea is to have the following endpoints: HTTP GET: /posts/{postId}/comments HTTP GET (all ...
Aleksander Chelpski's user avatar
0 votes
3 answers
655 views

I'm building an application that allows the creation of users. These users can have profiles which define their permissions, as well as be given specific permissions. Now I'm struggling on deciding ...
Gary Holiday's user avatar
  • 1,191
1 vote
3 answers
350 views

We have an API that allows clients to POST some request which takes some time to complete, so the API simply places it on a message queue and returns a 202 (Accepted) and a new GUID in the body. The ...
JoelFan's user avatar
  • 7,151
-1 votes
1 answer
72 views

I am new to backend development and I was building a feature for my project where I can send notifications to various channels (for example slack). I have a written notification class, which loads the ...
AlwaysBlue's user avatar
1 vote
2 answers
81 views

I'm writing a Python CSS-selector library that allows one to write these kinds of expressions in Python as a pet project. The goal of the library is to represent selectors in a flat, intuitive and ...
InSync's user avatar
  • 137

1
2 3 4 5
24