Closed LordKa0S closed 8 months ago
change to
print("querying order_by with list of maps")
"""
See [order_by in puppetdb docs](https://github.com/puppetlabs/puppetdb/blob/2051e1243980e41f05d2040109bd443bdbbd8e31/documentation/api/query/v4/paging.markdown?plain=1#L21)
"""
puppetdb._query(
endpoint="nodes",
order_by=json.dumps(
obj=[
{
"field": "certname",
"order": "desc",
},
],
),
)
The order_by parameter for api.base.BaseAPI._query doesn't work.
Minimal reproduction
see code comments for details
Current Output
RCA
Query API version 4 expects a JSON array of maps as a
application/x-www-form-urlencoded
request field.