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
3answers
65 views

REST POST method design: query/form parameters vs. encapsulating content messages

I am designing a REST API and facing a choice of formatting my POST methods to absorb parameters free-form via query string or content parameters: POST /my/api HTTP/1.0 paramOne=XYZ&paramTwo=ABC ...
36
votes
3answers
6k views

What is the present-day significance of SOAP

Last I encountered a SOAP based service was during my internship in a financial firm in 2013. That was the time when I started my career in IT. I remember having some study material about SOAP in one ...
0
votes
0answers
50 views

How to use two dependent APIs in one application

I spent the last hour reading meta if my question fits better to SoftwareEngineering or StackOverflow. I ended up that this is the place. I am on start of developing a website (and then a mobile app) ...
3
votes
2answers
119 views

RESTful API communication between multiple web servers

I'm trying to understand RESTful communication, but I still have a few doubts. I have a main web application (on the right side of the Architecture) made in AngularJS, which shows data coming from ...
0
votes
0answers
112 views

Should I avoid using CORS if possible?

I'm writing an API that will interface with an SPA front-end. For simplicity I currently have the API at api.example.com, and the SPA itself is at example.com. I have CORS set up and everything is ...
0
votes
1answer
57 views

Is it relevant to use Http Error Code within my “Application”

Is it acceptable to use Http status codes (.NET HttpStatusCode enum) in my application instead of creating a new enum ? I encoutered an issue (design issue?) in my API, for example in the ...
4
votes
2answers
180 views

Is it bad practice to generate ids for an object that does not yet exist in the database?

Here is the situation: There is a Mongo database A and there is Mongo database B. There is a business concept/Mongo object that is called someModel which exists on one of database B's collections. ...
0
votes
1answer
66 views

Efficient algorithm for finding the breaking point between two entries

I've got an API endpoint which looks like this: http://foo.bar/rest-method/{identifier}. This API returns an object that looks like that: { name: "Example", version: "1.0.5.3937" } Now I ...
7
votes
2answers
114 views

Is repeating an identifier on an API request and response considered a code smell

Is it weird to have an identifier such as (_id) on a request which you send to the API, which "enriches" the request and sends back a response with the same identifier (but obviously more enriched ...
4
votes
2answers
98 views

Where should HTTP calls resides in a layered architecture?

I have a client which depends on data fetching from two different domains. Client fetches the data from Domain "A"'s API layer and Domain "A"'s Data Depends on Domain "B" There is an implementation ...
-1
votes
0answers
20 views

How to get a (playable) URI from SPTListPage class in spotify ios API

I am using the Spotify iOS API. I am using the SPTYourMusic class to retrieve the saved tracks for the current user. Upon retrieving the tracks, the API response returns an SPTListPage. Here are the ...
1
vote
2answers
119 views

Creating abstraction over API

I'm trying to figure out how to create abstraction over different APIs, which have common things. For example let's take the mobile platforms you have Android, Windows Phone and IOS. Let's say I want ...
4
votes
4answers
235 views

Evolving an interface that is not supposed to be implemented by the client

I'm about to write a Java library. Basically, this library provides something like this to its user: interface Foo { void doA(); boolean aWorked(); void doB(int value); } The user is not ...
0
votes
0answers
13 views

B2B API Appropriate level of authorization

We are in the beginning phases of an effort to expose our data via API to our business partners. There is a discussion going on about how to best authorize use of the API. Specifically, do we ...
-1
votes
0answers
44 views

Lazy loading (Paging) data from external API [closed]

I am writing a mobile app and I am currently making design decisions about fetching data from the server. Description: A single data item fetched from the server can be seen as an object with ...
3
votes
1answer
132 views

How to consume external RESTful API with Symfony?

We are building a Microservice architecture for our projects, with mostly front-end Symfony applications interacting with back-end RESTful APIs. The problem is this approach is breaking the Symfony ...
0
votes
1answer
45 views

Can one use the Google Maps API to nest polygons and navigate by them?

Google Maps API lets one use polygons to create shapes on a map. What I wish to do is nest these polygons, and use them to describe data which can then be used for navigation. Let's say that the ...
5
votes
2answers
121 views

Efficiently consuming a rate-limited service

So my exact case is that I have ~1400 domains on an ancient, self-hosted bind server and I'm looking to migrate them to a hosted service. The trouble is that the hosted service's API has a rate limit ...
0
votes
1answer
119 views

How to handle JWT expiry in Laravel 5.3?

I am developing a mobile application back-end service using Laravel 5.3. I am following the REST API. The application has payment gateway integration and it needs more security. I followed JWT auth ...
0
votes
0answers
18 views

How should I structure an iPhone based offline Cache for OData?

I have an OData web service that I need to create an offline cache API for. This class will be leveraged by an offline-capable mobile client (iOS/Android/HTML5). One option would be a class that ...
0
votes
1answer
29 views

REST API crossresource operations structure

I'm wondering what's best practice in next use case: I'have a view that displays data for 3 resources User, Company, and CompanyType (chosen in select, can be added dinamicaly so it's not enum). What ...
0
votes
1answer
41 views

What is a good REST convention for the structure of a response that is just a container of two (or more) unrelated entities

Let's say I have the following entities that can be accessed at the following URIs (using the standard pluralization): /things/:id and /otherthings/:id I want to expose for performance reasons, an ...
1
vote
2answers
219 views

Fully API-based website - is it a good idea?

I sometimes hear about making web-site fully API based, meaning that even in browser the page is constructed based on API endpoint and practically nothing else. One of the benefits I see in this is ...
4
votes
5answers
140 views

Should a method that simply delegates to a constructor be created?

For example, if I have a method public void method(Pair<String, Object> pair){ ... } Should I create the method public void method(String str, Object obj){ this.method(new Pair<>(...
0
votes
0answers
54 views

When splitting a Node.JS server between model and controllers, who should tranform the data for the database to understand?

I have a node.js server for an API that is split between controllers and models (there is a router which is autopopulated on runtime). So for example here is a classic end point for fetching config ...
1
vote
2answers
40 views

Internal API - Some larger generic methods, or many very specific methods

I'm building a web API that is going to be consumed by several internal systems. Naturally the different systems have different requirements. The consumers may create change requests to the API, when ...
0
votes
2answers
90 views

validation error responses in REST API

I'm designing a RESTful API and wondering what's the best format for validation error messages. For example, my account creation endpoint accepts a JSON object: user: { first_name: string, ...
1
vote
5answers
208 views

Should a client check for valid parameters?

I'm writing a Java client library for a simple API service and I was wondering how much should I be strict for invalid values. For example for an endpoint a parameter should not exceed a certain ...
2
votes
3answers
89 views

Which REST API URI should be used for querying a relation to a single model object?

I am developing a REST API for a user management service (being used by other micro services). My model contains the types User and Server among others. Server to User relation is many-to-one (each ...
1
vote
2answers
91 views

Single Web API endpoint for all entities, good or bad?

Situation We are currently developing a large web application (Web API 2) - several entities and thus require several endpoints for each. But suddenly, they changed to "one endpoint fits all" ...
2
votes
2answers
86 views

Testing an external API that's in beta state

Our company is using an external API that is actually in beta state. This means it's not stable at all yet, and it changes its requests/responses every week or so. I'd like to write test to ensure ...
1
vote
0answers
44 views

AJAX request vs redirection during long API calls

Let's consider this scenario, I have a form, I need to post this to the backend and use data from this form to perform multiple webservice API calls. These API calls could be payment processing calls ...
1
vote
2answers
185 views

Why is it CRUD instead of GRAS? [closed]

Why is it Create Read Update Delete instead of Get Remove Add Set ? I've been working with an API that uses ADD and SET and REMOVE. Most accessor functions are named get...() and set...(). I ...
5
votes
2answers
121 views

Good practice for status code returned by restfull API when validating a token

I am working on client JavaScript SPA and a restful API on HTTPS. Client application needs to call a public endpoint (no token required) in order to valid (GET) a specific TOKEN previously remember ...
0
votes
1answer
90 views

RESTful API conventions

I have an API that generates a resource randomly when requested. What path could I use that would follow REST conventions? A - /generate/random.png B - /generators/random C - ? Should I place all my ...
1
vote
0answers
28 views

How to handle an api with severe technical debt? [duplicate]

Our company uses another companys api. This api is written using IBM domino. This api is horrifically inconsistent and outdated. E.g. sometimes returning JSON, sometimes html. Inconsistent naming and ...
0
votes
1answer
80 views

External Reasons an API call might fail?

I'm currently in the process of developing my first API. This is a private api that will send information back and forth between my two sites, not one that will be open to the public. I'm working on ...
0
votes
0answers
32 views

Web, REST, SOAP, etc., API dependency discovery

I am not sure what the correct terminology is as I have not seen this topic discussed in any articles. Often to call an API one must find the number of parameters from another API/service etc. My ...
0
votes
1answer
69 views

Need my mobile application to connect my website, will this method be better than using an API?

I want my mobile app to connect to my website to get/post data from and to the database, respectively. I was looking up RESTful APIs (which I don't really understand how the file writing and ...
1
vote
3answers
136 views

Handle backward compatibility on API changes

I have an API which allows me to communication with a device. The communication protocol is stored in a JSON file. It list the events that the device can raise, the functions, the frames format, etc. ...
1
vote
1answer
126 views

Securing a private API

I have two sites and an API that sends data back and forth between the two. The API is only used on the back end, and the user will not interact with it at all. What I would like to do is ensure that ...
0
votes
0answers
74 views

URL API design considerations and REST action

We have a cart and cart has line items, now line items can be products, discount coupons, rewards and promotions. I am looking for some inputs in design consideration here. The backend is in Ruby on ...
0
votes
1answer
84 views

API Response codes standardization (Best practices)

I want to create generic response codes, for an API that I am developing. Now I know there are HTTP response codes that are usually recommended to be used, but my API will be handling multiple USSD ...
55
votes
7answers
5k views

What HTTP status code to return if multiple actions finish with different statuses?

I am building an API where the user can ask the server to perform multiple actions in one HTTP request. The result is returned as a JSON array, with one entry per action. Each of these actions might ...
0
votes
2answers
129 views

Decision that drives use of a Front Technology like Javascript for server side tasks

I have created a Project in Java which helps generate HTML's from an Excel Sheet & a template file. I am trying to understand, if I want external users to use this facility from an external ...
1
vote
1answer
54 views

Batch Rollback best practice

Context: We have 2 servers (internal and external) that have to hold identical data and remain in sync the entire time. Our internal system is like a local cache and we allow read/writes to the data ...
0
votes
2answers
81 views

Secure REST APIs

I am building Rest APIs for iPhone aap in PHP framework Codeigniter. Please let me know how can I ensure that the API is accesible via app only. Means if anyone wants to access the APIs outside from ...
2
votes
0answers
88 views

How to model an Admin View on a ReST API

We have a more or less "typical" ReST API that allows clients to interact with a bunch of resources, let's say Maps and Devices. An authenticated client can get a list of maps, it can download a map, ...
0
votes
1answer
49 views

REST API - Eager loading nested resources

I would like to know if I am correctly eager loading nested resources in my API. In my app, companies can have many technologies, and tools. The relationship is stored in the join tables ...
0
votes
0answers
34 views

Simplest way to authenticate clients of my application to my server?

I am building a chat client on Salesforce's platform which will require that clients authenticate themselves somehow so they are the only ones who can send messages as themselves, as opposed to anyone ...