An application programming interface (API) is the specification for which software is meant to be used by other software.
0
votes
1answer
54 views
Do I need to create a separate project if I am consuming my own API?
If I have an API and I am the one consuming it, should the front-end be a separate project? I'm using Visual Studio ASP.NET Core 1.x.
0
votes
1answer
40 views
How can I safely expose web API endpoints for user-private data?
I'm building a web application wherein users CRUD their own private data.
Can I safely expose API endpoints?
Despite years in-industry and endless web-research, I'm not clear on the best ...
3
votes
2answers
86 views
What should I think of when making an internal API public?
An internal API I've built will soon be consumed by a third party.
Should I open the current internal API to the public, or should I create a new API endpoints for external access?
6
votes
1answer
162 views
RESTful API and i18n: how to design the response?
We are designing a RESTful API that is mainly intended to meet the needs of a single client. Because of its very particular circumstances, this client has to make as few requests as possible.
The ...
0
votes
0answers
35 views
Should I save password in Android Account Manager?
I am creating a website with accompanying Android app. Users should be able to login to multiple devices as well as the website so there will need to be account synchronization.
I plan on using ...
4
votes
0answers
48 views
What is the best way to store and manage client <> server <> server and back session information and authorisation?
I have scenario, where I have javascript front-end connected using AJAX communicating with Django-Rest-Framework backend. Users authenticate using JWT tokens. Backend is acting as chatbot and ...
3
votes
1answer
82 views
API versioning, where to point unversioned API
I always see the discussion when there's an API version in the URL where to point the versionless one.
I mean look at these three URLs.
http://host/api/customers/1
http://host/v1/api/customers/1
...
3
votes
1answer
194 views
RESTful api and nested resources
Having built a RESTful API (using Laravel) for a project at work, I followed what seemed (from lots of reading) to be a the majority in terms of my approach to nested resources - by defining them in ...
3
votes
2answers
123 views
RESTful API with session tokens.. ehh?
After looking at a lot of session/state debates with regard to REST and finding nothing concrete, I'm just going to cut to the chase and ask myself.
Developing a RESTful API as a backend for a mobile ...
1
vote
5answers
147 views
Define a RESTful API for creating/updating other resource definitions?
Let's say I have a users resource, with two properties: name and email as specified by a users JSON Schema document, which right now looks like this:
{
"$schema": "http://json-schema.org/draft-04/...
-2
votes
0answers
43 views
What are some considerations to switch from JSON to Protocol Buffers in developing Android/iOS apps? [closed]
i’m currently doing research on JSON alternative, such as Protobuf or FlatBuffers in the context of developing mobile apps. I would appreciate other opinions from anyone that using those on production....
4
votes
0answers
54 views
GraphQL - Should I expose link tables?
I am experimenting with converting an API to GraphQL, and I have a database that has many-to-many relationships that are stored via link tables; something like this:
CREATE TABLE accounts
(
id int,
...
4
votes
4answers
114 views
API divided into REST and SOAP parts and design patterns
I need to work with some payment gateway API. The API is divided into two parts. There are some methods based on REST and a few methods accessible through SOAP webservice. I would like to create some ...
4
votes
1answer
38 views
Removing unnecessary data from a User object in API
I have many Users for every Group. Each User has an array of objects in the following form:
User.groups
[
{
"name": "My Group",
"group_id": "1337xD",
"is_admin": true
}
]
...
-1
votes
1answer
71 views
How to manage authentication for internal and external API? [closed]
What I mean by Internal and External API's:
Internal API: will be used by my front-end Apps (Web or Mobile).
External API: will be exposed to developers in order to integrate with my API from their ...
2
votes
2answers
119 views
Should failed results be errors or data in RESTFul?
Assuming I have a RESTful service and it always responds in this format:
{
"error": {
"code": ...,
"message": ...
}
}
or
{
"data": ...
}
and there is a method like ...
0
votes
0answers
47 views
Has Anyone Included Consuming WADL in .Net Yet?
Most answers I see online are "You don't need a contract to consume RESTful services". But currently, consuming endpoints is one of the biggest time commitment issues in our .NET environment. Oh how ...
1
vote
1answer
99 views
ASP.NET Web API: enum or strings
I have an ASP.NET Web API application. It uses enums for some fixed sets of states or types. Now I need to extend enum to support more values. But it will break backwards compatibility so I need to ...
-1
votes
1answer
49 views
Sql server to PHP (api vs library)
Our agency is currently using and maintaining the CMS we have developed in .net MVC on SQL server.
Since the cms is highly optimized and uses various cache tables to run very fast even with thousand ...
12
votes
3answers
2k views
Is it normal design to completely decouple backend and frontend web applications and allow them to communicate with (JSON) REST API?
I am creating new business web application and I want to achieve:
Use the best technologies from their respective realms. I want reliable backend framework with solid ORM. And I want the most ...
3
votes
1answer
83 views
Should an API strip whitespace in user content?
Let’s say there is a REST API which allows users to create objects. These objects have a name. The name doesn’t need to be unique among all objects and doesn’t have any special meaning within the API. ...
2
votes
1answer
115 views
Object design for REST result, including error handling
I'm not sure what the best design is for returning an object that can both return a result for successful REST calls, or failed REST calls.
I'm currently thinking of something like this (written in ...
3
votes
2answers
120 views
Is using REST consumed by a Javascript framework on the front-end the same as using microservices?
I have a monolithic application. It is MVC, PHP, all on one server. It does get copied to another server or replicated. There are also older web pages that connect to databases that aren't related ...
5
votes
1answer
214 views
Some doubts about a proper REST API design
I'm building a Json REST API for my application, and have some doubts about the design itself. My application has organizations and also equipment which belongs to organizations. That would be an ...
2
votes
1answer
54 views
How to name method specific DTOs representing the same entity?
I'm building a Web API. To give meaning to my controller methods I want classes that specify what properties are used for each particular operation. This would make the code easier to understand, and ...
2
votes
2answers
428 views
Is a protocol an application?
Basically, I was debating in my head how an API and a protocol are different. After thinking about it, I come my newbie conclusions that I believe they are pretty much the same, except that protocols ...
1
vote
3answers
104 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¶mTwo=ABC
...
41
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
65 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) ...
4
votes
2answers
178 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
120 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
63 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
189 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
68 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
116 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
105 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
vote
2answers
134 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
245 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
15 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 ...
5
votes
1answer
327 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
80 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
122 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
282 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
19 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
42 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
52 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
245 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
64 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
41 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 ...