It's all about the answers!

Ask a question

How can I run a stored query with input parameter with REST api?

Michele Pegoraro (1.8k14117103) | asked Mar 22 '16, 11:39 a.m.
edited Mar 22 '16, 11:41 a.m.
I was trying to call a stored query through REST api. I can call the query correctly using the following url:


with __pHxUOUGEeWuMokBR-rR4w that is the uuid of the query.

But what if I want to call a query that requires an input parameter? how can I add it to the url?

If I don't put the parameter I have this error:
<oslc_cm:error><oslc_cm:status>500</oslc_cm:status><oslc_cm:message>Cannot run query with unbound parameters for variable(s): 'summary21'</oslc_cm:message></oslc_cm:error>

How can I pass summary21 parameter?


Accepted answer

permanent link
Donald Nong (14.5k414) | answered Mar 27 '16, 8:27 p.m.
Many folks asked the same question in various ways and the answer appeared to the same - you cannot do it.

Note that the ability to use stored queries is considered as "preliminary support", and may not get any further enhancement on top of what is described in the Wiki. Also, it may not be obvious - this feature requires OSLC 1.0. In other words, it may have been deprecated already given that we usually work with OSLC 2.0 now.
Michele Pegoraro selected this answer as the correct answer

Michele Pegoraro commented May 03 '16, 4:35 a.m.

Thank you.

2 other answers

permanent link
Kohji Ohsawa (5951310) | answered Mar 24 '16, 9:37 p.m.
Hi Michele, 

I am not sure what the "summary21" is, but have you tried OSLC query parameters?

permanent link
Ranjit Singh (11) | answered Nov 01 '16, 1:28 p.m.
Hi Michele Pegoraro

Were you able to pass the parameters?Because I am also getting the same issues.

Your answer

Register or to post your answer.