Tagged Questions
14
votes
3answers
405 views
Does decoupling trump DRY in REST?
I am building a REST API to expose most of functionality of an existing Java API. Both APIs are for internal use within my organization; I do not have to design for external use. I have influence ...
13
votes
4answers
7k views
Web api authentication techniques
We have a asp.net MVC web service framework for serving out xml/json for peoples Get requests but are struggling to figure out the best way (fast, easy, trivial for users coding with javascript or OO ...
11
votes
2answers
2k views
How should an API use http basic authentication
When an API requires that a client authenticates to it, i've seen two different scenarios used and I am wondering which case I should use for my situation.
Example 1. An API is offered by a company ...
8
votes
3answers
306 views
How to do external API testing (blackbox)
Assume you are using APIs from a vendor, how to make sure their API is working as expected?
My main concern is sometimes the vendor pushed the changes to their code and break the API, we want to have ...
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 ...
6
votes
1answer
188 views
REST API rule about tunneling
Just read this in the REST API Rulebook: GET and POST must not be used to tunnel other request methods.
Tunneling refers to any abuse of HTTP that masks or misrepresents a message’s intent and ...
5
votes
5answers
997 views
RESTFul: state changing actions
I'am planning to build RESTfull API but there are some architectural questions that are creating some problems in my head. Adding backend bussiness logic to clients is option that I would like to ...
5
votes
3answers
355 views
What is the need for 'discoverability' in a REST API when the clients are not advanced enough to make use of it anyway?
The various talks I have watched and tutorials I scanned on REST seem to stress something called 'discoverability'. To my limited understanding, the term seems to mean that a client should be able to ...
5
votes
1answer
415 views
API Auth vs User Auth
I have read many posts and articles on this topic but still cant connect the dots. I want to make a Rails app that is strictly a JSON API maybe using Sinatra or the rails-api gem. I also want to make ...
4
votes
6answers
708 views
Testing a REST client against a REST Server. How to do fixtures?
When writing unit tests, it's common to use fixtures: little testable data, so we can say:
1. Get all clients should include Willy Wonka.
2. Delete client 3, and now get clients should not include ...
4
votes
2answers
308 views
Trailing slash in RESTful API
I have been having a debate about what to do with a trailing slash in a RESTful API.
Lets say I have a resource called dogs and subordinate resources for individual dogs. We can therefore do the ...
4
votes
2answers
395 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 ...
4
votes
1answer
213 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
1answer
130 views
Is there a standard for machine-readable descriptions of RESTful services?
I've interacted with a few RESTful APIs that provided excellent documentation for humans and descriptive URIs, but none of them seem to return machine-readable descriptions of themselves.
It's not ...
4
votes
2answers
104 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 ...