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

learn more… | top users | synonyms

5
votes
1answer
230 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
256 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
893 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
125 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
194 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
548 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
482 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
614 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
1k 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
134 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
171 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
397 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 ...
5
votes
1answer
792 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
172 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 ...
13
votes
2answers
7k 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
685 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
332 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
258 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
701 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
841 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
426 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
413 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
310 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
721 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. ...
31
votes
8answers
3k 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
527 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
809 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, ...
1
vote
3answers
413 views

Is an API in C++ a better alternative to computing directly in SQL?

I need to perform large amounts of computations on data storerd in a busy Microsoft SQL server. Would it be faster if I retrieve the data from the server, perform the computations locally in C++, and ...
3
votes
2answers
128 views

Importing Data from Google Analytics

I am planning on building a web app with many different public-facing HTTP servers; each of which will have Google Analytics (GA) installed on them. I'd like to create a "dashboard" app that ...
2
votes
1answer
275 views

HG: fork web app project to separate API code from app code [closed]

I have a web app thats been in active development for about 8 months now and its becoming apparent that the project has a need to maintain a separation between app specific code and our OO Javascript ...
3
votes
2answers
190 views

For a Javascript library, what is the best or standard way to support extensibility

Specifically, I want to support "plugins" that modify the behavior of parts of the library. I couldn't find much information on the web about this subject. But here are my ideas for how a library ...
2
votes
1answer
262 views

How do I mashup Google Maps with geolocated photos from one or more social networks? [closed]

I'm working on a proof of concept for a project, and I need to pin random photos to a Google Map. These photos can come from another social network, but need to be non-porn. I've done some research ...
1
vote
1answer
110 views

What could be the best way to generalize data from Facebook and Twitter?

I am not sure if this is the best subsite to ask this question, but I'm pretty sure it doesn't fit on the normal or facebook SO page... I've been asked to make a general API for connecting to several ...
1
vote
1answer
150 views

Security using jsonp

I'm writing an app that will make available a set of api functions that require cross site scripting to work. I'll be utilizing jsonp which will allow other developers to consume these services for ...
-1
votes
1answer
825 views

HP openview servicedesk: looking for api information ? [closed]

Good day folks. I am very confused in this situation. I need to implement system which will be based on HP open view service desk 4.5 api. But this system are reached the end of supporting period. On ...
1
vote
1answer
514 views

Securing Back End API for Mobile Applications

I have an application that I am writing for both iOS and Android; this application will be served by a ReSTFUL API running on a cluster of servers on "the internets". I am curious how the rest of the ...
4
votes
3answers
367 views

iOS: Versioned static frameworks vs Git Submodules and included code

For the last couple of years I've been building static frameworks of common APIs for my iOS projects. I can build a universal binary containing all the architectures (i386, armv6, armv7) and wrap it ...
6
votes
4answers
632 views

Should functions of a C library always expect a string's length?

I'm currently working on a library written in C. Many functions of this library expect a string as char* or const char* in their arguments. I started out with those functions always expecting the ...
3
votes
2answers
200 views

What are the key points to evaluate to select a good SMS gateway?

We are planning to add a "SMS verification account" option for our customers. (So we will only send SMS. We do not need a short code.) We have found several companies who offer SMS gateways through ...
1
vote
1answer
631 views

Designing A 2-Way SSL RESTful API

I am starting to develop a WCF API, which should serve some specific clients. We don't know which devices will be using the API so I thought that using a RESTful API will be the most flexible choice. ...
0
votes
3answers
303 views

From where do financial firms obtain the stock data to analyze [closed]

I've been thinking about the subject and I've always wondered, from where do they obtain the data that is analized in applications, I've looked at Nasdaq's website and they do not seem to have any ...
28
votes
2answers
2k views

Should a website use its own public API?

I am starting to write a webservice, and I've built with nodeJS and a RESTfulish approach. From what I gather: The advantage is that you don't have to duplicate code. The disadvantages are that ...
5
votes
2answers
1k views

Why does the add() method of a Linkedlist return true in Java?

Why does the add method of a Linkedlist return true in Java? http://docs.oracle.com/javase/1.5.0/docs/api/java/util/LinkedList.html#add(E) Why not just make it a void method? I know it says "per the ...
33
votes
3answers
6k views

What's so bad about the DOM?

I keep hearing people (Crockford in particular) saying the DOM is a terrible API, but not really justifying this statement. Apart from cross-browser inconsistencies, what are some reasons why the DOM ...
1
vote
2answers
235 views

Drawbacks to entirely Ajax driven CMS

I'll try to keep this question as specific as possible.. I'm about to start building an API for an upcoming project. I'm currently thinking PHP/Symfony2. It will be a farily simple HTTP-based api for ...
0
votes
3answers
466 views

API design and versioning using EJB

I have an API that is EJB based (i.e. there are remote interfaces defined) that most of the clients use. As the client base grows there are issues with updates to the API and forcing clients to have ...