Questions tagged [api]
An application programming interface (API) is the specification for which software is meant to be used by other software.
1,318 questions
1
vote
1
answer
124
views
Should pagination metadata like totalCount be included in the ETag for cached paginated API responses?
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 ...
1
vote
1
answer
240
views
Can I get Open Graph Protocol data without behaving as a web scraper?
In general, to get Open Graph protocol (OGP) data for a given web page, one would need to retrieve the actual HTML, and then extract the meta tags from it.
However, this has two problems:
Instead of ...
2
votes
2
answers
124
views
How to deal with a poorly documented AWS SQS feed for a security product API?
I’m integrating with the Ajax Enterprise API which exposes an AWS SQS feed for device events and notifications. The API documentation is here: Ajax Enterprise API Docs.
Each SQS message supplies an ...
1
vote
2
answers
260
views
API supporting multiple authentication providers?
I am currently looking at building an API server that will support multiple authentication providers (Google, GitHub, Keycloak, etc) and I am trying to work out what’s a good way to go about it. Two ...
3
votes
2
answers
394
views
What is a good approach to sync remote API data to a database?
Problem statement
We have a remote API that can be queried to fetch some arbitrary objects (we're expecting around 500 thousand records). Our application needs fast access to this data (faster than ...
1
vote
5
answers
411
views
Conventions and separation of concerns for controllers
I am currently working on a project using .NET APIs and have a few questions regarding controller design. Specifically, I have separate controllers for users and orders, and I am considering the best ...
0
votes
0
answers
91
views
Disable tenants in multi tenant SaaS app
I am building an app where I have tenants and each tenant can have multiple users. The users can do multiple things in the application and these functionalities also are kind of independent from each ...
2
votes
3
answers
2k
views
How to design for API use cases that need different data from the same table?
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 ...
2
votes
1
answer
288
views
Designing a Role-Based Permission System for FastAPI: Integer Roles vs Database Roles?
Problem:
I am building a FastAPI based API and need to design a role-based permission system for authorization. Users can have one of three roles: Admin, Developer, and Operator. These roles are ...
-1
votes
1
answer
80
views
Why would SMHI's weather API have this scaling for cloud coverage?
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 ...
0
votes
1
answer
126
views
OpenAPI - `v0.x.x` as a way to denote unstability
In OpenAPI, is there a convention for denoting that your API is not stable yet?
In semantic versioning, the v0.x.x version number is usually used to indicate that the project is not stable yet. ...
0
votes
2
answers
158
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 ...
7
votes
4
answers
2k
views
How to maintain consistency when retrieving partial vs. full data in an API Resource
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 ...
-1
votes
2
answers
390
views
When is it okay to check and update state within a GET request
I have the following scenario:
We have a grid that allows the creation of reports. Report creation is asynchronous and happens in the background on worker nodes.
When a report is in the process of ...
-3
votes
1
answer
142
views
Mock an API for development purpose (no testing)
If I want to implement a connection from my software to an API, which is documented but not accessible yet, what is a common way to imitate the API until it is available?
My first idea was to mock the ...