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

learn more… | top users | synonyms

0
votes
1answer
430 views

REST API internal directory structure and RewriteEngine

I'm building a REST API. I don't want to have real folders in my directory structure, but I'm not quite sure what to use else. My REST API uses paths like this: ...
-1
votes
1answer
387 views

Good public API for use in demos and documentation? [closed]

I have created a utility library and open sourced it on Github, and I'd like to document the HTTP utilities. I created this around some apps I've developed, but none of the APIs I use are for public ...
2
votes
2answers
419 views

How to handle many arguments in an API wrapper?

I'm writing a PHP API wrapper for a third party API. I want to make all the methods consistent, but I'm not sure how to handle the number of arguments some API routes accept. One API request accepts ...
4
votes
2answers
693 views

Custom functions in a REST API

Looking at two of our entities Company and Address. A company has a billingAddress and a profileAddress. I'm unsure of how to implement a function to set the billing address versus the profile. Here ...
1
vote
1answer
170 views

Should I store UK postcode data in my database

I am building a website for a UK audience that will utilise location data to offer search results based on a desired location or home address. I have a large list of UK postcodes and geographic ...
-1
votes
1answer
516 views

Data aggregation like polyvore.com [closed]

I'm creating a website that is going to aggregate women shoes from across the web into one website. Kinda like polyvore.com does with all their products but mine is only going to be shoes. Which ...
3
votes
2answers
336 views

RESTful URI's, Creating a new noun/uri or add a queryparameter

I have a Person class with a one to many relationship to Employment. A Person in the CRM can have multiple Employments (historic data). My current REST URI for this class looks like this: ...
3
votes
3answers
315 views

How can I ensure a method is called only once when using a API?

In general, if I am using an API whose methods have side-effects that I only want to occur once, how can I guarantee that my own application only calls them once even if an error occurs before it can ...
0
votes
2answers
288 views

How does API design differ from general web application development design? [duplicate]

If I was working on a web application designing and writing an API how does that differ from a general web application development? What things would I need to consider and take into account? Are ...
3
votes
2answers
247 views

How can you provide a public writeable API and not get spammed?

So say you had a site like StackExchange. Now imagine you created a machine-writeable API capable of posting questions and comments and doing everything your browser can do. Of course, about 5 ...
5
votes
2answers
322 views

Web API URI Schema Design

I'm in the middle of designing an API for a very basic flashcard application for learning purposes and I'm wondering if you all think there can be any improvements. In the app, a Folder contains ...
5
votes
2answers
477 views

Requiring Explicit Null Reference Handling

One of the problems I have with null references is that they may not be exceptional. In my current position, there are few requirements and you are lucky if conventions are followed. This means being ...
46
votes
2answers
2k views

Why have hardware-accelerated vector graphics not taken off?

I'm working on an app that involves real-time manipulation of vector paths at 60fps, and I'm very surprised by how little information there is on the subject. At first, I tried to implement my idea ...
2
votes
2answers
135 views

What endpoints should I provide, if any, to permit connectivity testing for my web services?

What endpoints should I provide, if any, to permit connectivity / availability testing for my web services / Web API? TL;DR I am developing both the server and client in an enterprise environment. ...
2
votes
3answers
630 views

design practice for business layer when supporting API versioning

Is there any design pattern or practice recommended for business layer when dealing with multiple API version. For example, I have something like this. http://site.com/blogs/v1/?count=10 which ...
2
votes
1answer
356 views

How to count hits in an HTTP API without bogging down the DB

I'm building an API and want to count hits for each user. It's a HTTP API implemented in Python. I could keep the count in a database (using PostGreSQL) but it'll be a very busy API, so I don't want ...
13
votes
3answers
3k views

Joda Time vs Java Time

Although Joda is feature rich and more sophisticated than standard Java time, it may not always be the best thing to use. How do I decide if I should use Joda Time or Java Time in any Java code? Is ...
0
votes
1answer
136 views

Would it be possible to publish my code on an official site with a third-party library?

I'm building a rather large and extensive wrapper in Delphi for an email system called Mandrill. There are wrappers for this API in many other languages, but not for Delphi. So, I'm hoping to produce ...
1
vote
0answers
109 views

Designing a loosely coupled app -> stored proc interface for PostgreSQL. A couple of questions

I am in the middle of designing a next generation database access class for one of the programs I am building. We use PostgreSQL exclusively. Our current approach is procedural (largely inspired ...
6
votes
6answers
3k views

Testing a REST client against a REST Server. How to do fixtures?

When writing unit tests, it's common to use fixtures: little testable data, so we can say: 1. Get all clients should include Willy Wonka. 2. Delete client 3, and now get clients should not include ...
1
vote
2answers
268 views

Managing Alerts in Web Application Using RESTful API

I have designed a RESTful API and I am now working on creating a web application to use the service. One thing I am struggling with is how to manage alerts in the web application (similar to the ...
11
votes
4answers
679 views

Using natural language grammar in fluent API

I'm tinkering with a query abstraction over WebSQL/Phonegap Database API, and I find myself both drawn to, and doubtful of, defining a fluent API that mimics the use of natural English language ...
3
votes
3answers
794 views

How to optimize calls to multiple APIs at once and return as one set?

I have a web app that searches across 2 APIs right now. I have my own Restful web service that I call, and it does all the work on the backend to asynchronously call the 2 APIs and concatenate them ...
19
votes
8answers
1k views

“Public APIs are forever: Only one chance to get it right”?

In an OS book I just read that, "Public APIs are forever: Only one chance to get it right". Is it true? Is it applicable only in APIs of Operating Systems or other APIs too? For example, will this be ...
8
votes
1answer
617 views

What API design for storing generic data in a more specific format?

for In the project I am working on we send messages about widgets over message queues, serializing them onto the queues as XML. The XML schema contains tags for properties that are common to all types ...
1
vote
2answers
321 views

Is it possible to use a “non-commercial” REST API in a for-pay app?

I am interested in integrating the results of 3rd-party news API's into my for-pay application. The APIs would be a very small part of the app (e. g. the app is not just reselling the APIs). I have ...
2
votes
2answers
360 views

Workflow for building a RESTful API

I am building a RESTful API, and so far, to make sure that my resources work as I need them to, I am using a REST client called Postman. This makes it easy for me to store routes and quickly make ...
7
votes
1answer
3k views

When to use nested resources in a RESTful API

I have two resources: users and links. Users can have several links associated with them. I have designed my RESTful API so that you can reach the links associated with a user at the following URI: ...
0
votes
2answers
203 views

Encapsulate external JavaScript library

I am about to develop a ASP.NET MVC 4 project that will make use of maps. Our company has it's own map API which is very basic at the moment, but is intended to be further developed in future to match ...
11
votes
2answers
4k views

Trailing slash in RESTful API

I have been having a debate about what to do with a trailing slash in a RESTful API. Lets say I have a resource called dogs and subordinate resources for individual dogs. We can therefore do the ...
1
vote
2answers
185 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
1k 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
2k 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 ...
9
votes
2answers
4k 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 ...
15
votes
3answers
912 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
898 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
206 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
197 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 ...
22
votes
2answers
2k 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
261 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
916 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
173 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
125 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
207 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
228 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
319 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
547 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
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 ...