|
As part of the PQL prototype here, I created an endpoint, that allowed any query across any context:
https://github.com/puppetlabs/puppetdb/compare/master...kbarber:ticket/master/pql
This endpoint was primarily design for PQL querying, but we should consider making this work for our existing AST syntax first. The idea would be to have a single-endpoint that can allow both AST or PQL querying later on though, so determining a way of detecting or informing of the type of query would be helpful.
The current PQL design talked about having the query hang off: /pdb/query/v4?query=<your_query> or something like that.
This isn't just about an endpoint, we also need a query language methodology around 'setting' the context, some ideas:
["context", "nodes", <query>]
|
["from", "nodes", <query>]
|
["query", "nodes", <query>]
|
|