Supporting REST with parameters in URL path?

LabKey Support Forum (Inactive)
Supporting REST with parameters in URL path? Ben Bimber  2014-07-03 09:17
Status: Closed
 
I am exploring whether I can write something to support this API in LabKey:

http://gmod.org/wiki/JBrowse_Configuration_Guide#JBrowse_REST_Feature_Store_API

It's an API to provide information about sequence data that would be stored in LabKey. The data is sent as fairly simply JSON, and overall it seems straightforward with one problem. JBrowse expects to pass parameters as part of the URL path, rather than as query arguments. ie:

(base)/stats/region/(refseq_name)?start=123&end=456

which is in contrast to what LabKey more naturally expects:

(base)/getSeqData?action=stats&region=(refseq_name)&start=123&end=456

Is there a good way to do the former in LabKey? I'm in java code, so all options are open. I would be making a separate module/controller, so if it were possible for my controller to hijak the process of resolving URLs very early, a form like this might work:

myserver.com/jbrowse/../../../?containerPath=XXXX&...

Have other applications needed to do something like this? Does anyone have pointers on where I should start looking? Thanks in advance.
 
 
Greg Taylor responded:  2014-07-10 15:18
Hi Ben,
We discussed this message in a regular meeting - it seems like a great idea but we don't currently support it. URLs are handled at a low level within LabKey and we don't have an easy way to implement the change. Kevin suggested that you use a separate servlet to translate URLs before sending them to LabKey.
Hope this helps,
Greg