flancy
flancy copied to clipboard
Support for OData Queries
It would be super awesome to support OData filtering\sorting\paging. There is a Nancy extension to do it but it creates LINQ queries which might not be one-to-one to PowerShell but we might be able to use the OData query parsing capabilities as a starting point.
https://github.com/adamhathcock/Nancy.OData https://bitbucket.org/jjrdk/linq2rest
The endpoint would just be:
@{
Path='/process'
Method='Get';
Script={
Get-Process
}
}
Then we could do cool stuff like:
Invoke-WebRequest http://localhost:8000/process?$filter=Name -eq 'PowerShell'
It would automatically do something like:
Get-Process | Where Name -eq 'PowerShell'