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
0answers
24 views

API calls as Server-to-Server or Client-To-Server?

I've been developing an iOS app for the best part of the year. It should also include fetching Tweets and Facebook posts for certain sites using the Twitter and Graph API respectively. I have set it ...
1
vote
3answers
174 views

How to authenticate against an API?

In a enterprise distributed system, a user of a web portal can sign into one site, be redirected to a federation provider. Once they log in with, for example, a facebook account, that user is ...
1
vote
2answers
41 views

JWT based webservice authentication

I'm currently writing a web service that will be consumed by an android app. To access user specific content, one must authenticate against the service. Since I'm not (primarily) using a ...
-1
votes
0answers
40 views

How do I contribute to API documentation for open source projects [closed]

I am a technical writer and I want to create a portfolio for API documentation. How do I approach open source projects? Where can I find them? Document for products whose API ref has not been ...
2
votes
1answer
384 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 ...
4
votes
4answers
431 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 ...
1
vote
1answer
50 views

Webapp : Rest Client API design and implementation (with RestEasy)

I am working on a design to create a generic rest client for our application for current and future integration's with multiple services (different external systems). Following is a high level diagram ...
0
votes
1answer
71 views

Deciding on a software license for a C++ API [closed]

I have designed and developed a C++ API. Its dependencies are: BLAS - custom license - http://www.netlib.org/blas/#_licensing LAPACK - modified BSD - http://www.netlib.org/lapack/LICENSE.txt GLPK - ...
0
votes
1answer
87 views

Making API calls with celery

I'm designing a system for a client where the requirements are: they upload a JSON file (one object/line) make a call to an API with the JSON object as the payload record the state (success/failure) ...
1
vote
1answer
202 views

Manage the persistence of entities on iOS in several places: CoreData on the device, iCloud and on a REST API

For the needs of a project, I would persist the datas contained in Core Data in several places depending on the state of the user. If the user is logged to my API -> Persist the datas on my API. ...
1
vote
1answer
96 views

API design for modular apps

Let's assume a web app made of independent modules: example.com/accounting example.com/employees example.com/admin Next step is adding an API which normally might end like this: ...
15
votes
1answer
278 views

Rest APIs - mobile specific challenges

I'm working on a new iOS app project, on the mobile side. Some architecture changes are happening and it turns out we will have to rely on a custom built private API that will be used by the app we ...
1
vote
1answer
140 views

Design consideration on JSON schema for an API

I have an API endpoint that retrieve data from 3 SQL tables on the server-side. At the moment, I do a SELECT with joins, consolidate/reorganize the selected data based on a JSON schema, and then send ...
16
votes
6answers
3k views

Where should I put an API request in MVC?

I'm building a web application using a MVC pattern. Following this kind of architecture we can see that all the methods used to interact with database are implemented in the model. But what happen if ...
1
vote
0answers
46 views

How system integration happens with an ESB?

Assume I have two different software sub systems and I need to interconnect them through an Enterprise Service Bus. What sort of modifications do I need to make in the existing systems to integrate ...
2
votes
2answers
111 views

Correct approach for creating api contract

I am trying to design an API. For creating contracts below are the two approaches: Approach 1: public class MyController { public void MyAction1(Dictionary<string, dynamic> input) { ...
1
vote
1answer
546 views

constants/enums in API

What are a few ways constants and enums are dealt with when creating an API Client? I'm writing a client in python for our API and I've hit a sticking point with this. We use a lot of mappings to ...
4
votes
2answers
47 views

Context specific API updates to developer

Let's say I have a API with regular updates and many developer who are using the API. Whenever the API updates I don't want to bother the developers with all the change updates. I want to send them ...
1
vote
1answer
98 views

DTOs vs Domain Models and invoking Command Handlers directly

I was just hoping someone might be able to answer a few questions I have regarding the proper design of DTOs and Domain Models. I'm currently working on a project which involves leveraging a SOAP API. ...
1
vote
2answers
52 views

Good practice to save the last time user accessed the app

Using a JWT authentication, the user doesn't have to log in each time he uses my app. I would like to save in DB the last time the user used/opened the app. Technically, I have a set of REST API ...
2
votes
3answers
121 views

API to get data, caller may not know how much? How to allocate buffer size

I am writing a C API for retrieving data from a hardware device. The data will be returned as a string with approximately 30 bytes of text per item. The problem is there may any number of items. ...
1
vote
0answers
64 views

If the externally callable interface of a class is called its API, what is “what can be overridden” called?

It's about what the class gives access to through inheritance. It has a three letter abbreviation but not API. I've seen this before but can't remember at the moment. The term is usually used in ...
1
vote
2answers
95 views

What is a good way to organize service layer classes?

I had a Service layer in my app and, for a while, there's just one class for API calls Current Scenario MyAPI Class authenticateApp() authenticateUser() Looking in the future, that class will be ...
2
votes
3answers
137 views

Best practice for a REST-ful API where objects would naturally have a “/” in their identifier

I am designing a REST api for a document management system. To make the API more natural, I thought about using the natural identifier for a file, which is it's path (usually having forward slashes ...
1
vote
2answers
175 views

Strategy for Website Talking to API on Same Server

I have a RESTful API that allows retrieval of data through requests such as GET http://example.com/users/id/1 (Coded following this tutorial). The code igniter controller looks like this: class ...
1
vote
0answers
92 views

Why does convention say DB table names should be singular but RESTful resources plural?

It's a pretty established convention that database table names, in SQL at least, should be singular. SELECT * FROM user; See this question and discussion. It's also a pretty established convention ...
-2
votes
1answer
49 views

Is Open Data Protocol (odata) Being Widely Embraced by the Development Community? [closed]

EDIT: In case you aren't familiar with odata, here you go. I am trying to determine whether it is worth learning this technology or if it is something that is not going to catch on. The premise is ...
-2
votes
1answer
63 views

Less PHP request to REST API

I had an argument with my PHP developer today who tried to convince me that REST API has to provide all the request from PHP since a server is faster than client devices such as desktop. As I am a ...
2
votes
2answers
170 views

REST API Structure to request multiple items

I have a REST API that looks something like the below where a person can belong to an organisation (but doesn't have to) and a person has many items. The items may also belong to the organisation ...
3
votes
2answers
107 views

The Critical Functionality of an API has changed, what should I do?

What should you do if an API has changed the provided functionality? [In this case it would affect your project as a whole] Some more context in my situation: Facebook eliminated the APIs ability to ...
3
votes
2answers
119 views

C++ using shared_ptr with API [closed]

I'm building a library that generates a couple of types of objects that can be used by user code and the library. To keep track of these objects, I'd like to use shared_ptr's, so I can build in some ...
54
votes
2answers
4k 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 ...
5
votes
3answers
3k views

Java's Boolean class - why not an enum?

It seems to me that the Boolean class is an ideal candidate to be implemented as an enum. Looking at the source code, most of the class is static methods which could be moved unchanged to an enum, ...
0
votes
0answers
48 views

Utilizing Python Slate for pdf text extraction from PHP

I want to use Python Slate module for PDF text extraction, and I have my code up and running for this. What I would like to know here is how to link my existing PHP MVC to utilize/make a request to ...
5
votes
1answer
152 views

How to prevent multiple form submissions when user reloads the page

I'm currently working on a project which requires that we integration a 3rd party SOAP API to handle a number of basic CRUD type operations. Our current implementation allows us to leveraging the ...
39
votes
5answers
11k views

What is the difference between a Future and a Promise?

What is the difference between a Future and a promise? (In Akka and Gpars.) They look the same to me as both block and return the value of the future when get is called and a promise is to get the ...
10
votes
5answers
8k views

How best do you represent a bi-directional sync in a REST api?

Assuming a system where there's a Web Application with a resource, and a reference to a remote application with another similar resource, how do you represent a bi-directional sync action which ...
11
votes
5answers
7k 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 ...
12
votes
2answers
468 views

Packaging structure of Java collections (java.util) - why does Iterable sit in java.lang?

As per the below diagram, except for interface Iterable, all the remaining constructs (interface / class / abstract class) sit in same package java.util   Why does Iterable sit in ...
7
votes
2answers
392 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
1answer
53 views

REST API - Updating a Variable

If you are updating a variable in a RESTful API, for example person's weight, how should this be laid out? What I have thought of: PUT /person/1/weight?weight=150 PUT /person/1/weight {"weight": ...
2
votes
2answers
62 views

Is it possible to avoid abstraction inversion in this scenario?

I'm designing a library built on web scraping that tries to provide an API to a popular news site. I am representing each of its articles as a collection of 'elements' (IElement), such as images, ...
0
votes
1answer
60 views

Api for CMS And Mobile applications either separate or same

I would like to ask an architect based question What is more secure and most standard way to follow.For let's say a mobile application, Should the Api for mobile interaction with server be ...
11
votes
5answers
3k views

How to simulate a REST API?

I am working on a new project which will query data from a 3rd party REST API. This is for a real time sports data feed, so the feed only works when a game is actually taking place. Although the 3rd ...
0
votes
0answers
26 views

Segmenting JSON API with subdomains

I am in the process of designing an API for a web service that I an building. The architectural style of the application is a coarse grained SOA. One thing I have thought to do was to break the api up ...
0
votes
0answers
37 views

API Architecture

I have a Laravel web application. Imagine if our company has many customers. Each customer has one or more addresses. Each Address can have multiple fences and each fence has points which define ...
0
votes
2answers
65 views

How to acquire data and render page in context of REST/API application?

In typical REST/API application, build on MVC architectural pattern, what is the best available technique for acquiring data for rendering views? Should it be: as in any non-API application: data ...
3
votes
2answers
130 views

Best practice to handle POST with array of objects if at least one object rise an Exception

I want to POST an array of objects and make an insertion in database concerning each of them. What is the best practice if one object is not conform and rise an Exception ? (cancel all transactions or ...
0
votes
1answer
25 views

API call to login from a link in email

I am trying to make a something like a shopping cart. I want to add a feature, that if a person adds a product on website but does not purchase the item, i will send him an email with a link. If the ...
1
vote
1answer
70 views

Documenting MVC JSON API

I've got an MVC5 application that we're using an a JSON API for various clients (mobile apps, other web applications, etc.) as well as a traditional web application. Controller actions that return ...