The below table illustrates the list of functions, taking the Entities from the Order Management app as an example. Note: Replace {Service link} with your actual Test or Production service links.
Function | Syntax |
Entity | {Service link}/OrderItem(1) |
Metadata | {Service link}/$metadata |
Filter and OrderBy | {Service link}/Order?$filter=TotalAmount gt 100&$orderby=OrderStatusId desc |
Search | {Service link}/Product?$search=Phone |
Drilldown from Parent to Child | {Service link}/Order(1)/OrderItems |
Drilldown from Child to Parent | {Service link}/OrderItem(1)/Order |
Expand |
Expand: {Service link}/Order(1)?$expand=OrderStatus Filter and Expand: {Service link}/OrderItem?$filter=Id eq 90 & $expand=Order Filter and Expand (with select): {Service link}/OrderItem?$filter=Id eq 90 & $expand=Order($select=Id, Code, TotalAmount) Nested Expand and Filter: {Service link}/OrderItem?$expand=Order($filter=Code eq ‘ORD0001’) {Service link}/OrderItem?$expand=Order($expand=Account($filter=Id eq 10)) Nested expand up to level 3 with filter: {Service link}/OrderItem?$filter=OrderId ne 2 & $expand=Order($expand=Account($expand=Country($filter=Id ne 1))) Nested expand up to level 3 with select and filter: {Service link}/OrderItem?$filter=OrderId ne 2 & $expand=Order($expand=Account($expand=Country($filter=Id ne 1; $select=Id, Name))) Nested expand up to level 3 with select and filter on all levels: {Service link}/OrderItem?$expand=Order($expand=Account($expand=Country($select=Name, Code, Id; $filter=Id ne 1 )), OrderStatus($filter=Id eq 2 ; $select=Label, Id)) & $filter=OrderId ne 15 Nested expand along with filter and select on the main entity: {Service link}/OrderItem?$expand=Order($expand=Account($expand=Country($select=Name, Code, Id; $filter=Id ne 1 )), OrderStatus($filter=Id eq 2 ; $select=Label, Id)) & $filter=OrderId ne 15 & $select=OrderId |
Count | {Service link}/Order?$count=true |
Top and Skip | Page 1: {Service link}/{Entity Name}?$top=1000&$skip=0 Page 2: {Service link}/{Entity Name}?$top=1000&$skip=1000 |
Select | {Service link}/Order?$select=Id, TotalAmount |
substring | {Service link}/Product?$filter=substring(Name,8,4) eq ‘slim’ |
startswith | {Service link}/Product?$filter=startswith(Name,’ssd’) |
length | {Service link}/Product?$filter=length(Name) gt 19 |
indexof | {Service link}/Product?$filter=indexof(Name,’ssd’) eq 0 |
Contains | {Service link}/Product?$filter=contains(Name,’black’) |
EndsWith | {Service link}/Product?$filter=endswith(Name,’black’) |
Concat | {Service link}/Product?$filter=concat(concat(Code,’, ‘),Name) eq ‘P0001, notarum black’ |
Date Filter |
Format: yyyy-mm-dd {Service link}/Entity?$filter=Date gt 2022-04-01 Format: 2022-04-01T01:00:00Z {Service link}/Entity?$filter=DateTime le 2022-04-01T02:00:00Z {Service link}/Entity?$filter=CreatedOn gt 2021-11-27T08:21:11Z Format: 02:00:00.0000001 {Service link}/Entity?$filter=Time gt 02:00:00.0000001 Other Formats: {Service link}/Entity?$filter=UpdatedOn%20eq%202021-11-27T08:21:10Z With Operator and Date combination: {Service link}/Entity?$filter=CreatedOn gt 2021-11-28T08:21:10Z and CreatedOn le 2021-12-09T08:21:10Z {Service link}/Entity?$filter=CreatedOn ge 2021-11-28T08:21:10Z and CreatedOn le 2021-12-09T08:21:10Z String and DateTime filter combination: {Service link}/Entity?$filter=Code eq ‘C0000421’ and CreatedOn le 2022-01-22T08:21:10Z String, Datetime and AND/OR filters: {Service link}/Entity?$filter=Code eq ‘C00004211’ or (CreatedOn ge 2021-11-28T08:21:10Z and CreatedOn le 2021-12-09T08:21:10Z) {Service link}/Entity?$filter=Code eq ‘C0000421’ and (CreatedOn ge 2021-11-28T08:21:10Z and CreatedOn le 2021-12-09T08:21:10Z) Integer, DateTime operators and AND/OR: {Service link}/Entity?$filter=CreatedBy eq 17 and (CreatedOn ge 2021-11-28T08:21:10Z and CreatedOn le 2021-12-09T08:21:10Z) {Service link}/Entity?$filter=CreatedBy eq 17 or (CreatedOn eq 2021-11-28T08:21:10Z and CreatedOn lt 2021-12-09T08:21:10Z) |