HTTP selectRows.api with particiapnt group filter

LabKey Support Forum (Inactive)
HTTP selectRows.api with particiapnt group filter Ju Yeong Kim  2017-09-22 09:56
Status: Closed
 
Your operating system: MaxOS
Web browser: chrome
Version number of LabKey Server: 17.2
A detailed description of your problem or question, including instructions for reproducing your issue:

I have a participant group filter called "rabbits", and when I tried to use this filter with selectRows.api, it returns the unfiltered data.

https://BASEURL.ORG/query/MYPROJECT/selectRows.api?schemaName=study&query.queryName=Demographics&query.SubjectId/rabbits~eq=rabbits

For some reason, selectRows.api cannot handle the participant group filter (query.SubjectId/rabbits~eq=rabbits).
 
 
Nick Kerr responded:  2017-09-22 10:22
I'd recommend POSTing to the selectRows API and including the filter in the POST body. A reason for this is filter parameters can be an arbitrary length and begin to run into URL length constraints.

Thanks,
Nick Kerr
 
Jon (LabKey DevOps) responded:  2017-09-22 10:40
Hi,

Are you inserting that URL into your browser?

Have you tried to encode the slash between SubjectId/rabbits as SubjectId%2Frabbits instead?

Rather than:

https://BASEURL.ORG/query/MYPROJECT/selectRows.api?schemaName=study&query.queryName=Demographics&query.SubjectId/rabbits~eq=rabbits

You'd use:

https://BASEURL.ORG/query/MYPROJECT/selectRows.api?schemaName=study&query.queryName=Demographics&query.SubjectId%2Frabbits~eq=rabbits

This should also work as well.

Regards,

Jon
 
Ju Yeong Kim responded:  2017-09-22 11:54
Thank you, Nick and Jon.

Jon, you were right. It was the URL encoding issue.

Nick, I will keep that in mind.

Ju