[Catalyst] General API question: REST + SOAP

Peter Edwards peter at dragonstaff.co.uk
Wed Apr 6 14:13:22 GMT 2011


On 6 April 2011 14:59, Bill Moseley <moseley at hank.org> wrote:

> I'm wondering if anyone has provided both a REST-like API and a SOAP API =
to
> their application and can provide some feedback from their experience.
>
>
Hi Bill, we had to do the reverse of that (for a Perl app that wasn't using
Catalyst) and added a REST API on to a SOAP one.
I think a direct mapping of SOAP actions -> REST methods is your safest bet
for keeping it intelligible and maintainable.
SOAP is a four letter word, of course :-]


> Also, does anyone have a suggestion how to version an API?  That is, say I
> have an API method POST /foo to create a new Foo object.  Would it be bet=
ter
> to use something like POST /api/rest/version_2/foo?
>
>
Yes I've used the /api/v1/foo  /api/v2/foo approach before and it works well
and makes it easy to separate out old APIs for regression testing when you
add new stuff.

Regards, Peter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20110406/a0d00=
903/attachment.htm


More information about the Catalyst mailing list