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
59 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 ...
-4
votes
0answers
17 views

I am new in API AND W [closed]

I am new in API and would like investigate about API licences. I like investigation about following: - review and classification of the types of licenses that can be used by web API providers. - ...
2
votes
3answers
121 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
0answers
63 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 ...
-4
votes
0answers
22 views

Accepting online payments, and dispensing them [closed]

I want to create a system where a person can pay someone else via our website/mobile app. Person A pays using their credit card, our service takes a small percentage, holds the funds in escrow for a ...
-2
votes
1answer
41 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
51 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 ...
3
votes
2answers
105 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
110 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 ...
0
votes
0answers
35 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 ...
-1
votes
0answers
58 views

should we also develop our PHP backend as an API? [duplicate]

I found a really interesting question here (ASP. NET). And I would like to know if we should think about the same concept on PHP? This seems to me portable with ease. Maybe there are already basic ...
5
votes
1answer
137 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 ...
1
vote
1answer
67 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. ...
0
votes
1answer
77 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 ...
-2
votes
0answers
10 views

how parse dynamic data through routing

am trying to achieve list a page and detail page using feeds i gathered from various sourcess using the google feed api, <div class="post" ng-repeat="feed in feeds | orderBy:'title'"> ...
0
votes
1answer
51 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
60 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, ...
12
votes
2answers
444 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 ...
0
votes
0answers
22 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
30 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
1answer
48 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 ...
0
votes
2answers
45 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 ...
0
votes
1answer
23 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 ...
3
votes
2answers
98 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
0answers
37 views

Adding a chat api to infrastructure

I currently have a REST Api and will be adding a new real time chat feature. I want the applications to have a separation of concerns. I initially was planning on adding a new realtime messaging ...
2
votes
1answer
41 views

Development approach for GUI application sharing on X

I'm curious about developing a simple system for GUI application sharing between users on a single computer, which uses Xorg (or perhaps any modern form of X11 display). I'd like user Alice to be able ...
1
vote
1answer
59 views

Is hiding complexity from API clients by merging resources a correct practice?

So let's say we have three simple resources: Groups, Users, and GroupUsers. Groups - Represent interest groups which can be subscribed by users. { name: 'Colorado Mountain Biking Group' ...
0
votes
1answer
41 views

API authentication with a single ID

A typical API authentication usually rely on a pair of API ID + SECRET, my question is: if the API ID is unique and randomly generated and is considered strong enough (e.g. SHA512), why a SECRET is ...
6
votes
3answers
142 views

REST API design: POST (implicit userId) vs PUT (explicit userId)

For some routes on an API, like GET /news, one would asume the user only wants news that pertains to them, so the userId is implicitly taken from authentication info. However, some of the routes on ...
1
vote
1answer
107 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 ...
2
votes
1answer
100 views

How can I stop echo feedback when making a streaming microphone device? [closed]

I am developing a microphone device of sorts that streams audio to a receiver device with speakers. A person speaks into the device, and the audio data is played on the speaker. Since the person is in ...
1
vote
1answer
60 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 ...
3
votes
3answers
172 views

Is it better to make database calls or external API calls first in the context of a single Web request?

Say you have a Web app that uses data from both a database and an external API, and for certain pieces of functionality, you need to call in to both in order to read/write the necessary data. Is it ...
11
votes
1answer
273 views

API key - in content or header

Working on an API at the moment and just wanted to gather opinions on where the best place to transmit the API key should be. I know that is shouldn't go in the URL, this leaves the request header or ...
0
votes
1answer
72 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) ...
3
votes
2answers
175 views

Is embedding URLs as query parameters in URLs an acceptable REST API design pattern? [closed]

We are designing some resource oriented web services. Service B needs to be able to make calls to Service A passing in a reference to a resource in service B that service A will use when formulating ...
2
votes
1answer
328 views

How to use own REST API in web front end?

I have implemented a JSON-based REST API for a simple blog. The API allows for the creation, viewing, deletion and modification of user info, blogs, blog posts, comments, 'likes', etc. Some of these ...
-1
votes
1answer
49 views

What tools are there to create/generate a full stack dev project? [closed]

I'm starting to develop a new project and I'm looking for a tool to generate all the needed layers for a full-stack dev project. I'm looking for a hello world generator that provides all the ...
0
votes
1answer
50 views

JSON schema design for variable response

I am drafting a JSON schema for an API. One of the responses aims to show all the updates to different properties of an given entity. The number of updates may vary from one response to another. For ...
3
votes
0answers
95 views

License that encourages improvements to the original version rather than own forks? [closed]

I'm looking for a license that should encourage changes to my original open source rather than encouraging forks and uncontrolled random redistribution. This is because of the nature of the code; it's ...
5
votes
2answers
230 views

What is the correct project file structure for a versioned rest api?

Should I have resource directories inside version directory, like app/ v1/ book/ author/ v2/ author/ or version directories inside resource folder app/ book/ v1/ author/ ...
0
votes
1answer
77 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: ...
0
votes
1answer
69 views

Vector API, naming for element-wise multiply [closed]

I'm helping develop a 3D Vector class, which has common operations such as: v = v1.cross(v2) v = v1 * v2 - infix multiply for dot product. v = v1 + v2 - infix addition. v = v1.slerp(v2) - spherical ...
0
votes
1answer
105 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? [closed]

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
104 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 ...
3
votes
1answer
110 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
125 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 ...
1
vote
1answer
74 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
72 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 ...