An application programming interface (API) is the specification for which software is meant to be used by other software.

learn more… | top users | synonyms

3
votes
0answers
14 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 ...
-3
votes
0answers
33 views

Where to store API Token, Passwords etc [on hold]

So I have an webpage. That webpage accesses an API be it with basic auth, oAuth, Digest, whatever. I have to send over some sort of authentication to the API endpoint. Is storing those credentials in ...
5
votes
1answer
59 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
0answers
11 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
votes
0answers
23 views

Which Maps API should I Choose [on hold]

I am doing a research to find the best fit for my requirement, which I think is quite easy.Here are my requirement a) I want to find the distance between two [lat,long] b) Calculate and give the ...
-1
votes
0answers
29 views

Expired domain APIs [closed]

I'm looking to see if I can locate some domain API's to allow me to search for keyword related expired domains. I have some of them like domainsbot, domainr, and a couple of others. But those seem to ...
3
votes
2answers
149 views

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

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
100 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
42 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
25 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 ...
0
votes
2answers
64 views

Difference between Throttling and Rate limiting in API Management

What is the difference between Throttling and Rate limiting in API Management?Suppose if we want to limit the number of requests for an API,we can choose Throttling.But why we need to go for Rate ...
3
votes
0answers
91 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
94 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
39 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
60 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
86 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
89 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
90 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
98 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
42 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
55 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
16 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
53 views

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

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. ...
1
vote
1answer
38 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
29 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) ...
5
votes
1answer
186 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
437 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 ...
1
vote
0answers
56 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 ...
2
votes
1answer
98 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 ...
1
vote
0answers
56 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
77 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 ...
2
votes
2answers
126 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
67 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
323 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
111 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
85 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
105 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
124 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
274 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
36 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
62 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
1k 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
72 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
633 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
82 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
244 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
47 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 ...
1
vote
0answers
148 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
94 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 ...