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
1answer
28 views

Fire aws lambda at a specific time

Let's say I have a booking system where I want to fire an aws lambda function to send an email or message to users, 10 minutes before their booking starts. I have looked online and found few solutions....
-1
votes
1answer
100 views

Should an API be designed so that all information needed is returned in one request?

I'm currently designing my first API and I had a question: Should an API return all information about an object and its foreign keys? To explain the above a bit better, this is a part of the ...
0
votes
1answer
84 views

Microservice Architecture auth design

As a learning exercise I want to develop a system using microservices. I have designed my authentication/authorization architecture and would like to know if there are drawbacks to my design. It is ...
0
votes
2answers
147 views

Microservices based API, how to handle long lists requests

I was planing to create an API based on microservices, I'm stuck on how to solve a specific scenario. Initial plan is, all microservices are only accessible through a REST API. Based on the next ...
-1
votes
2answers
59 views

Http status and reponse in case the API gives out partial response

I have an API whose job is to aggregate resources obtained by calling multiple other APIs and then give out the aggregated response to the client. Currently even if one or more dependent API calls ...
0
votes
0answers
27 views

Proper way to use oauth with external auth server and an api

I have an api server that relies on an auth server (both owned by the same company). Once the client gets a grant from the auth server, it is no longer needed, because the only information I need from ...
0
votes
1answer
102 views

Where is the distinction between a web application and an API?

This question is highly related to this over question. I'm asking another question between I still am a bit confused on the topic. The Issue I Ran Into I currently have a Django web application ...
-2
votes
1answer
118 views

How should I design my API responses?

I'm working in a rest API for a turned based game from scratch, and I'm having some troubles figuring out the best architecture to do it. I need to explain how the game works and what is my ...
2
votes
2answers
135 views

Combining PUT and POST on the same resource

I have the resource OrderRequest which I guess can be qualified as process. The OrderRequest can be create of update. The create should be idempotent, because creating the same order request 2 times ...
10
votes
3answers
461 views

API endpoint POST vs GET

Help me settle an internal question. We have an endpoint which we all agree should be a GET, because all it's doing is calling a stored proc and returning a set of data. However, there is a set of ...
1
vote
1answer
41 views

Determining the service calls within the API based on the each consumer request

Currently, I have a rest API service which serves to many different consumers. One of the endpoints of API is for retrieving an order. Inside a single application, I am making 5 different service ...
-2
votes
1answer
26 views

Azure web service api usage per user insights

We have a API (written in .NET Core 3.1), published to Azure Web Services. This API talks to a database for authentication. After a succesfull authentication, the API connects to other databases, ...
1
vote
1answer
19 views

Identity Server 4 Authentication - Security questions around using the same API for internal application and third parties

So, I have an API that authenticates with Identity Server OAuth2 and gives our user a JWT token when logging in through a front end application, this is a token that has access to everything. The API ...
2
votes
3answers
107 views

How should an API handle timezone related data?

I have data in my database in UTC time format in this format (pseudo): [ { "date": "Date: 2020-02-12T08:00:00+0000" "productsSold": { 0: 122, 1: 130, 2: 90, ......
1
vote
1answer
110 views

Mocking APIs: Keeping mock data up to date?

I'm setting up a development environment for my application. As such, to run it locally, the API dependencies need to be mocked, to keep it as lightweight as possible. The problem however is keeping ...
1
vote
1answer
61 views

REST: Seperate API endpoints for user images and all images?

I'm designing an API for a website where users can share images and all other users can see these images. The current idea is to have a path /user/name/images/xyz to GET a user's image and then a ...
1
vote
0answers
32 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 ...
1
vote
2answers
91 views

JSON:API - I don't think I have an `id` or `type` to return

I'm building a Restful API and trying to use JSON:API format for my response. Looking at https://jsonapi.org/format/, it states: A resource object MUST contain at least the following top-level ...
2
votes
2answers
144 views

Should an API return calculated values that the consumer can calculate themselves?

Say an API returns the following pieces of data: daily_price number_of_days total_price Assume that the API will always have the number_of_days and at least daily_price or total_price. In cases ...
0
votes
1answer
67 views

GET Parameters in Restful API

I'm in the starting phases of designing an API. I'd like it to be Restful and comply with what's commonly considered best practices. One of my resources need to accept several query string parameters....
1
vote
1answer
61 views

What are the limitations of WinSock2 sockets within threads?

So I've run into some strange behavior on an application i'm developing in C using the windows API. Im trying to implement a closed connection server-client interface. However, for whatever reason ...
1
vote
1answer
68 views

Should a REST API be used when a websocket is already open?

Background: I was working on a web-socket application integrated into a more conventional http request based website that uses REST APIs. Task: I need to retrieve user history from the database for ...
1
vote
1answer
550 views

Microservices and 3rd party APIs

I recently joined a team who is trying to use "microservice" pattern for their new application. They've already started to implement API's. In the end it should be an API for both mobile and web UI. I ...
1
vote
5answers
292 views

REST API Design - Reordering Collections

Imagine that I have a system to manage sports teams. Let's not make it specific to a particular sport, but consider that each team consists of a number of players. Therefore, I might have an ...
-2
votes
1answer
88 views

Centralized REST API call management?

I was given a solution with many projects. Multiple projects call multiple REST APIs. These calls are scattered around the spaghetti code. Trying to figure out what calls are done in what sequence ...
-2
votes
2answers
40 views

How to add business customer customization in our API and

We sell a fleet management solution: it includes a mobile application, a web application and a set of APIs. Technically the APIs and the web application are developed in C # .net (asp.net mvc and asp....
1
vote
0answers
80 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 ...
0
votes
0answers
42 views

CSRF-Token for API consumed by multiple applications

We've got an web API which is consumable by different applications we've made. Some endpoints will be used by a web application which is partially protected by using CSRF-Token which are created for ...
0
votes
0answers
40 views

Creating a webhook server / sender

I'm now working with an API project, where I'm developing new API endpoints and the final result at the end of the life cycle is as follows: a client should receive updated data out of what it sent to ...
0
votes
3answers
173 views

How to calculate the costs for an on-prem API request in terms of money?

My manager asked me how much it costs (in money, currency, $) to make a REST API request from our client application to one of our services. We do not use cloud, we have on-prem servers. The payload ...
2
votes
2answers
193 views

Where should I catch exceptions

I'm developing an application that has a backend (Java, Spring) and a frontend (TypeScript, Angular). The backend application provides with an OpenAPI-compatible API and performs certain operations ...
-2
votes
2answers
163 views

Should you use PUT or POST when an authenticated user is trying to update their own settings?

An example of my API is mydomain.com/v1/update-profile So the user is authenticated and wants to update some stuff in their profile. Should we design the API to expect a POST or a PUT HTTP Method? ...
2
votes
2answers
362 views

Data from one microservice to another

How does one service get the data from another service? I will give few examples: 1) Let's say we have two services which need to share the data: User Service and Order Service. Order Service pretty ...
2
votes
4answers
219 views

Is having different implementations for ToString and the implicit operator bad design?

I am currently developing a wrapper API for a translation service that should provide multiple methods for translating strings, Task<string> ITranslator.TranslateAsync(string phrase, Language ...
3
votes
4answers
183 views

How to model correctly a non persistent action via REST API

Hi I have a Order this order needs to be sent to an order system. There are several oprations that can be performed. Create Modify Check-Modification (this happens on existing order) Simulate ...
0
votes
1answer
28 views

API Request/Response Model for showing differences in JSON objects

I am writing an API to merge two different JSON Objects. Both of these objects can have same as well different number of properties. Object 1 : { "name": "Sam", "lastName": "Hanks", "...
0
votes
1answer
93 views

Should REST API rate limiting specifics be told to the caller?

I have an REST API, which has a rate limit of 1 query per IP per 5 seconds. When the user tries to call the API too often, I respond with the HTTP status code 429 Too Many Requests and a JSON message. ...
-3
votes
1answer
84 views

Backend with many services

I'm mostly a Front-end Developer. One day I heard about such a thing at work like "authentication service", "registration service" and it turned out our product's backend has many services running ...
-3
votes
4answers
77 views

Should Product Requirements reflect vendors' APIs capabilities and limitations?

I have a question about the responsibilities of the Scrum Product Owner and the Scrum Engineer/Architect. It is said that in Scrum the Product Requirements (PRD) specify the "what", but not the "how"....
2
votes
3answers
127 views

Rest application header based vs path based service routing

i have a rest API that is a front end to a more complex SOAP based service. The soap based service uses extended(custom) WSA-addressing headers in order to perform its routing. The extension of the ...
1
vote
0answers
39 views

Angular integration with back-end

We're developing a big project for our company, and they asked us to use Angular even though none of the devs have any considerable experience with it. The back-end is C#/.NET Core with ABP. My ...
1
vote
1answer
82 views

C# class design for clear API wrapper

We are creating an office application in C#. Originally, the persistent data like customer details, orders, agenda, statistics, etc. were stored in a local SqlServer database on a server. The ...
0
votes
2answers
117 views

Call API endpoint from API itself

I'm creating an .NET Core 3 API with Entity Framework. The data is from an existing database. Now I've the following situation: /persons -- get all the persons /companies -- get all the companies /...
0
votes
1answer
52 views

Is it permissible to have relationships to parents of parents for JSON:API resources?

I have the following hierarchy: venue -> concert -> booking And within booking I have a relationship for the concert. But should the booking also have a relationship to the venue? Or is it bad ...
3
votes
3answers
238 views

How do I write user stories for system internal requirements?

Some requirements of a system are for the system itself, or for the developers, how do I write user stories for this? For example, there are requirements for a system to: provide APIs so that ...
0
votes
1answer
36 views

Appropriates names for Api implementation and Api Client Library

Suppose I have a big project, called Northwind. It's a website in front of a database. Now management want me to create a public API for this. I create a new ASP.NET Core project called Northwind.Api ...
1
vote
2answers
71 views

Which REST API url structure should I take?

I am wondering which API url scheme should I use. I am designing multi-site project so that the URL can looks like: [GET] /website/1 [GET] /website/1/category [GET] /website/1/product Which is life ...
1
vote
0answers
11 views

Hypertext Application Language grouping items in a collection

For the purposes of this question I can use an example document straight from the HAL spec, since my problem is very similar: { "_links": { "self": { "href": "/orders" }, "next": { ...
0
votes
0answers
38 views

Real-time ASR with Google API

I have a general question about the implementation of the ASR (automatic speech recognition) API of Google or a similar company. We need to create clients (desktop applications) that send the ...
0
votes
0answers
27 views

Error code handling between Oracle Database and Microservice API

I'm using Oracle Database and .Net Core API for my project. What is the best way / best practice of handling errors between Database and API? What I'm thinking is, I'll return only custom error ...

1
2
3 4 5
22