An application programming interface (API) is the specification for which software is meant to be used by other software.

learn more… | top users | synonyms

1
vote
2answers
50 views

Evolving an interface that is not supposed to be implemented by the client

I'm about to write a Java library. Basically, this library provides something like this to its user: interface Foo { void doA(); boolean aWorked(); void doB(int value); } The user is not ...
0
votes
0answers
12 views

B2B API Appropriate level of authorization

We are in the beginning phases of an effort to expose our data via API to our business partners. There is a discussion going on about how to best authorize use of the API. Specifically, do we ...
-2
votes
0answers
46 views

What are people doing in terms of adding Swift support to Objective-C APIs [on hold]

I have a couple of APIs (via frameworks) that I've developed and use. They are written in Objective-C and I've added Swift to them. One I've just added Swift code to deal with any parts of the API ...
-4
votes
0answers
21 views

What could cause data to be received by XBee when writing data from coordinator XBee?

I'm working on a project with a sensor connected to an arduino which sends the data from an end device XBee S1 in API mode to a coordinator XBee and handles the data in Visual Studio using C#. The ...
-1
votes
0answers
38 views

Lazy loading (Paging) data from external API

I am writing a mobile app and I am currently making design decisions about fetching data from the server. Description: A single data item fetched from the server can be seen as an object with ...
1
vote
1answer
60 views

How to consume external RESTful API with Symfony?

We are building a Microservice architecture for our projects, with mostly front-end Symfony applications interacting with back-end RESTful APIs. The problem is this approach is breaking the Symfony ...
0
votes
1answer
35 views

Can one use the Google Maps API to nest polygons and navigate by them?

Google Maps API lets one use polygons to create shapes on a map. What I wish to do is nest these polygons, and use them to describe data which can then be used for navigation. Let's say that the ...
3
votes
1answer
81 views

Efficiently consuming a rate-limited service

So my exact case is that I have ~1400 domains on an ancient, self-hosted bind server and I'm looking to migrate them to a hosted service. The trouble is that the hosted service's API has a rate limit ...
0
votes
1answer
67 views

How to handle JWT expiry in Laravel 5.3?

I am developing a mobile application back-end service using Laravel 5.3. I am following the REST API. The application has payment gateway integration and it needs more security. I followed JWT auth ...
0
votes
0answers
16 views

How should I structure an iPhone based offline Cache for OData?

I have an OData web service that I need to create an offline cache API for. This class will be leveraged by an offline-capable mobile client (iOS/Android/HTML5). One option would be a class that ...
0
votes
1answer
23 views

REST API crossresource operations structure

I'm wondering what's best practice in next use case: I'have a view that displays data for 3 resources User, Company, and CompanyType (chosen in select, can be added dinamicaly so it's not enum). What ...
0
votes
1answer
39 views

What is a good REST convention for the structure of a response that is just a container of two (or more) unrelated entities

Let's say I have the following entities that can be accessed at the following URIs (using the standard pluralization): /things/:id and /otherthings/:id I want to expose for performance reasons, an ...
1
vote
2answers
205 views

Fully API-based website - is it a good idea?

I sometimes hear about making web-site fully API based, meaning that even in browser the page is constructed based on API endpoint and practically nothing else. One of the benefits I see in this is ...
4
votes
5answers
139 views

Should a method that simply delegates to a constructor be created?

For example, if I have a method public void method(Pair<String, Object> pair){ ... } Should I create the method public void method(String str, Object obj){ this.method(new Pair<>(...
0
votes
0answers
53 views

When splitting a Node.JS server between model and controllers, who should tranform the data for the database to understand?

I have a node.js server for an API that is split between controllers and models (there is a router which is autopopulated on runtime). So for example here is a classic end point for fetching config ...
-1
votes
0answers
11 views

Application Data Changes while API automation

My application Data is changing while API automation In API i'm Creating my own users in My application and modifying those users only But while automating my scripts the stored users data is getting ...
1
vote
2answers
38 views

Internal API - Some larger generic methods, or many very specific methods

I'm building a web API that is going to be consumed by several internal systems. Naturally the different systems have different requirements. The consumers may create change requests to the API, when ...
0
votes
2answers
71 views

validation error responses in REST API

I'm designing a RESTful API and wondering what's the best format for validation error messages. For example, my account creation endpoint accepts a JSON object: user: { first_name: string, ...
1
vote
5answers
207 views

Should a client check for valid parameters?

I'm writing a Java client library for a simple API service and I was wondering how much should I be strict for invalid values. For example for an endpoint a parameter should not exceed a certain ...
2
votes
3answers
77 views

Which REST API URI should be used for querying a relation to a single model object?

I am developing a REST API for a user management service (being used by other micro services). My model contains the types User and Server among others. Server to User relation is many-to-one (each ...
1
vote
2answers
87 views

Single Web API endpoint for all entities, good or bad?

Situation We are currently developing a large web application (Web API 2) - several entities and thus require several endpoints for each. But suddenly, they changed to "one endpoint fits all" ...
2
votes
2answers
84 views

Testing an external API that's in beta state

Our company is using an external API that is actually in beta state. This means it's not stable at all yet, and it changes its requests/responses every week or so. I'd like to write test to ensure ...
1
vote
0answers
40 views

AJAX request vs redirection during long API calls

Let's consider this scenario, I have a form, I need to post this to the backend and use data from this form to perform multiple webservice API calls. These API calls could be payment processing calls ...
1
vote
2answers
179 views

Why is it CRUD instead of GRAS? [closed]

Why is it Create Read Update Delete instead of Get Remove Add Set ? I've been working with an API that uses ADD and SET and REMOVE. Most accessor functions are named get...() and set...(). I ...
5
votes
2answers
120 views

Good practice for status code returned by restfull API when validating a token

I am working on client JavaScript SPA and a restful API on HTTPS. Client application needs to call a public endpoint (no token required) in order to valid (GET) a specific TOKEN previously remember ...
0
votes
1answer
78 views

RESTful API conventions

I have an API that generates a resource randomly when requested. What path could I use that would follow REST conventions? A - /generate/random.png B - /generators/random C - ? Should I place all my ...
1
vote
0answers
27 views

How to handle an api with severe technical debt? [duplicate]

Our company uses another companys api. This api is written using IBM domino. This api is horrifically inconsistent and outdated. E.g. sometimes returning JSON, sometimes html. Inconsistent naming and ...
0
votes
1answer
78 views

External Reasons an API call might fail?

I'm currently in the process of developing my first API. This is a private api that will send information back and forth between my two sites, not one that will be open to the public. I'm working on ...
0
votes
0answers
32 views

Web, REST, SOAP, etc., API dependency discovery

I am not sure what the correct terminology is as I have not seen this topic discussed in any articles. Often to call an API one must find the number of parameters from another API/service etc. My ...
0
votes
1answer
69 views

Need my mobile application to connect my website, will this method be better than using an API?

I want my mobile app to connect to my website to get/post data from and to the database, respectively. I was looking up RESTful APIs (which I don't really understand how the file writing and ...
1
vote
3answers
127 views

Handle backward compatibility on API changes

I have an API which allows me to communication with a device. The communication protocol is stored in a JSON file. It list the events that the device can raise, the functions, the frames format, etc. ...
1
vote
1answer
119 views

Securing a private API

I have two sites and an API that sends data back and forth between the two. The API is only used on the back end, and the user will not interact with it at all. What I would like to do is ensure that ...
0
votes
0answers
70 views

URL API design considerations and REST action

We have a cart and cart has line items, now line items can be products, discount coupons, rewards and promotions. I am looking for some inputs in design consideration here. The backend is in Ruby on ...
0
votes
1answer
81 views

API Response codes standardization (Best practices)

I want to create generic response codes, for an API that I am developing. Now I know there are HTTP response codes that are usually recommended to be used, but my API will be handling multiple USSD ...
55
votes
7answers
5k views

What HTTP status code to return if multiple actions finish with different statuses?

I am building an API where the user can ask the server to perform multiple actions in one HTTP request. The result is returned as a JSON array, with one entry per action. Each of these actions might ...
0
votes
2answers
126 views

Decision that drives use of a Front Technology like Javascript for server side tasks

I have created a Project in Java which helps generate HTML's from an Excel Sheet & a template file. I am trying to understand, if I want external users to use this facility from an external ...
1
vote
1answer
44 views

Batch Rollback best practice

Context: We have 2 servers (internal and external) that have to hold identical data and remain in sync the entire time. Our internal system is like a local cache and we allow read/writes to the data ...
0
votes
2answers
78 views

Secure REST APIs

I am building Rest APIs for iPhone aap in PHP framework Codeigniter. Please let me know how can I ensure that the API is accesible via app only. Means if anyone wants to access the APIs outside from ...
2
votes
0answers
81 views

How to model an Admin View on a ReST API

We have a more or less "typical" ReST API that allows clients to interact with a bunch of resources, let's say Maps and Devices. An authenticated client can get a list of maps, it can download a map, ...
0
votes
1answer
43 views

REST API - Eager loading nested resources

I would like to know if I am correctly eager loading nested resources in my API. In my app, companies can have many technologies, and tools. The relationship is stored in the join tables ...
0
votes
0answers
34 views

Simplest way to authenticate clients of my application to my server?

I am building a chat client on Salesforce's platform which will require that clients authenticate themselves somehow so they are the only ones who can send messages as themselves, as opposed to anyone ...
0
votes
2answers
81 views

Bi-directional sync of 2 different APIs

I'm currently assigned a task, where I have to program a bidirectional synchronisation between 2 ERP-related software, one providing webservices (Visual Studio Web Reference) and the other one ...
2
votes
1answer
91 views

REST API - Updating many-to-many relationships

I would like to know how I should update many-to-many relationships in my API. My app has companies that can have many tools and technologies. The relationship is stored in joining tables ...
1
vote
3answers
85 views

How to detect real time change in API response

I have an API endpoint written for version and health of tomcat applications. It returns a json response with details. I wanted to know, how can i monitor any change in the json response in real time. ...
0
votes
1answer
123 views

REST API: Handle “partial” nested objects

Let's say we have schools with some data including a name and a list of students, and students with some data including courses they're enrolled in and a reference to their school. On the client: I'd ...
0
votes
1answer
54 views

REST API responding with nested arrays

I would like to know the best practice for designing a REST API for a resource that has a has_many relationship with another resource. In my app, companies have many technologies, and technologies ...
1
vote
1answer
80 views

First-level resource vs required parameter in RESTful API

We design RESTful API for our system. 90% of resources have dependency from other resource called as "user", for example. "User" also can be used as an independent resource. We found two ways how to ...
3
votes
3answers
132 views

Rest API calls with side effects on other resources

Let's say I have a mobile app, android/iOS and a java Spring back end. Given the mobile connectivity, the number of network round trips must be limited, ideally, 1 or less per screen. Now, let's say ...
1
vote
2answers
107 views

Trouble conceptualising API's

I've been reading a number of articles on "what is an API" but they're either too high level or two low level for me... I can't seem to quite grasp the entire concept, or have that sneaking feeling ...
0
votes
2answers
61 views

Advice on using middleware to phase out legacy ERP system

I would like to know if any of you have any experiences and advice you'd like to share about middleware systems? A little background first: the company I work for is based entirely on a closed ...