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
1
vote
1answer
81 views

What do you call the combination of endpoint and HTTP method in a REST API?

Let's use the Twitter API as an example. My understanding is that we refer to /statuses/update as an endpoint and we refer to POST as a HTTP method. So what would term do you use to refer to the pair ...
0
votes
1answer
92 views

What would be a good way to obtain route-specific CSRF tokens for an API?

Recently I have started rewriting my Rails app to Roda, and encountered a hiccup. While Rails uses a single CSRF token for the entire application (and stores it in a meta tag), Roda recommends using ...
-4
votes
0answers
29 views

What would bea good algorithim for calling multipl APIs?

I have an object where I have one method API call on, it is a get request and I have a library I imported in python so I can easily call this API from my client. I am now trying to call another API ...
1
vote
2answers
90 views

Is it reasonable to ask API consumer (client) to provide sync response to notification/callback?

We have an API platform which allows user to create and manage a certain type resource. Client is expected to provide a callback url where our server will send notification to when the resource is ...
0
votes
1answer
42 views

Using external APIs to build a dashboard

I have a website that is based around some external APIs related to a certain theme. It combines data of responses from multiple APIs before returning to the frontend. With that said, my server side ...
3
votes
3answers
249 views

Why not use SQL to query an API instead of GraphQL?

nalzok posted an interesting question over a year ago: "Why not use SQL instead of GraphQL?". Respondents seem to suggest three main problems: One should not directly expose one's database ...
38
votes
1answer
3k views

How to design a REST API that can “prompt” the client about long-running operations?

Say you were to develop a REST API that provides access to a set of complex, long-running, operations. The typical paradigm for an API like this (as I understand it) usually involves (the client) ...
-5
votes
1answer
76 views

Giving a fixed project price when REST is involved

Whenever I am asked to give a quote for a project that involves a remote REST API, I become very cautious. Most of the REST API's I worked with had a documentation, but it usually turned out to be ...
0
votes
1answer
76 views

Is it an anti-pattern on React to search for children with a specific element type?

Context When designing the API of a React component, you may decide to receive props in a more semantical way. Here's a simple example <Modal headerTitle="foo" /> vs <Modal> &...
1
vote
1answer
87 views

What are ways to manage secrets in a big organisation?

Many articles on the internet focus on methods to keep secrets outside public-access (like mobile apps, website frontend etc). But let's take the example of a really big organisation. It has secrets ...
0
votes
0answers
40 views

Paging changing list of API results

Problem I'm currently building a service (think of it like Reddit) which allows users to post and comment. It's possible to search for posts within a given radius of your location (e.g. 10km). When ...
1
vote
1answer
76 views

What are the different messaging patterns for multiple producers to single consumer through a distributed queue?

We have multiple producers that publish messages to the same SQS queue. We have a single consumer that processes the messages. The producers do not care about the response. It is more like a broadcast ...
-1
votes
3answers
142 views

Open-sourcing applications with API keys

Consider a desktop application that interacts with a web API, for which it needs a key. How should API keys be handled? Configuration files come to mind, however it doesn't seem that simple when terms ...
0
votes
0answers
19 views

Apache Spark as web api

I try to validate an arhitecture like below, but I'm not sure if is the right way. What I have here: A web application which have an Excel Module (import/export files, csv, xlsx) and display them in ...
0
votes
0answers
24 views

How to structure/design a webapp using a large number of APIs

I am writing a webapp that aggregates a multitude of different APIs to gather data related to astronomy, and then returns the aggregated data in a single API endpoint. There are 7 API's being used, ...
1
vote
0answers
61 views

Asynchronous communication with legacy system

Background My task is to create new system (X) for realtime work tracking for internal use. You should think it like an app that you have opened on a separate monitor/ on phone all day and you are ...
-3
votes
2answers
49 views

How should I handle a scalability problem during routing my requests from server?

I have faced a problem with the initial design of my system where sensitive information was being sent to the front-end and front-end was responsible for calling 3rd party APIs. As you have probably ...
-4
votes
1answer
61 views

Which API building practice is better?

Im working on a ERP product, In which backend logics are to be APIs. Right now I have around 80 Tables. Proposal 1: Creating CRUD APIs for all tables and manipulation of data to be handled in front ...
1
vote
2answers
65 views

Authenticating requests from third party users to our APIs

We have a web app which has certain APIs. Users of our webapp will use these APIs when they login to our webapp (like how many records me as a user do I own, user specific, etc). We are creating ...
-2
votes
2answers
61 views

Is it okay to keep open the MySQL database connection open through out the Application or open and close connection query-wise?

I'm developing a REST API using Nodejs along with MySQL as the database.Is it okay to keep open the MySQL database connection open through out the Application or open and close connection query-wise ? ...
0
votes
1answer
56 views

RESTful Response when the POST request results in the creation of different kind of resources?

I have been working on designing an API that lets client create a product (think of product as something like website domain, something that comes into existence when client makes order for it to the ...
1
vote
0answers
18 views

Design REST API for Mobile Apps with Unregister Users

I'd like to know some best practices on how to build rest API for a backend which shall communicate with a mobile app by anonymous users. This is the scenario with details: I'm building a demo library ...
0
votes
1answer
32 views

Photo Library Service: What should be right way of photo library using AWS S3 and Java

I want to make a service that is supposed to upload Photos in S3 and make them available using a link. I have few design plans for my service. PLAN 1: Upload photo to my REST API which will update ...
0
votes
0answers
135 views

Adaptive/split server API - what's a good way to design it?

I'll try to describe the scenario using a Turn-based game (such as card game or somethin'), where Game is the server, and the actual player is a client. (hence using Client-Server architecture), I'm ...
1
vote
1answer
47 views

Designing API to model existing Excel “stateful” application

I currently maintain an Excel file that has ~20 inputs which is used to modify thousands of simulations. What I'd like to do is expose the inputs as API endpoints for both analytical developers and ...
4
votes
4answers
213 views

How to describe a function argument that is used as a hint/best-effort?

Say I have a server exposing an api that let me retrieve 'things', there are a lot of things, and as such retrieving all things at once could take down the server, hence the exposed API returns ...
0
votes
2answers
40 views

API versioning at BackEnd - Declare the versioning(v1) at global level or at each controller/method level?

If I keep versioning at the global level then it would save the clutter at each controller level, // main.js main() { registerGlobalRoutesPrefix("/api/v1"); } // controller1.js @Route("controller1-...
0
votes
0answers
35 views

Using a message queue or pub / sub solution for connecting frontend to backend instead of REST APIs

I own a dell r620 server at home and want to make more use of it. Typically its my staging environment as my internet is currently ipv6 with dslite so I can’t port forward. But I can easily call and ...
1
vote
2answers
90 views

Best way for resource (entity) relations loading in a REST API

We have a problem of load time in our REST API, which is the result of having Fat DTO (nested DTO s) & the N+1 problem (which is off my question), means that we are loading too much data in one ...
0
votes
3answers
67 views

How to control time with API testing?

I'm trying to test an API (see API testing). Some operations depend on time. Here are some examples: A post may only be edited within the first 5 minutes You may not try to login more than 10 times ...
2
votes
2answers
71 views

Should API tests depend on each other?

I have an API I wrote that I want to test at the API level. Given that I'm testing from an external point of view, how can I manage data sets for each tests? The simplest solution I could come up ...
0
votes
0answers
27 views

Designing a public facing Java interface for future extensibility (API evolution)

I develop an in-house Java framework. I provide an interface so that my end users can provide their own custom implementation (i.e. plugin/SPI). public interface SomePlugin { SomeResponse ...
-2
votes
2answers
29 views

Interconnected technique for web, mobile and desktop

I am planning to do the university project with the Desktop application + web application + mobile application, I have planned to use languages for these 3 as below: Desktop application: Java SE Web ...
-4
votes
1answer
93 views

Does it makes sense to implement a REST API for every app?

Is it mandatory to implement a REST API even if it doesn't make sense? I have created an app consuming REST services from other apps. Now that I have the final result, I wonder if it is needed to ...
2
votes
1answer
85 views

How do I send data to HTML page only when a POST endpoint is hit?

I've looked through similar questions and tried to Google what I'm trying to do, but I haven't found anything concrete. What I'm trying to do: where I work, we use an HMI/SCADA system that displays ...
42
votes
8answers
8k views

Is it common practice to validate responses from 3rd party APIs?

I'm working on a PHP web application that depends on a few 3rd-party services. These services are well documented and provided by fairly large organisations. I feel paranoid when working with ...
0
votes
1answer
54 views

Maintaining Objects Across API Deployment Instances

I am working on a web application as a hobby and trying to learn some concepts related to cloud development and distributed applications. I am currently targeting an AWS EC2 instance as a deployment ...
-2
votes
6answers
194 views

Why don't packages formally specify (and repositories verify) their contracts

So, most software depends upon third-party libraries, to some extent or another. Specifications of such libraries' behaviour usually takes the form of human-readable documentation. We write ...
0
votes
0answers
70 views

Content-based reverse proxy for single tenant architecture?

I'm building a SaaS application with a single tenant architecture in Google Cloud. Each tenant has its own instance with its own subdomain (e.g., client1.myapp.com). I interact with some third-party ...
3
votes
1answer
218 views

How to handle failed API calls in C#

I built my API service and now I want to consume the information from a WPF application. So far I created the class ApiHelper which initializes and provides the HttpClient used to call the API ...
0
votes
2answers
75 views

How can I protect sensitive information inside a binary?

I am currently developing an application with Qt/C++ which needs to access a Shopify store using the Admin API. In order to access the API, my application needs to know the following information: API ...
0
votes
1answer
33 views

API Split for creating object with inheritance and behaviors

I have a web service which is exposed to UI owned by our team. This web service is responsible for creation of objects and saving it in the DB (NoSQL Database). The object being created has multiple ...
-2
votes
3answers
63 views

Is there a secure way to ensure a data in an API endpoint of mine came from an Instagram endpoint?

Is there a way through encryption/keys/jwt or anything else to ensure that the data being sent through a POST request is only data coming from another request I made on the client to a 3rd party ...
-3
votes
1answer
35 views

How to manage source data for movies and series?

I am trying to build a system that tells the user on which platforms (like Netflix, prime, etc.) a movie or series is available. What is the best way to go about it? I have considered the following: ...
1
vote
1answer
80 views

Persistence layer in the automated testing of an API

The automated tests of an API should be stable and simple. When writing automated tests for an API, we often have to check that the data created with a program implementing this API is persistent. If ...
-4
votes
1answer
15 views

Components dependency check

Lets say you have 2 docker stacks: stack-A.yml defines serviceA and stack-B.yml defines serviceB; you also have an archive of common data that will be mounted by services. How could I verify that ...
-2
votes
1answer
57 views

Design pattern for a switching between APIs with no code changes

I'm trying implement in JavaScript/Node.js a data upload functionality. I want to be able to switch between different storage providers, e.g. AWS, GCP, Azure, with no code change, for instance, via ...
0
votes
0answers
16 views

Testing Proxy with its service

I have a program that contains client and api logic. In summary client works like this: 1) Client handles client code 2) Calling the API is surrounded in (lets call it ) ClientService 3) if client ...
0
votes
0answers
18 views

Cloning API changing from multiple subdomains to single

I'm working to clone an API endpoint set with a twist I can't figure out. The API currently works via POST requests sent to companyName.example.com with an API key. I'd like to have all different ...
0
votes
2answers
77 views

How sensible is it to build a website/app etc. using an external api?

Wanting to expand my programming horizons I recently started building a website. I have started to build up my website and it is heavily focused around an external api. The reason for using this api ...

1
2 3 4 5
22