Tagged Questions
0
votes
1answer
68 views
How to get different resources in a single endpoint in RESTful?
I have a REST webservice that have a couple of resources, like Company and User. But now I need to make a modification to the API to return a special list combining company, user and maybe other type ...
4
votes
2answers
107 views
Custom functions in a REST API
Looking at two of our entities Company and Address. A company has a billingAddress and a profileAddress.
I'm unsure of how to implement a function to set the billing address versus the profile. Here ...
2
votes
2answers
138 views
RESTful URI's, Creating a new noun/uri or add a queryparameter
I have a Person class with a one to many relationship to Employment. A Person in the CRM can have multiple Employments (historic data).
My current REST URI for this class looks like this:
...
0
votes
2answers
144 views
How does API design differ from general web application development design? [duplicate]
If I was working on a web application designing and writing an API how does that differ from a general web application development?
What things would I need to consider and take into account? Are ...
19
votes
8answers
1k views
“Public APIs are forever: Only one chance to get it right”?
In an OS book I just read that, "Public APIs are forever: Only one chance to get it right". Is it true? Is it applicable only in APIs of Operating Systems or other APIs too? For example, will this be ...
8
votes
1answer
482 views
What API design for storing generic data in a more specific format?
for In the project I am working on we send messages about widgets over message queues, serializing them onto the queues as XML. The XML schema contains tags for properties that are common to all types ...
4
votes
1answer
252 views
When to use nested resources in a RESTful API
I have two resources: users and links.
Users can have several links associated with them. I have designed my RESTful API so that you can reach the links associated with a user at the following URI:
...
4
votes
2answers
416 views
Implementing the command pattern in a RESTful API
I'm in the process of designing an HTTP API, hopefully making it as RESTful as possible.
There are some actions which functionality spreads over a few resources, and sometime needs to be undone.
I ...
0
votes
1answer
124 views
Rails-API gem, Is there such thing as an API only application?
I've built a few API's using the complete rails stack. In each project there have been multiple uses for rails core features. Each of the API has had management screens for monitoring usage, managing ...
6
votes
3answers
189 views
Does a mobile app need more access than the public API of a site?
I have a site with a public API, and some mobile app developers have been brought in to produce an iPhone app for the site. They insist they need to see the database schema, but as I understand it, ...
1
vote
1answer
137 views
RESTful API design - should a PUT return related data?
I have an API which allows a user to update their system status; and a separate call to retrieve system status updates from other users. Would it make sense to unify them under a PUT request where a ...
4
votes
1answer
562 views
Authentication for users on a Single Page App?
I have developed a single page app prototype that is using Backbone on the front end and going to consume from a thin RESTful API on the server for it's data.
Coming from heavy server side ...
3
votes
1answer
164 views
When designing an enterprise API, what level is appropriate for separating libraries?
Assume we are developing a REST system for an enterprise company to expose the companies resources in a Java based application. Ultimately you have one web application, and domain libraries. My ...
7
votes
1answer
239 views
How To Handle Login For An Unofficial API?
I am building a tool to access some data on a site (Fitocracy) and I would like to turn it into an unofficial partial API, as no official API exists.
If you are not logged in, you cannot get access ...
5
votes
3answers
251 views
How do I assess tradeoff between robustness and “lazy” code in API design?
Postel's law:
Be conservative in what you do, be liberal in what you accept from others.
"Lazy" code (per The Pragmatic Programmer):
Be strict in what you will accept before you begin, and ...
2
votes
3answers
315 views
One or many RESTful APIs for large company?
I work for a large company which has several non-RESTful APIs. I am tasked with building a web application to interact with these APIs. Each API handles and provides very different business processes ...
2
votes
4answers
309 views
Should an API platform enforce only receiving JSON requests?
I am building an API platform.
I have already ensured that the platform always returns JSON responses.
My question is
Should my API platform enforce the rule that all requests must be JSON?
What ...
1
vote
1answer
377 views
Securing Back End API for Mobile Applications
I have an application that I am writing for both iOS and Android; this application will be served by a ReSTFUL API running on a cluster of servers on "the internets". I am curious how the rest of the ...
2
votes
1answer
339 views
Designing A 2-Way SSL RESTful API
I am starting to develop a WCF API, which should serve some specific clients.
We don't know which devices will be using the API so I thought that using a RESTful API will be the most flexible choice.
...
27
votes
3answers
1k views
What's so bad about the DOM?
I keep hearing people (Crockford in particular) saying the DOM is a terrible API, but not really justifying this statement. Apart from cross-browser inconsistencies, what are some reasons why the DOM ...
1
vote
1answer
132 views
Request / Reply , how should one initiate the actual sending of the transmission?
I'm working on Language level interfaces to web API's. These libraries are of course built around existing HTTP Request/Reply interfaces. I see myself as having a few options
submit method on the ...
3
votes
3answers
264 views
API method placement guidelines?
Are there any guidelines for placing methods in API when the placement isn't obvious?
Example: I have classes A and B and a method X. The work being carried out can be phrased in two ways:
A does X ...
3
votes
7answers
349 views
Better name for existsByUserNameAndPassword()
I wonder if there is a better name for a DB API function called existsByUserNameAndPassword() which returns boolean. There are more function called like this: existsByOldId()... It sounds a little bit ...
6
votes
4answers
1k views
How best do you represent a bi-directional sync in a REST api?
Assuming a system where there's a Web Application with a resource, and a reference to a remote application with another similar resource, how do you represent a bi-directional sync action which ...
3
votes
1answer
437 views
Mask oAuth API key and token for pure client-side technologies
If I were to build a Twitter or Facebook application using pure client-side technologies like HTML and javascript, how would I mask/hide my API keys?
For example, for Twitter I have consumer key and ...
4
votes
3answers
195 views
Creating a webservice API - how much “credit” should I give the client/developer
When creating a web service API, how much should I count on the developer to act by my rules?
We are really aimed on creating an API so the developers shouldn't develop client side logic too much...
...
1
vote
4answers
188 views
API naming and namespacing
Is it right or more beautiful to name the functions with an prefix, like in Qt? Or using "many" namespaces, but 'normal' names for functions?
For example,
slOpenFile(); //"sl" means "some lib"
vs
...
3
votes
1answer
166 views
What are some good Photo and Artwork APIs?
We had an idea for starting a ecards service and were looking into the possibility of populating our site using photo/artwork APIs. Due to legal reasons, Flikr probably won't work, although I've ...
5
votes
7answers
334 views
Why do certain code elements (classes, methods etc.) in public APIs get deprecated over time?
Today our professor discussed with the class that what "class X or method X get deprecated" means? From what I understood, it means, for example, that we are not going to get that method or class in ...
3
votes
2answers
270 views
Strategy for designing a plugin API
I am working on an application for which a rich plugin API is crucial. What is the best process for creating an API that is intuitive and easy to learn?
3
votes
1answer
347 views
Application internal API
I am currently building a small python CLI (Command Line Interface) application with ambition. In the first development phase I would concentrate on making it work through the CLI interface only, but ...