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

Where in computer science education does “reuse and integration” find comprehensive coverage?

This intro is only my naive attempt at a mile-high snapshot helping me to position my question. Any user trying to answer my question, that tries to nail down one aspect of programming, will have to ...
3
votes
1answer
127 views

What are the best practices and pitfalls of doing a JS app powered purely by RESTful API? [closed]

We are starting to build a new app and I would like to explore the idea of doing a thick JS client (backbone / angular) with only RESTful API exposed by our application layer. What are some of the ...
2
votes
1answer
139 views

Merge two different API calls into One

I have two different apps in my django project. One is "comment" and an other one is "files". A comment might save some file attached to it. The current way of creating a comment with attachments is ...
-1
votes
2answers
451 views

SQL API instead of a REST API? [closed]

What are the pros and cons of exposing an SQL API instead of a REST API? Let's assume that this would be a private API – the API developer and user are on the same team. Probably the biggest problem ...
1
vote
0answers
114 views

How to bypass Oauth2 authentication when the client and resource owner is the same entity?

We are currently working on using an API provided by Mercado Libre which is a maket place for selling various goods. Their APIs use OAuth 2.0 for authentication. The problem is that OAuth 2.0 as ...
2
votes
2answers
202 views

Should a RESTful API provide data for an entire form?

Let's say I have a JavaScript web application which entirely uses a RESTful API for data. Let's say this application has a data form, and let's say I'm editing a record at /product/12345. When ...
2
votes
3answers
167 views

Is it good practice to not filter values according to nullability?

Sometimes when I create an API that should enable getting a single value or all values I use the following pattern (passing NULL to the API, means get all rows): @Usernames - comma separeted list of ...
5
votes
2answers
210 views

Exposing domain models over API

I'm building a simple RESTful API for a web-based application I'm working on, and I'm wondering about the best way to go about exposing my domain models. Let's say I have a User class and I want to ...
1
vote
2answers
165 views

Returning view code in an API response

I have an API that returns a JSON formatted array of users within a given pair of lat/ long bounds. I'm using this data to plot a number of markers on a map, based on the location of each user. I ...
21
votes
10answers
1k views

API design: concrete vs. abstract approach - best practices?

When discussing APIs between systems (on the business level) there are often two different point of views in our team: some people prefer a more - lets say - generic abstract approach, other a ...
2
votes
2answers
427 views

When using your own API (Dog Fooding). How do you avoid giving away the secret key?

I read this article on soundcloud's api: http://backstage.soundcloud.com/2011/08/soundcloud-mobile-proxies/ It talks about consuming your own API. What I don't understand is how they avoid giving ...
2
votes
2answers
900 views

Is it safe to transmit access tokens via HTTP headers?

It's the first RESTful web service and I am concerned about security issues. Is it safe to transmit my access token via HTTP headers? For example: POST /v1/i/resource HTTP/1.1 Content-Type: ...
2
votes
1answer
181 views

Is it legal to imitate how an API looks? [closed]

I want to make an open-source graph thing which looks and behaves very similarly to Google Visualization API, but it would be based on Flot. Is this legal, or must I not imitate Google Visualization ...
3
votes
2answers
188 views

What is the appropriate approach to study an api when it is not well documented and there are no good tutorials around?

I am a student and I like to develop applications at my own level. While building an application I am the only one in my team. After analyzing the application I choose a library/api to use for the ...
1
vote
1answer
116 views

Is there an API I can use to get access to map data? [closed]

A customer would like me to build them an intranet web site with mapping information. For example, maps such as the ones on Google Maps. I looked at the Google Maps API, but their "free use" license ...
3
votes
1answer
97 views

Modelling REST endpoints with data that not all users have access to

I am trying to figure out the best way around a small problem i have with a design for a Hypermedia API i am currently building. I have a notion of a site, very simple doesn't have much going on and ...
9
votes
6answers
432 views

Is it better to have one method that takes a bool as a parameter or two methods with different names? [duplicate]

I'm writing a factory class for a Selenium Web Driver and I came across a choice that I couldn't figure out which is cleaner. Having two methods with the same parameter. GetWebDriver(string browser) ...
4
votes
2answers
590 views

What can REST API do that a API using HTTP URL query strings cannot do?

I'm learning about REST and had the chance to build a basic REST API. After doing so, most of the material I read was internalized and I now have a better understanding of it. However, I do not ...
77
votes
10answers
4k views

Strategy for keeping secret info such as API keys out of source control?

I'm working on a website that will allow users to log in using OAuth credentials from the likes of Twitter, Google, etc. To do this, I have to register with these various providers and get a ...
2
votes
1answer
713 views

What is the proper way of nesting resources in REST model?

I'm designing a REST API of service and got stuck on proper way to nest resources. Resources: partners, tickets, settings Connections between resources: partner has many tickets, partner has set ...
5
votes
1answer
643 views

API Authentication, One time token VS Dynamic tokens

We are working on a new project, we are two lead developers and got on a cross road on how to use a token to secure the communication between the server and the client : First Suggestion : (The one ...
2
votes
1answer
941 views

What is the general format of a Software Design Specification?

I'm trying to document a piece of software I wrote in detail. An SAS is too high level and doesn't cover the API. I found several examples of an SDS online, but I don't see a trend in their format. ...
1
vote
2answers
177 views

In my permissions API, how do I handle objects that don't exist?

Elgg is designing a permissions API loosely around the Activity Streams model. The user API could look (roughly) like: function elgg_can($capability, $subject = null, $object = null, $target = null) ...
0
votes
3answers
334 views

When there is no API

When it is necessary to integrate with a web application, and an API is unavailable, is it a viable solution to simulate a web browser interacting with the web application as a real user would ...
6
votes
4answers
2k views

REST API concepts

I have three questions about REST API design that I'm hoping someone can shed some light on. I've searched relentlessly for many hours but haven't found answers to my questions anywhere (maybe I just ...
4
votes
3answers
485 views

Best Practice: Should error messages be handled by the API or by the App?

I am designing an application that interacts with a RESTful API. When returning error messages like Unable to sign up user Should the error message be generated by the app? or by the API? I am ...
-3
votes
2answers
149 views

API for Hotels and Flights [closed]

I want to implement Hotels and Airlines in my web application.People will come and will search for hotels and airline's tickets and will compare result. What are the ways to get these informations? ...
6
votes
2answers
647 views

What does it mean to “expose” something?

So I am working on creating a Google App Engine Application, and I've come across the term "expose" a number of times, e.g. "your first app can expose objects using an HTTP based API" and "expose this ...
17
votes
8answers
2k views

When to use HTTP status code 404 in an API

I am working on a project and after arguing with people at work for about more than a hour. I decided to know what people on stack-exchange might say. We're writing an API for a system, there is a ...
0
votes
1answer
75 views

Implementation details of database synchronisation API

I want to achieve a database synchronisation between my server database and a client application. The server would run MySQL and the applications may run different database technologies, their ...
3
votes
3answers
191 views

RESTful applications logic and cross resource operations

I have an RESTful api that allows my users to receive enquiries about their business e.g. 'I would like to book service x on date y. Is this available?'. The api saves this information as a resource ...
0
votes
0answers
49 views

Digg Ajax API from digg.com

I am following Chapter 3 of WordPress 3 Plugin Development Essentials from Packt Publishing. There they reference a Digg Ajax API that can be embedded in HTML to allow users to digg or bury posts up ...
1
vote
1answer
156 views

What is the process or term for viewing HTML/CSS using localhost?

I have recently used some software, which come as a regular setup file, where you install your software, and then when you run it, opens the browser, uses the localhost with some specific port number ...
6
votes
4answers
613 views

Building a web application that is almost completely rendered by Javascript, while back end only delivers Json. Do or don't?

As a programmer, and taking into account the overall "funness" of the process, I'm tempted to start a project in Sinatra where the back end's sole concern is the logic, and returning a Json API, and ...
2
votes
1answer
85 views

Should I provide client libraries in some select languages along with the APIs themselves?

Say I have created a web service based on RESTful APIs. Does it make sense to also provide users with a client library for the API in some select languages which are likely to be the most used ones? ...
0
votes
2answers
501 views

How my website should use its own API?

Im building small web-service which will provide my users with data through API. Also, some data will be available right on my website. The question is about how to use my own API? Should my website ...
13
votes
5answers
466 views

In API design, when to use/avoid ad hoc polymorphism?

Sue is designing a JavaScript library, Magician.js. Its linchpin is a function which pulls a Rabbit out of the argument passed. She knows its users may want to pull a rabbit out of a String, a ...
1
vote
3answers
409 views

How to get different resources in a single endpoint in RESTful?

I have a REST webservice that have a couple of resources, like Company and User. But now I need to make a modification to the API to return a special list combining company, user and maybe other type ...
1
vote
0answers
55 views

What are the benefits of having a remote database for your command line utility

I'm current working on a command line app that will grab resources online for you when you're setting up a new project locally. Right now all the urls for the resources I need are hardcoded into the ...
0
votes
1answer
305 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
273 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
297 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
280 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
163 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
342 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
289 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
281 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
257 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
245 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
245 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 ...