[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Web services revisited
- Subject: Re: Web services revisited
- From: John Locke <..hidden..>
- Date: Wed, 23 May 2012 07:59:35 -0700
On 05/22/2012 07:06 PM, Chris Travers wrote:
On Tue, May 22, 2012 at 12:27 PM, John Locke<..hidden..> wrote:
Possible Index handler:
I had a thought about this one. Suppose we allow a by= field to
specify a non-standard id key? In that case, your URL would look like
The desired result would then be to get a redirect to the the cannonical URL.
I am thinking that this avoids issues like:
In that case instead you'd do:
Capture the redirect address
You could then either do a redirect and add the extension or pursue
the redirect with the content type header.
Note, by would only be valid where the field is a valid secondary key.
The modules would be responsible for enforcing this.
Cool idea, but I'm not sure it's something I would actually use. On the
client side, I need a unique key for each object -- that might as well
be the same one as LSMB uses -- and I would rather have a single,
canonical URL for each object.
So redirects to that are good, if they don't break other expectations.
And implementing a service, it's easy to assume either individual
objects if I have what looks like a resource path (e.g. with an id) or
So I would say this is fine, but not something high on my list or would
likely use. It's just as easy to do an index lookup with the search
parameters for other keys.
The biggest question I would have would be around the defaults. For
example, on the AR transactions screen, a search by default only shows
open invoices. However, a search by invoice number does return closed
invoices even when the "closed" button is unchecked. This is a very nice
feature for usability, but it's also somewhat unexpected. Should either
document these exceptions very clearly, or remove them from the web
service -- perhaps default to returning all invoices, and force a web
service to specify open if that's all they want?