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
183 views

Management wants an API in purchased software

My company wants to purchase new software for our General Ledger. We want to be able to interface it with various other sytems, all purchased. Nothing is custom built. The software our Accountants ...
2
votes
1answer
911 views

OCR API (in Java) with Word (NOT MS-WORD) extraction [closed]

My Situation I need to develop an application which does crowd-sourced Image-To-Text service (just like google's reCaptcha). So I need an OCR API which can find words in an image with some text. ...
3
votes
2answers
1k views

Library design: provide a common header file or multiple headers

There are essentially two camps of library designers concerning the design of the final header file inclusion: Provide a single header file that includes every other header file that makes up the ...
7
votes
2answers
3k views

Implementing the command pattern in a RESTful API

I'm in the process of designing an HTTP API, hopefully making it as RESTful as possible. There are some actions which functionality spreads over a few resources, and sometime needs to be undone. I ...
14
votes
3answers
752 views

Does decoupling trump DRY in REST?

I am building a REST API to expose most of functionality of an existing Java API. Both APIs are for internal use within my organization; I do not have to design for external use. I have influence ...
1
vote
0answers
682 views

Google Maps - Geofence a route

I'm looking at implementing a PHP based application, where by you have a certain route for example London to Edinburgh. Along this route, I want to calculate say a 10mi Radius or Polygon around the ...
3
votes
1answer
202 views

Building dedicated codepad in PHP

I am author of growing framework, which is focused around User Interface building in PHP. Essential requirements for the up-coming website redesign is ability to run code examples. I am willing to ...
4
votes
3answers
173 views

Establishing an API to provide end-user apps/scripts access to multiple types of databases

Question and Context I am currently working on a project where the main question is, how do we insert an API between the database and end-users who may develop applications/scripts of their own that ...
21
votes
2answers
1k views

What does it mean to expose a C++ code publicly as a C API and what are the advantages of doing it?

I often hear people say that C++ programmers should expose their library's/product's public API as a C API. What does that mean and what are the advantages of that?
10
votes
1answer
1k views

Generate commercial license key for web service

Background I have a business question regarding web-based software licensing. A number of web sites offer software as a service for various APIs. A good example is Google's Custom Search API. The ...
8
votes
2answers
243 views

event listener pattern in api - what should adding the same listener twice do?

In designing an API that provides an event listening interface, it seems there are two conflicting ways of treating calls to add/remove listeners: Multiple calls to addListener will only add a ...
10
votes
3answers
785 views

How to do external API testing (blackbox)

Assume you are using APIs from a vendor, how to make sure their API is working as expected? My main concern is sometimes the vendor pushed the changes to their code and break the API, we want to have ...
0
votes
1answer
165 views

Rails-API gem, Is there such thing as an API only application?

I've built a few API's using the complete rails stack. In each project there have been multiple uses for rails core features. Each of the API has had management screens for monitoring usage, managing ...
1
vote
2answers
120 views

Is the copy/paste approach professionally viable when working with the Google Maps API?

I find that I understand much of the Javascript concepts used in the Google Maps API code, but then again there is quite a bit that is way over my head in syntax. For example, the geocoder ...
1
vote
1answer
2k views

GMail API for a small app (Rails? Javascript? PHP?)

I want to create an app that accesses the GMail API, but I'm finding that it isn't as simple as I thought it might be. I'm hoping somebody in the community here might have some experience working ...
1
vote
2answers
192 views

Questions to ask a 3rd party API provider [closed]

I'm due to meet with a developer/sales person from a new 3rd party resource we're about to start using. The main topic I'll be interested in, is their API as I will be the developer making use of it ...
6
votes
3answers
220 views

Does a mobile app need more access than the public API of a site?

I have a site with a public API, and some mobile app developers have been brought in to produce an iPhone app for the site. They insist they need to see the database schema, but as I understand it, ...
1
vote
2answers
302 views

DB API for shell scripting (any shell)

I am faced with some legacy shell scripts that run batch data processing jobs in Oracle using SQL+. For the most part, the data tier does not have to communicate back to the script with retrieved ...
3
votes
1answer
491 views

Too complex/too many objects?

I know that this will be a difficult question to answer without context, but hopefully there are at least some good guidelines to share on this. The questions are at the bottom if you want to skip the ...
5
votes
1answer
229 views

Asynchronously returning a hierarchal data using .NET TPL… what should my return object “look” like?

I want to use the .NET TPL to asynchronously do a DIR /S and search each subdirectory on a hard drive, and want to search for a word in each file... what should my API look like? In this scenario I ...
2
votes
2answers
1k views

Sharing authentication methods across API and web app

I'm wanting to share an authentication implementation across a web application, and web API. The web application will be ASP.NET (mostly MVC 4), the API will be mostly ASP.NET WEB API, though I ...
1
vote
1answer
233 views

RESTful API design - should a PUT return related data?

I have an API which allows a user to update their system status; and a separate call to retrieve system status updates from other users. Would it make sense to unify them under a PUT request where a ...
5
votes
3answers
702 views

Is there an API for determining congressional districts?

I'm looking to determine the congressional district based on an address my user is providing. This will avoid having the user to look it up themselves. Does an API of this sort exist? Note Through ...
3
votes
1answer
121 views

How to automate the API Diff document? [closed]

We can use doxygen to do the documentation, but how can I do the API Diff? Any open source or free solution for that? Or I need manually prepare? Thanks.
3
votes
2answers
184 views

Developing JSON API for a Carpool Engine

I am developing a new set of API methods for carpooling/cab booking, so if a developer needs to develop an app or webportal for carpooling, he can call my JSON API. Basically making it easy for ...
6
votes
6answers
545 views

Should I continue teaching old Java input methods alongside the new ones?

I've been imparting a Java introduction course for several years. Some slides explain how to read from files and keyboard using BufferedReaders, InputStreams, FileInputStreamReaders etc. I'm adding ...
6
votes
1answer
393 views

REST API rule about tunneling

Just read this in the REST API Rulebook: GET and POST must not be used to tunnel other request methods. Tunneling refers to any abuse of HTTP that masks or misrepresents a message’s intent and ...
0
votes
2answers
592 views

MVC or Extract Service Layer

we have an application that is built with .Net MVC. We are now tasked with exposing API's to third parties. Members on our team want to just continue down our current path and just use more ...
5
votes
3answers
997 views

What is the need for 'discoverability' in a REST API when the clients are not advanced enough to make use of it anyway?

The various talks I have watched and tutorials I scanned on REST seem to stress something called 'discoverability'. To my limited understanding, the term seems to mean that a client should be able to ...
0
votes
1answer
123 views

Directly copying third-party API

I'm currently planning on implementing API for HgLab and the obvious role model for me here is GitHub. My API obviously won't be an exact copy due to inherent differences between Mercurial and Git ...
8
votes
3answers
162 views

How to document experimental or incomplete APIs like @deprecated?

Is there a good term that is similar but different than "deprecate" to mean that a method or API is in the code base but should not be used because its implementation is not complete or will likely ...
-2
votes
1answer
297 views

What do ptLineDist and relativeCCW do? [closed]

I saw these methods in the Line2D Java Docs but did not understand what they do? Javadoc for ptLineDist says: Returns the distance from a point to this line. The distance measured is the ...
2
votes
3answers
1k views

When is using stdio preferable to fstream?

I work on a well-established, embedded C++ code base. We have been using a proprietary API to our filesystem. For better integration with third-party C libraries, we are currently in the process of ...
4
votes
1answer
765 views

Authentication for users on a Single Page App?

I have developed a single page app prototype that is using Backbone on the front end and going to consume from a thin RESTful API on the server for it's data. Coming from heavy server side ...
5
votes
1answer
168 views

Is there a standard for machine-readable descriptions of RESTful services?

I've interacted with a few RESTful APIs that provided excellent documentation for humans and descriptive URIs, but none of them seem to return machine-readable descriptions of themselves. It's not ...
12
votes
2answers
6k views

How should an API use http basic authentication

When an API requires that a client authenticates to it, i've seen two different scenarios used and I am wondering which case I should use for my situation. Example 1. An API is offered by a company ...
5
votes
1answer
629 views

API Auth vs User Auth

I have read many posts and articles on this topic but still cant connect the dots. I want to make a Rails app that is strictly a JSON API maybe using Sinatra or the rails-api gem. I also want to make ...
5
votes
2answers
2k views

How to document requirements for an API systematically?

I am currently working on a project, where I have to analyze the requirements of two given IT systems, that use cloud computing, for a Cloud API. In other words, I have to analyze what requirements ...
1
vote
4answers
326 views

When should code favour optimization over readability and ease-of-use?

I am in the process of designing a small library, where one of my design goals is that the API should be as close to the domain language as possible. While working on the design, I've noticed that ...
3
votes
1answer
237 views

When designing an enterprise API, what level is appropriate for separating libraries?

Assume we are developing a REST system for an enterprise company to expose the companies resources in a Java based application. Ultimately you have one web application, and domain libraries. My ...
3
votes
1answer
601 views

Dealing with API and error messages

We are in the process of constructing an API (using WCF). So far I noticed 2 ways in which methods could go wrong due to problems with the parameters sent. wrong format, for example we have a ...
1
vote
2answers
739 views

How do I read API documentation?

I've been trying to read through the RoR API to try to learn things that the tutorial missed, and I haven't been able to follow it at all. The only time I've read documentation was when I needed to ...
7
votes
1answer
388 views

How To Handle Login For An Unofficial API?

I am building a tool to access some data on a site (Fitocracy) and I would like to turn it into an unofficial partial API, as no official API exists. If you are not logged in, you cannot get access ...
7
votes
2answers
375 views

REST API Library Conventions

Most API libraries define one method for each endpoint. If there is an endpoint for getting user information, you might have a method like: getUserInfo(userId); That simple method is often a ...
5
votes
3answers
297 views

How do I assess tradeoff between robustness and “lazy” code in API design?

Postel's law: Be conservative in what you do, be liberal in what you accept from others. "Lazy" code (per The Pragmatic Programmer): Be strict in what you will accept before you begin, and ...
2
votes
3answers
627 views

One or many RESTful APIs for large company?

I work for a large company which has several non-RESTful APIs. I am tasked with building a web application to interact with these APIs. Each API handles and provides very different business processes ...
6
votes
2answers
1k views

Is HTTPS enough to avoid replay attacks?

I am exposing a few REST methods on a server for an mobile app. I would like to avoid that users can sniff how HTTP methods are built (from the mobile app) and then send them again to the server. ...
32
votes
9answers
2k views

How can I write a set of functions that can be invoked from (almost) any programming language?

I'd like to find a way to write an API that can be accessed from any other programming language via language bindings (or some other framework). Is it possible to do this? If so, which programming ...
2
votes
4answers
476 views

Should an API platform enforce only receiving JSON requests?

I am building an API platform. I have already ensured that the platform always returns JSON responses. My question is Should my API platform enforce the rule that all requests must be JSON? What ...
3
votes
4answers
693 views

PHP - Internal APIs/Libraries - What makes sense?

I've been having a discussion lately with some colleagues about the best way to approach a new project, and thought it'd be interesting to get some external thoughts thrown into the mix. Basically, ...