Questions tagged [api-design]
API design is the process of determining and exposing a set of consistent method signatures, return values, and documentation intended for use by other developers to allow programmatic access to data.
api-design
2,273
questions
1
vote
1
answer
27
views
restful sub-object best practices for GET method
I'm facing with a frequent restful api design issue, and i'm not sure about what to do. Actually i can't find any best practice/clue to know how to proceed...
for GET routes, for example, I have :
api/...
1
vote
1
answer
27
views
Handling Multiple Actors in a Use Case in Clean Architecture and DDD
I am doing an API for a blog site using Clean Architecture and DDD. I find myself doing a use case to get all comments for a requested article. The thing is that anonymous users can see the comments ...
0
votes
0
answers
8
views
XMLHttpRequest cannot load http://localhost:8800/api/proxy due to access control checks
I've been working on accessing an API through an API proxy and got it to work great on a Windows, but when I try it on a Mac environment, it stops working. Currently building for an Excel Plugin.
...
2
votes
0
answers
92
views
What is the purpose of returning bool from this init function
I was looking at the code from driverlib that TI delivers for his MSP430 devices and some surprise and questions arose to me. To make the point clear let's take the init function for the ADC(the same ...
0
votes
0
answers
38
views
WSO2 APIM 4.1.0 API Editing existing resources and authentication Schemes (Enable Seurity) is not working after deploying a new revision
WSO2 API Server : 4.1.0
I have initially imported the API definitions of version 1.0 having security disabled for some of the API resources. And the clients can successfully connected to version 1.0 ...
0
votes
1
answer
23
views
What is the idiomatic way to accept arguments to a function that may be mutually exclusive?
I'm building a small library that exposes a function:
await printLib({optionsObj})
Currently, the options parameter is an object with different (optional) properties.
A?: <boolean>
B?: <...
0
votes
1
answer
31
views
Forwarding requests to different verticle based on path param (Vert.x)
I'm using Vert.x for the first time ever to try to build an API in Java. Right now I can use an eventBus in my main verticle to forward certain routes like /example/:name etc to a handler that sends ...
0
votes
2
answers
73
views
Is an API deprecation warning considered an unbreakable contract? [closed]
I have an API that is about to move between MAJOR versions—from v1.x.y to v2.0.0. It is following semver (though I don't think that really matters).
In version 1.x.y, I have several public constants ...
0
votes
0
answers
12
views
Should a non-form field whose value depends on another form field in some scenarios be set in API backend using logic or be sent from UI to API?
Let's say I have a field as a dropdown on my UI form (POST). If user selects a specific value of fruit, then a different field related to the whole object entity should also get set with a predefined ...
0
votes
1
answer
35
views
How to properly return multiple errors from multiple functions in the main function?
I have here a function for an endpoint where I create a customer. It goes like this:
public function createCustomer (Request $request){
// Store customer's basic information ...
$customer = $...
1
vote
0
answers
15
views
GraphQL query permissions with federated schema from different GraphQL microservices
I'm reading about schema stitching/federation and came across the example in the link:
extend type Reservation @key(fields: "id") {
id: ID! @external
userId: ID! @external
user: User @...
0
votes
0
answers
40
views
REST API CRUD Operations design for a complex resource
I have a requirement to create a REST API for managing a Connections resource. Connections can be of different types like HTTP, Database, SOAP etc. I am using abstractions and inheritance in OpenAPI ...
0
votes
1
answer
41
views
Adding new utterances to specific Intents in Dialogflow Agent
The questions is quite simple, I have developed an agent in Dialogflow-es, it has been trained with N intents and M utterances by intent.
Now, I want to automate the training process, or part of it, ...
0
votes
0
answers
65
views
In a microservice architecture, where to define and how to propagate enum definitions
We don't know where to implement a certain enum and how to propagate it throught our services, that need it. We need this enum "SampleType" in two of our microservices (for now). Our ...
0
votes
0
answers
28
views
How many API transactions a year is an acceptable limit?
I have been told that an application we are working with cannot integrate with another application by polling for information every 5 minutes as they have a 'transaction limit' of 100,000 a year.
I am ...