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.

98 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5 votes
0 answers
202 views

Should custom Django Admin be separate from client endpoints?

I am currently in the process of creating a Django REST framework project for a client server web app. I would like to ask the following: Should I write a custom admin if I want my app to be ...
 DJN's user avatar
  • 51
3 votes
0 answers
278 views

API Gateway Design Pattern - Backends for Frontends

I am contemplating the use of the design pattern API Gateway, specifically the Backends for Frontends derivative. We have a number of 3rd party software packages that expose an API. Over the course of ...
Ryan Wilson's user avatar
3 votes
0 answers
86 views

API Cilent - global request method or one method per request?

I am designing a 3rd-party library for developers to retrieve data from various endpoints of another system which itself has multiple APIs. Each of those APIs may contain the same type of request but ...
Jason Roman's user avatar
2 votes
0 answers
389 views

Drawing the boundary between high level API and low level API

Assume that were developing a cross platform graphics engine. Now we have quite a lot of low level APIs to choose from (OpenGL, Vulkan, DirectX 11, DirectX 12, ...). Now because of this, we are gonna ...
D-RAJ's user avatar
  • 129
2 votes
0 answers
320 views

Reading (GET) Facebook Ads From Ad Library and Reading (GET) Personal Ad Account Billing Data in my Android Application

I'm trying to create an android application for personal use to do the following: Get ads from the Facebook ad library (commercial ones) not the ones with politics topics etc. and then insert them ...
Rany's user avatar
  • 121
2 votes
0 answers
110 views

How to design job-handling for API

I am not sure if this is the correct place to ask, please direct me to the correct place if this is not it. Context I have written a do-all, keep-all, serve-all API (it started small, then grew out ...
Miniols's user avatar
  • 21
2 votes
2 answers
500 views

Error Codes with Properties Files or Database

I'm about to implement Error codes for my company API, so, based on rfc7807 I will include a type which is an error type which is basically an error category, and inside those categories we have a ...
Ricardo's user avatar
  • 29
2 votes
0 answers
85 views

API Architecture Decision on Authorization & Validation levels

We are designing an authorization mechanism for a Product API where users have their own claims. The api has a patch request like this: PATCH https://product-fcd.com/api/product -d {"Products": []} -...
rockin''s user avatar
  • 121
2 votes
0 answers
508 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
  • 773
2 votes
0 answers
660 views

Is it OK to use mongodb's query object format as a parameter for my api?

I am designing an api that can give developers read-only access to a large dataset. The data is stored in a mongodb database. All the results of the api, will basically either be a count of matches ...
Joe's user avatar
  • 337
2 votes
0 answers
137 views

How to design an interface for two similar but distinct objects

I'm designing an API for a JavaFX control to be submitted to the ControlsFX library. This control is called the ViewManager, and its purpose is to hold a collection of View instances, all of which ...
Mirrana's user avatar
  • 1,067
2 votes
1 answer
335 views

Wrapping a legacy C++ codebase with a C API

I have inherited a large C++ codebase implementing various Windows desktop applications, services and libraries using Windows MFC. There are no automated tests. We need to decouple the UI and retain a ...
DLT's user avatar
  • 201
1 vote
0 answers
66 views

How to model api error type with errorCode and parameters

I work on a spring kotlin backend which has an angular and a mobile frontend. We are currently working on error handling and we decided that the backend should return an error code, a general message (...
Christian's user avatar
  • 119
1 vote
0 answers
94 views

Limiting exposed interface for state transitions

Scenario: Given a class with some internal state and methods to manipulate this state, I want to limit the exposed methods that are available to potential clients/users of my API. TLDR: In the ...
sfiss's user avatar
  • 908
1 vote
0 answers
677 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
92 views

Request and response validation

I am currently working on a project using Flask to make REST apis, blablabla. But, working with request validation tools that we use, I am thinking of whether it would be necessary to validate the ...
Damian Akpan's user avatar
1 vote
1 answer
1k views

Securing API with JWT and elevated access using MFA

At my company we have a central auth server running IdentityServer. There are a number of applications providing some API to client applications. API requests are authenticated with JWT tokens issued ...
abdusco's user avatar
  • 119
1 vote
0 answers
131 views

Correct usage of ETags?

Currently my code makes a series of updates to some resource via a REST API but I also have some "rollback" logic that basically updates the resource to its original state before my updates ...
Pepria's user avatar
  • 119
1 vote
0 answers
198 views

Socket.io behind api gateway

So the architecture I am currently working with, we have an api-gateway that gets all the requests and publishes them to our Eventsystem/ or directly to our essential services(auth, etc). Now we want ...
Daniel Hoppe Alvarez's user avatar
1 vote
0 answers
125 views

API Design (RPC - RESTful)

I'm new to API design. I've been reading numerous threads RESTful vs RPC patterns for API design, but I feel like none directly addressed my exact use case, so I just wanted to get a second opinion. ...
NJH's user avatar
  • 11
1 vote
0 answers
76 views

How can I decouple my wrapper API from its underlying SOAP implementation?

In our current architecture, a user has multiple ways they can change an address (as an example). They can do it through an online portal, through our core processor directly, or via a number of apps ...
Brian Chambers's user avatar
1 vote
0 answers
36 views

Standard way to bulk crud image with caption in an API?

I am trying to build a API for doing CRUD on images with their caption. So far I can think of option1: sending the images in form-data as list of images and their corresponding captions in another ...
M.A.K. Simanto's user avatar
1 vote
0 answers
206 views

Removing duplicate code with multiple APIs

I have multiple APIs doing the same thing but the code is copied for each API. The names of fields and formats of certain fields like dates are different between the various APIs, but everything is ...
d368811's user avatar
  • 11
1 vote
0 answers
136 views

What's the most intuitive way to organize a set of endpoints to fetch users and their roles in groups?

What's the most intuitive way to organize a set of endpoints to fetch users and their roles in groups? i.e. Users and their roles in a specified group. Groups a user is in, and their role in each ...
Andrew Cheong's user avatar
1 vote
0 answers
95 views

Assigning default filtering values for complex API request model before passing it to business domain?

I am writing an API (web-service) for my customers and there is an endpoint which allows to search for the documents in my storage (files, folders) by applyingg complex filters. Initially, client ...
Iskander Raimbaev's user avatar
1 vote
0 answers
34 views

API as system controller

I'm developing a system, and I've had a question that might help other people. The system would be written in PHP, with a lot of chance of turning a mobile app later, too. Normally, I would create it ...
Lucius's user avatar
  • 111
1 vote
0 answers
84 views

Spring Boot and Mustache app separation of concerns

I am wondering how best to slice up a Java Mustache web app which has: Data layer (JPA, Repos, Entities, etc) Service layer getting data from other company web services outside the package Web/...
Stefan V.'s user avatar
  • 111
1 vote
0 answers
3k views

What kind of information I should pass through a HTTP Header?

I was trying to find if there is some kind of reference about what type of informations are important to be passed on the HTTP Header. I understand that some information seems natural to be there, ...
Dherik's user avatar
  • 2,466
1 vote
0 answers
931 views

How can I represent my graph schema in a REST interface?

Abstract I'm working on a REST interface to a graph database (Titan/Gremlin-Server, but this shouldn't matter) that has a strong sense of type for vertices and edges. I'd like to design a REST API ...
Louis Thibault's user avatar
1 vote
0 answers
489 views

RestAPI design for exposing RabbitMQ

I'm creating an API to publish and consume message from RabbitMQ. In my current design, the publisher is going to make a POST request. My API will route the POST request to the exchange. In this way, ...
user3344591's user avatar
1 vote
0 answers
77 views

How do I write an API that makes use of many smaller APIs?

I have a solid set of classes that do the following build tables from data and templates advanced form serialization build forms from data and templates launch overlays with forms/wizards short poll ...
Tester232323's user avatar
1 vote
0 answers
95 views

Design API for placing orders with differing parameters

Our customer wants to unify his ordering system, so that all of his end-customers can use one single website to place orders. The planned site will use web services to place the order in one of ...
RobMMurdock's user avatar
  • 1,651
1 vote
0 answers
138 views

Relying on file hash for data synchronisation across mobile and server

Imagine a client-server app that lets user upload images/documents etc. to server and then lets users who have access, retrieve and view them later on their respective mobile devices. So the flow is ...
Mrchief's user avatar
  • 631
1 vote
0 answers
83 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
64 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
0 answers
49 views

Online error reporting without network access

I have developed an application for android requiring no permissions, but the biggest downside of this is that I don't have error reporting. So, I was playing around for the past week with any ...
David Mulder's user avatar
1 vote
1 answer
111 views

JSON APIs in PHP, across the internet

I am building a proof of concept for data processing web service, that allows users to get data cleaned, homogenized or otherwise manipulated. Often users send different types of data in the same ...
Mikkel's user avatar
  • 19
0 votes
2 answers
125 views

Why did IHVs have never extended Direct3D through the facilities of COM on which it is based?

It is well known that Direct3D, unlike OpenGL, was never extensible in itself - a deliberate choice of Microsoft to favor the average user's expectations of predictable behavior and inherent ...
cher-nov's user avatar
  • 101
0 votes
0 answers
106 views

An adaptor layer for Pthread, C11, and C++11 threads compatibility

As my next spare-time project, I'm considering writing a suite of compatibility header and associated library, that eases the transition from Single Unix Specification v4 to v5 and C11/C17 to C2X. C++ ...
DannyNiu's user avatar
  • 257
0 votes
0 answers
161 views

Approach for comprehensive data/activity logging

I would like to be able to build up a log of user activities, capturing data such as who they were, where they logged in from, what activity did they take, and what data did they change (both before ...
David Keaveny's user avatar
0 votes
0 answers
19 views

Feedback on API design of a HalfEdge Data structure

Background Sometimes also referred to as doubly connected edge list, the HalfEdge data structure allows programmers to efficiently and easily modify topological and geometric properties of a mesh. ...
Makogan's user avatar
  • 261
0 votes
0 answers
106 views

How to Handle Undocumented Fields in OpenAPI Schema?

I'm working with an API that uses OpenAPI for its schema documentation. However, there are certain fields in the request body that shouldn't be visible to all consumers, for example, internalProperty: ...
Sergey Kolesnik's user avatar
0 votes
0 answers
49 views

Creating a generic service comprising another service

Currently I have an existing API for my AI Engine, and a python wrapper to interact with the API. So this wrapper acts like a helper class to help format and automate some of the process that is ...
rcs's user avatar
  • 99
0 votes
0 answers
135 views

JWT Cookie and API Gateway

Background I have an authentication microservice that handles the user authentication and returns 2 JWT cookies (access_token and refresh_token). I want to incorporate an API gateway that does the JWS ...
Neil's user avatar
  • 9
0 votes
0 answers
100 views

Translation Server-side vs. Client-side when having the same locales files

I'm currently working on a Turborepo project (monorepo architecture) and I have managed t share my locales files to both back-end and front-end parts. This means I share the exact same keys across ...
Jolan B.'s user avatar
0 votes
0 answers
245 views

Improve return type for CRUD GET list or details objects

When creating the crud GET methods to get a list of items, or the details, what should I return? The whole object properties for both cases? Or just the properties that are necessary? I'm asking this ...
celsomtrindade's user avatar
0 votes
0 answers
71 views

Decoupling a Configuration API in an Embedded Framework

In my embedded project I am designing a framework that allows the user to create widgets at compile time. All widgets must provide the same base functionality. Further, there are multiple widget ...
nowhere_'s user avatar
0 votes
0 answers
142 views

Permissive vs Strict API

This question is similar to Permissive vs. Strict API Message validation. One difference is that we're using Protobuf. A colleague and I are discussing standard message types for names. One ...
Noel Yap's user avatar
  • 171
0 votes
0 answers
120 views

How to handle Authorized & Non-Authorized Routes in Microservices with Tokens

Context Suppose there is a e-commerce microservice architecture with the format: In summary, a client will contact the Auth Service / Identity Service to receive a token. It passes the token to the ...
Gianluca Fuoco's user avatar
0 votes
0 answers
69 views

What is the best way to design endpoints for a restful application?

I am a backend developer and I am writing a restful application. I have a question about how best to design the endpoints. I have a database table that stores values (I just provided an example) |id (...
RoyalGoose's user avatar