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

What API design makes the most sense for changing a user's password?

Consider a web page where a user changes his password after clicking on an emailed password reset link. The page will be implemented against an API using ajax, rather than as an ordinary form ...
1
vote
2answers
23 views

REST API - proper way to handle non-CRUD items with REST

So, there are many times where I have to do things with my REST API that seem outside the boundaries of REST. In this particular instance I need to have an endpoint that checks whether a member is ...
-3
votes
1answer
94 views

How to detect someone tweets using twitter API?

I am learning API. I now want to write a program to send an email once some twitter users tweet. I have found there is an API call (user_timeline) which can get the tweets from an user. So my idea ...
0
votes
2answers
80 views

Structure of RESTful Service with Java Spring for Beginner

I am relatively new in terms of Java web development skills. I have a project that I think would make a good candidate for a RESTful service from what little I understand about APIs. I'm trying to get ...
-1
votes
2answers
50 views

what is the utility to a REST API for SIP trunk's?

Why does Twilio offer: Trunking REST API docs - Provision, configure, and modify SIP Trunks and phone numbers with the REST API. What are the top usages for this API? I appreciate that the ...
2
votes
4answers
90 views

Best practice for RESTful API calls with variations

How do I name API endpoints that serve the same entity in different ways and still adhere to the RESTful API guidelines? Let's consider I'd like to get a customer with ALL his details. I just ...
-4
votes
0answers
50 views

Best free alternative to Google Maps API [on hold]

As the title says I would like an alternative to Google MAPS API that does a similar role. It should be cross-plataform. It must allow to assign specific locations in the map, coordinates, such like ...
1
vote
1answer
40 views

Specialized API endpoints or multiple calls to generic resources?

This problem came up while designing the API for a SPA web application, which communicates with the server via AJAX. On one page the user, who is creating a list of people to invite to an event, has ...
0
votes
1answer
108 views

Accessing data from private API (with Basic Auth credentials) using Angular JS

I have been tasked with connecting an existing Angularjs app to a third party service via API using Basic Auth credentials I got from the third party website. I am not as experienced with Angular and ...
0
votes
1answer
76 views

How to structure a REST API response for a Flux/Redux frontend?

I have a question about how to structure a response where I return objects related to other objects (one-to-many/many-to-one), and to tell me if the way I've structured my endpoints are wrong or not, ...
3
votes
1answer
273 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 ...
3
votes
1answer
648 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
1answer
464 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 ...
0
votes
0answers
14 views

Market data API provider

I'm looking for a solution / API provider to get some market data into my app, like FOREX (EURUSD, USDJPY, ...), WS30, DAX30, etc. I know about Yahoo finance, but the update frequency is way too slow. ...
0
votes
0answers
17 views

business component which can be consumed by .net and java

I want to develop a business component which does basic operations, Create/Read/Update and persists information to some embedded database (Sqlite/Sql CE). This will consumed by web applications which ...
1
vote
0answers
17 views

Storing OAuth2 data in Mongo?

Our system has users but we want to perhaps allow some users to be able to use our API service. I'm looking at using OAuth2 for authorization. As it's going to be (trusted) machine-to-machine access I ...
20
votes
6answers
2k 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 ...
4
votes
2answers
111 views

Is it smart to use an API on the same server as your web application

Im new to RESTful API's and would like to find some info out. Currently we run a daily digest of eHealth material for the public to read and get up to date content regarding that topic. Which is ...
1
vote
1answer
304 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
268 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. ...
3
votes
2answers
115 views

How to represent object references in JSON?

I am trying to figure out what's the best approach when dealing with object references in a JSON to be sent to my server for deserialization. To clarify, what I mean is how to refer to data contained ...
0
votes
1answer
74 views

Backend as a service or deploying my own backend

I currently have a web application running with my own backend, but maintaining it is becoming a bit painful so I was considering the option of using an existing BaaS (Firebase). The main problems I ...
1
vote
2answers
171 views

API Design: Should I use strings or an enum for dictionary keys

I am working on an API in C#. I am trying to think about the simplest way to expose my API for consumers of it. In particular, I have a class in my exposed data model that has a dictionary property. ...
0
votes
0answers
15 views

Using JWT over Oauth2.0

I am creating an API that will communicate with a ReactJS app. I am in two minds whether to go through with the implementation of OAuth2.0. The question is why should I use OAuth2.0 implicit grant ...
14
votes
3answers
5k views

Is it actually worth unit-testing an API client?

This is something that's been troubling me for a while now. Is it actually worth unit-testing an API client? Let's say you're creating a small class to abstract-away the calls to a petshop REST API. ...
1
vote
0answers
56 views

Two classes which are supposed to be the same, but differ in lists

I am using a 3rd party API which yields JSON which has two ways of loading data - as a list of items, or as a singular item. The problem is that a given item in the list has different properties than ...
0
votes
1answer
57 views

Best way to update driver data from userspace

I have a userspace application which interacts with a kernel-space driver in a Linux environment. The driver, in this case, is an LED driver. In typical *nix fashion, the driver exposes a file in /sys/...
-1
votes
1answer
112 views

Using sessions with Jersey in a REST API

I am starting to develop a REST API with Jersey to retrieve a schedule for a given sport tournament. The client sends a JSON containing a tournament with its different categories, domain, definitions ...
0
votes
1answer
43 views

Building an API with one central connection object to an external device

I want to build an API (Java) that heavily relies on a connection object to a data server that manages a connection to a real device. All i have is a DeviceConnection object. Currently i have a big ...
4
votes
2answers
253 views

Is it bad practice to use hyphens in JSON keys?

I see a lot of questions revolving around accessing JSON keys that use hyphens (kebab-case), but now I find myself wondering should I just stick to camelCase or snake_case in my keys. I know hyphens ...
8
votes
3answers
171 views

In REST parlance what is the difference between a resource and a representation?

My understanding of REST that is enables modelling service operations as representation of state and transition from one state to another making use of HTTP. I have always understood resources as ...
0
votes
1answer
60 views

Creating an API for existing products

Lately I've been searching for information about creating API's. The company I work for wants to sell some of our products as stand alone devices. Currently these products work inside enormous ...
1
vote
0answers
42 views

Building back end for iOS/Android app using Django and Heroku

Background: I'm currently building a music streaming app (many requests per second) for a friend and am second-guessing my approach to it. The plan is to have an iOS app and an Android app, though I ...
0
votes
2answers
147 views

What is it exactly that makes programs platform dependent when they're using cross-platform APIs?

I understand that programming languages can either be run in a VM (Java, etc) on every OS that supports the VM natively or can be compiled to machine code (C, etc) for each platform. What I don't ...
2
votes
1answer
40 views

In SemVer 2.0.0, what kind of public API change category is the addition of a new exception?

I am working on an implementation for an existing public API. Now I needed to change the implementation to throw an exception for a failure condition about which previously the API consumer was not ...
2
votes
3answers
130 views

Correct RESTfull way to refresh a resource

Imagine we have resources like reports. We have a collection because every report contains its own settings to build some data. Every report calculates its values on regular basis but not to often. ...
1
vote
2answers
40 views

Message vs ErrorMessage API design

I'm desing API for generic task executor that currently supports two calls: Accept task Get task info The (2) provides detailed information about the task with the task status and custom message, ...
6
votes
3answers
14k 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
2answers
138 views

Warnings in a REST API as not critical errors

I have a REST API that for some of entpoinds like DELETE, POST or PUT I have some validation rules that can return an error. Now I need a new type of an error like a non-critical error, that it ...
0
votes
1answer
49 views

Splitting API and Implementation among packages/jars

I have a dilemma. How to do better? I have a bunch of API interfaces and their implementations which use some specific frameworks/librarys which I would not like to expose. I cannot make a decision ...
0
votes
0answers
35 views

How to manage Permissions for an api

I have a question about permissions and roles in an application. Let's assume app.get("/users",hasPermission("user:read"),...) and I have a lot of these calls and then a lot of permissions. How do I ...
7
votes
2answers
126 views

How to work with/around an API that does not return errors?

I am currently working on a project which requires data fetching from a 3rd party closed API (over SOAP). Currently I'm in a situation where I have to do argument and data validation inside our ...
3
votes
3answers
97 views

Is it possible to call a function or a script with a REST API?

Let us say that I want to create a workout app and a website, the user enters his workout stats and the app display his stats with graphs percentage and such. This is an example I don't want to ...
7
votes
2answers
150 views

Prevent abuse to REST API endpoint

Question 1 I have a login API endpoint http://127.0.0.1:8080/api/account/login It checks if the phone number has been validated. If not it will call POST http://127.0.0.1:8080/api/account/sendsms ...
2
votes
0answers
51 views

Best way to build a JSON API coupled with HTML views in a Rails project

I've got a Rails eCommerce project communicating with an iOS app. The iOS app receives JSON data from the Rails back-end, but there's also HTML rendering when a user comes to the project from his ...
5
votes
2answers
368 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 ...
4
votes
1answer
115 views

API Server Client Setup

Suppose you have a setup where there is an API Server and all interaction revolve around the API. There is the admin, public and third party components that interact with the API server. Suppose we ...
0
votes
0answers
31 views

Develop an API within ESB to access a database

I am working with a service provider where I need to get data from their service. The service provider wants to give me access to their database to get the data I need. My question is should I ...
1
vote
1answer
29 views

Rate-Limiting in an OAuth REST API: per token or per consumer?

I am building a REST API and intent to use rate limiting (using the leaky bucket algorithm) as a way to protect against crawling and enumeration. The API will be consumed by a Mobile/Tablet App (...
0
votes
0answers
52 views

Looking for pros/cons on using OWIN vs. a simple hand-rolled token based auth

We are wanting to implement an API to be used internally and externally and add it to our solutions. Some environment notes: We are currently using VS2013, .Net 4.5, EF5, SQL2008, MVC4, C#, and asp....