Skip to content

Support for OData Queries #24

@adamdriscoll

Description

@adamdriscoll

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' 

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions