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

Can you refer to the callback function as an API?

A system design is decoupled into two layers say layer A and layer B. The interaction between layer A and layer B occurs through an interface that is exposed by layer B in form of an API. This ...
14
votes
6answers
1k views

What to call an HTTP API that is not RESTful? [on hold]

What would you call an API that is HTTP-based, uses URI to name resources and HTTP verbs (PUT, POST, DELETE, GET...) to manipulate those resources? According to Roy Fielding's complaints it is not ...
2
votes
2answers
78 views

Function naming design in a C Library

I'm writing a C (c99) library that operates on strings. I'm having a design problem writing functions that will perform in different modes. For example; the Find function can search for: the ...
2
votes
1answer
82 views

Is it bad to use POST only on an API?

I'm about to develop a new API for our website. Part of the design I've considered to use the POST and GET methods but after reading some security stuff I realise that GET is a bit less secure(i.e. ...
1
vote
5answers
76 views

How much data from a web service should I expose in a library?

I'm working on a personal project, a library that can access the weather forecasts and other weather related data from it. However, a lot of the returned data is sometimes quite redundant or simply ...
0
votes
0answers
24 views

REST API, nested routes without providing identifiers at every nested level

Obviously a RESTful API could contain base routes such as: api/competitions api/competitions/{id} api/teams api/teams/{id} api/players api/players/{id} And nested routes such as: ...
1
vote
3answers
51 views

Representing a “Belongs to” relationship in an API endpoint

Consider the following pseudo code models: class Post int Id string Title int CategoryId Category Category class Category int Id string Name Note that Post belongs to ...
0
votes
0answers
14 views

API Design when modifying resource data based on user roles (access levels)

I'm trying to figure out the best (and most RESTful) way to handle user roles in regards to the data returned. For example, for a resource named user, we only show obfuscated_id to regular users and ...
1
vote
0answers
47 views

How to off load DB & API calls (PHP Heroku App) [on hold]

I took over support for a PHP app that runs on Heroku. After analyzing the performance with New Relic, I'm noticing that the three bottles necks are the database and API calls to outside services. ...
0
votes
1answer
26 views

What is the idiomatic way in REST to handle field level permissions?

REST APIs conventionally expose resources addressed at the object level. While it's easy to do object level permissions using the appropriate HTTP responses, handling field level permissions is a bit ...
1
vote
0answers
28 views

Can a linux distribution provide an API to a proprietary codec? If so under what conditions?

As an example lets take the MPEG2 codec, let us say I am building a Linux distribution which I intend to ship in two pieces. Piece 1: (free) Core libraries and applications Piece 2: (paid) ...
3
votes
1answer
152 views

Grouping and nesting of REST APIs

My question is around best practice of aggregating or grouping REST APIs. I have a scenario where there are many different vendors, data sources, etc. and I think grouping REST APIs would make a lot ...
0
votes
2answers
426 views

Manage content for multiple websites and mobile apps

I need to manage content (pages, key/value list, assets and more) in one webbased system for multiple websites and mobile apps. My idea is to create a web api, secured with tokens for apps and sites ...
0
votes
0answers
50 views

Should all public API POCO value-type properties be nullables?

I use nullable value types a lot when designing classes that have properties which may remain null, i.e. when the object is being persisted. For example: public int? MyProperty { get; set; } My ...
1
vote
1answer
68 views

How do I write a REStful API's functional specifications?

I've been looking for answers about writing functional specifications for a software for a while now but I can't seem to find an answer to my specific case. I think I understand the difference ...
0
votes
0answers
45 views

How to protect a public tracking API?

Let's say company X has websites A, B, and C. It would like to track how people are visiting them in ways that Google's Analytics and other services can't. So we company X provides a web API to track ...
0
votes
1answer
75 views

Is this pattern RESTful? Or something else?

I'm working on a new project that will create a web-based API to perform CRUD operations on a relational database. Originally, I was going to create the API as http-based, and make it RESTful so ...
1
vote
2answers
85 views

Technique to synchronize error codes in a same-project-API

In the project I am working right now, we have some python and some C# code. At some point, I call from python a subprocess which starts a C# executable. This C# code returns an error code, which has ...
3
votes
1answer
61 views

How does this kind of application and DDD relate?

In Domain-Driven Design the application is divided, as I understand, into four layers: Presentation Layer Application Layer Domain Layer Infrastructure Layer I understand this well, for instance, ...
1
vote
2answers
148 views

How should I provide detailed information about an error, if not through HTTP status codes?

This question comes from here. I believe it deserves to be on its own instead of being lost in a long question with multiple points. I'm building an API and find myself limited by HTTP error ...
-1
votes
1answer
109 views

If I find a public web API am I allowed to use it in my application? [closed]

If I find a public web API (by public I mean that isn't protected by any type of authentication) what do I need to do so that I am allowed to use it in my own application? Is it enough to read and ...
0
votes
1answer
84 views

Is set of libraries called API only if it talks to a system/server?

I have read few articles about API. Can't find the reference now. In some of them, they define API as set of tools, routines and protocols which are helping programmer to build a software with use of ...
2
votes
2answers
80 views

Web API: avoiding name conflicts in URL query parameters

I am implementing a REST-like API and have just faced an interesting problem. There is a need to provide a resource with an open list of query parameters to filter the results. For example: GET ...
1
vote
1answer
103 views

How to design a RESTful API with good performance

When designing RESTful APIs, one of the rules is: "URI designates exactly one resource" , but in the real world we also like good performance and one thing to kill performance is the N+1 problem. So ...
0
votes
1answer
137 views

When passing dates/datetimes as url parameters in an API, which format is better - unix timestamp or date string (ISO 8601) [closed]

Interesting question came up at work in regards to the better format of passing a date/datetime as a url parameter in an API: Is it better to pass as a unix timestamp, or as a plaintext date string ...
0
votes
1answer
34 views

RESTful way of referencing other resources in the request body

Let's assume that I have a resource called group with the following representation: { "id": 1, "name": "Superheroes" "_links": { "self": { "href": ...
1
vote
0answers
53 views

How to consume inconsistent REST API with Mongo DB backend?

We are using a third party REST API and we are building one of the pages on our ASP.NET site around the data it delivers. We get results in JSON, and interact with it mostly using .NET MongoDB Driver. ...
6
votes
3answers
673 views

Designing a REST api by URI vs query string

Let's say I have three resources that are related like so: Grandparent (collection) -> Parent (collection) -> and Child (collection) The above depicts the relationship among these resources ...
1
vote
1answer
67 views

Purpose of authentication on API's?

After asking this question I found that I have a different question. What's the purpose of authenticating an API anyway? Take Twitter for instance. If you want to use this link to load some user's ...
2
votes
2answers
370 views

What is the best way to create REST API error response model and error codes system?

My REST implementation will return errors in JSON with next structure: { "http_response":400, "dev_message":"There is a problem", "message_for_user":"Bad request", ...
1
vote
1answer
66 views

RavenDb - Get data through a REST Web API

I would like to build a RESTful API where I need to get data from a RavenHQ-cloud-database. First of all, is this possible? The idea is to have multiple applications (xamarin-app, mvc-app, etc.) and ...
1
vote
2answers
238 views

Is there actually an advantage to using Win API calls for file access?

I remember coding file access using the Win API about 15 years ago. It was much faster than using the FileStream of my language at the time (Delphi). I spent a while today experimenting in C# under ...
1
vote
1answer
43 views

Breaking dependencies on remote APIs

The system I'm working on has a core web application where the bulk of the work is done. However, it relies on another server to handle transactional finance data. It connects to the server using a ...
0
votes
0answers
83 views

Separation of web server and stateless REST API

Currently, I have a single Node server that provides both (a) stateless API routes returning JSON, and (b) session-based web routes. My API routes and web routes have started sharing a lot of code, ...
1
vote
1answer
80 views

Backend as a Service (BAAS): temporary or long term solution?

Right now I'm building an app that relies heavily on Parse.com's products. The app uses nearly all of their features: Data storage User management Push messages Analytics Crash reporting There are ...
3
votes
4answers
321 views

int * vs int [N] vs int (*)[N] in functions parameters. Which one do you think is better?

When programming in C (or C++) there are three different ways to specify the parameter in a function that takes an array. Here is an example (implementing std::accumulate from C++ in C) that shows ...
1
vote
1answer
72 views

Handling Slow External API's in Web Application

So I have got an application that during various steps during a user's process will transmit and receive data from external API's. Currently the way this is handled is fairly rudimentary. There ...
2
votes
3answers
89 views

Architecture for an event admission ticket scanner for events with multiple entries

I am working on a service that lets event organizers sell tickets to their events online (a lot like Eventbrite to be honest). The customers then print the tickets themselves (each ticket has a ...
3
votes
1answer
90 views

What is the correct way to publish a runtime? Should it be a singleton?

I have a compiler for a programming language that targets JavaScript. That language needs some global functions such as: alloc, memcpy, write and so on. My question is: where should I position those ...
0
votes
2answers
109 views

Periodically polling an API, are there alternatives?

I'm currently working on a service that is supposed to aggregate data from a number of APIs, unify the data, and offer it through another API to the users. I had a couple of ideas for solving this, ...
7
votes
1answer
205 views

Message Queue for RTOS for microcontrollers

I'm currently writing an RTOS for microcontrollers. The whole thing is written in C++11 - if anyone is interested, and the link to the repository is at the bottom. Currently I'm writing a class that ...
2
votes
2answers
401 views

PHP MVC as backend for iOS app

So, essentially, the question is, to develop a PHP back-end to an iOS application, would you implement an MVC architecture on the PHP side? Or no, since the client side (iOS) already has an MVC ...
2
votes
2answers
44 views

Internal api development and committing procedure

I am now on the job of extending and refactoring a set of APIs and core data structures that most of the other components depend on. The team is small (5 people ). A manager told me that before ...
2
votes
1answer
124 views

Should a web app for a service access its data via its own API or directly?

I'm building a service that will consist of mobile and desktop apps, which will require me to build my own RESTful web API to easily keep the data for the service in sync. I am also building a web ...
-1
votes
4answers
101 views

What exactly is the meaning of “node” in Document Object Model (DOM)?

I've searched for the definition of a "node" in a programming language and I am still finding it hard to understand. Could anyone advice me in simple, layman's terms: What is a node?
1
vote
2answers
56 views

Lock data in DB while external API call is pending?

I have an interesting situation, and I am looking for the best way to solve it. My app runs like this: 1) The user gets a Promotion Pin from Some Company, and I have a db table with these pins also. ...
0
votes
0answers
40 views

Multiple API Calls on Web Server

I am trying to build a Tumblr Site that makes API calls to Social Network sites and return data and render on the Tumblr Site. And the thing is Tumblr doesn't allow PHP on their HTML Editor. So my ...
2
votes
2answers
125 views

RESTful key-value collection

I am creating a HTTP REST API. I have a large collection of key-value pairs, at /base-url. I need to provide the ability to get and set values for a key. My first attempt: GET /base-url/{key} PUT ...
3
votes
1answer
96 views

the better url for a API: /api or api [closed]

when you make a API, what is a better practice ? http://webapp/api or http://api.webapp/ why ? I started with the API in http://webapp/api and the description of the service in http://webapp. ...
2
votes
3answers
296 views

Is a bad choice to consume the REST API also from the back-end?

Using a REST API for front-end code is a desiderable and quite common practice. However, I was wondering if using it also for the back-end could be a good choice. What I mean is leaving the burden of ...