Skip to content

Query API seems to just return lists of empty objects #442

Answered by srenatus
JAForbes asked this question in OPA and Rego
Discussion options

You must be logged in to vote

Hello!

Your query is successful, but that's it. If you want to see the result of evaluation input.example, you'll have to bind it:

$ curl http://127.0.0.1:8181/v1/query -d '{"input": {"example": "hello"}, "query": "x := input.example"}'
{"result":[{"x":"hello"}]}
$

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@anderseknert
Comment options

Answer selected by JAForbes
Comment options

You must be logged in to vote
2 replies
@srenatus
Comment options

@JAForbes
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants