-
Type: Improvement
-
Status: New
-
Priority: Major
-
Resolution: Unresolved
-
Affects Version/s: V4.01_OS
-
Fix Version/s: V4.02
-
Component/s: URL Conventions
-
Labels:None
-
Proposal:
JSON as content type should also be supported by /$query:
POST ~/$query Content-Type: application/json {"$filter": "a eq 1", "$select": "b"}
This is especially useful for complex function parameters, that would then be represented as if they were action parameters:
POST ~/Countries('DE')/GetPostcodes Content-Type: application/json {"$filter": "ValidityStart gt 2020-01-01", "City": "Heidelberg", "Address": {"Street": "Hauptstraße", "Number": "1"}}
Note that
- the name of the bound function in the URL is without parentheses (because the parameters are in the body)
- all parameter values in the JSON payload must be literals (whereas in the URL they could be aliases that evaluate to arbitrary expressions)
- the /$query segment in the URL is optional and has been omitted here. (There is no risk of misinterpreting a function invocation URL.)