You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: azure/Guidelines.md
+18-18Lines changed: 18 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -589,23 +589,23 @@ Parameter name | Type | Description
589
589
590
590
<ahref="#collections-query-options-no-dollar-sign"name="collections-query-options-no-dollar-sign">:no_entry:</a> **DO NOT** prefix any of these query parameter names with "$" (the convention in the [OData standard](http://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html#sec_QueryingCollections)).
591
591
592
-
#### `filter`
592
+
#### filter
593
593
594
-
<ahref="#collections-filter-param"name="collections-filter-param">:heavy_check_mark:</a> **YOU MAY** support `filter`ing of the results of a list operation with the `filter` query parameter.
594
+
<ahref="#collections-filter-param"name="collections-filter-param">:heavy_check_mark:</a> **YOU MAY** support filtering of the results of a list operation with the `filter` query parameter.
595
595
596
-
The value of the `filter`option is an expression involving the fields of the resource that produces a Boolean value. This expression is evaluated for each resource in the collection and only items where the expression evaluates to true are included in the response.
596
+
The value of the `filter`query parameter is an expression involving the fields of the resource that produces a Boolean value. This expression is evaluated for each resource in the collection and only items where the expression evaluates to true are included in the response.
597
597
598
-
<ahref="#collections-filter-behavior"name="collections-filter-behavior">:white_check_mark:</a> **DO** omit all resources from the collection for which the `filter` expression evaluates to false or to null, or references properties that are unavailable due to permissions.
598
+
<ahref="#collections-filter-behavior"name="collections-filter-behavior">:white_check_mark:</a> **DO** omit all resources from the collection for which the filter expression evaluates to false or to null, or references properties that are unavailable due to permissions.
599
599
600
600
Example: return all Products whose Price is less than $10.00
601
601
602
602
```text
603
-
GET https://api.contoso.com/products?`filter`=price lt 10.00
603
+
GET https://api.contoso.com/products?filter=price lt 10.00
604
604
```
605
605
606
-
##### `filter` operators
606
+
##### filter operators
607
607
608
-
:heavy_check_mark:**YOU MAY** support the following operators in `filter` expressions:
608
+
:heavy_check_mark:**YOU MAY** support the following operators in filter expressions:
@@ -623,9 +623,9 @@ not | Logical negation | not price le 3.5
623
623
**Grouping Operators** | |
624
624
( ) | Precedence grouping | (priority eq 1 or city eq 'Redmond') and price gt 100
625
625
626
-
<ahref="#collections-filter-unknown-operator"name="collections-filter-unknown-operator">:white_check_mark:</a> **DO** respond with an error message as defined in the [Handling Errors](#handling-errors) section if a client includes an operator in a `filter` expression that is not supported by the operation.
626
+
<ahref="#collections-filter-unknown-operator"name="collections-filter-unknown-operator">:white_check_mark:</a> **DO** respond with an error message as defined in the [Handling Errors](#handling-errors) section if a client includes an operator in a filter expression that is not supported by the operation.
627
627
628
-
<ahref="#collections-filter-operator-ordering"name="collections-filter-operator-ordering">:white_check_mark:</a> **DO** use the following operator precedence for supported operators when evaluating `filter` expressions. Operators are listed by category in order of precedence from highest to lowest. Operators in the same category have equal precedence and should be evaluated left to right:
628
+
<ahref="#collections-filter-operator-ordering"name="collections-filter-operator-ordering">:white_check_mark:</a> **DO** use the following operator precedence for supported operators when evaluating filter expressions. Operators are listed by category in order of precedence from highest to lowest. Operators in the same category have equal precedence and should be evaluated left to right:
629
629
630
630
| Group | Operator | Description
631
631
| ----------------|----------|------------
@@ -640,39 +640,39 @@ not | Logical negation | not price le 3.5
640
640
| Conditional AND | and | Logical And |
641
641
| Conditional OR | or | Logical Or |
642
642
643
-
<ahref="#collections-filter-functions"name="collections-filter-functions">:heavy_check_mark:</a> **YOU MAY** support orderby and `filter` functions such as concat and contains. For more information, see [odata Canonical Functions](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part2-url-conventions.html#_Toc31360979).
643
+
<ahref="#collections-filter-functions"name="collections-filter-functions">:heavy_check_mark:</a> **YOU MAY** support orderby and filter functions such as concat and contains. For more information, see [odata Canonical Functions](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part2-url-conventions.html#_Toc31360979).
644
644
645
645
##### Operator examples
646
646
The following examples illustrate the use and semantics of each of the logical operators.
647
647
648
648
Example: all products with a name equal to 'Milk'
649
649
650
650
```text
651
-
GET https://api.contoso.com/products?`filter`=name eq 'Milk'
651
+
GET https://api.contoso.com/products?filter=name eq 'Milk'
652
652
```
653
653
654
654
Example: all products with a name not equal to 'Milk'
655
655
656
656
```text
657
-
GET https://api.contoso.com/products?`filter`=name ne 'Milk'
657
+
GET https://api.contoso.com/products?filter=name ne 'Milk'
658
658
```
659
659
660
660
Example: all products with the name 'Milk' that also have a price less than 2.55:
661
661
662
662
```text
663
-
GET https://api.contoso.com/products?`filter`=name eq 'Milk' and price lt 2.55
663
+
GET https://api.contoso.com/products?filter=name eq 'Milk' and price lt 2.55
664
664
```
665
665
666
666
Example: all products that either have the name 'Milk' or have a price less than 2.55:
667
667
668
668
```text
669
-
GET https://api.contoso.com/products?`filter`=name eq 'Milk' or price lt 2.55
669
+
GET https://api.contoso.com/products?filter=name eq 'Milk' or price lt 2.55
670
670
```
671
671
672
672
Example: all products that have the name 'Milk' or 'Eggs' and have a price less than 2.55:
673
673
674
674
```text
675
-
GET https://api.contoso.com/products?`filter`=(name eq 'Milk' or name eq 'Eggs') and price lt 2.55
675
+
GET https://api.contoso.com/products?filter=(name eq 'Milk' or name eq 'Eggs') and price lt 2.55
676
676
```
677
677
678
678
#### orderby
@@ -705,15 +705,15 @@ For example, to return all people sorted by name in descending order and a secon
705
705
GET https://api.contoso.com/people?orderby=name desc,hireDate
706
706
```
707
707
708
-
Sorting MUST compose with `filter`ing such that:
708
+
Sorting MUST compose with filtering such that:
709
709
```text
710
-
GET https://api.contoso.com/people?`filter`=name eq 'david'&orderby=hireDate
710
+
GET https://api.contoso.com/people?filter=name eq 'david'&orderby=hireDate
711
711
```
712
712
will return all people whose name is David sorted in ascending order by hireDate.
713
713
714
714
##### Considerations for sorting with pagination
715
715
716
-
<ahref="#collections-consistent-options-with-pagination"name="collections-consistent-options-with-pagination">:white_check_mark:</a> **DO** use the same `filter`ing options and sort order for all pages of a paginated list operation response.
716
+
<ahref="#collections-consistent-options-with-pagination"name="collections-consistent-options-with-pagination">:white_check_mark:</a> **DO** use the same filtering options and sort order for all pages of a paginated list operation response.
717
717
718
718
##### skip
719
719
<ahref="#collections-skip-param-definition"name="collections-skip-param-definition">:white_check_mark:</a> **DO** define the `skip` parameter as an integer with a default and minimum value of 0.
0 commit comments