Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for OData Queries #24

Open
adamdriscoll opened this issue Nov 3, 2015 · 0 comments
Open

Support for OData Queries #24

adamdriscoll opened this issue Nov 3, 2015 · 0 comments

Comments

@adamdriscoll
Copy link
Contributor

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' 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants