)clear
]rows on
)copy conga Conga
i←Conga.Init ''
]load HttpCommand
service←'https://services.odata.org/V4/Northwind/Northwind.svc'
⎕←res←HttpCommand.Get service
200↑res.Data
jres←⎕json res.Data
jres.⎕nl -2 9
jres.value
jres.value[1].⎕nl -2 9
⍪jres.value.(kind url)
jres.⍙⍙64⍙odata⍙46⍙context
⎕←res←HttpCommand.Get jres.⍙⍙64⍙odata⍙46⍙context 
200↑res.Data
xml←⎕xml res.Data
)ed xml
(Order_Details Orders)← ((3=xml[;1])⊂[1]xml)[5 6]
)ed Orders
)ed Order_Details
ObjIn←{(⊃⍵).⎕NL-2 9}
⎕←orders←HttpCommand.Get service,'/Orders'
jorders←⎕json orders.Data
ObjIn jorders
ObjIn jorders.value
⍴jorders.value.ShippedDate
10↑jorders.value.ShippedDate
jorders.⍙⍙64⍙odata⍙46⍙nextLink
⎕←orders2←HttpCommand.Get service,'/',jorders.⍙⍙64⍙odata⍙46⍙nextLink
jo2←⎕json orders2.Data
⍴jo2.value
⎕←t←HttpCommand.Get service,'/Orders/$count'
t.Data
params←1 2⍴   '$select' 'OrderID,ShippedDate'
params⍪←  '$filter' 'ShippedDate ge 1997-07-01 and ShippedDate lt 1997-08-01'
⎕←july97←HttpCommand.Get (service,'/Orders') (params)
jjuly97←⎕json july97.Data
ObjIn jjuly97
ObjIn jjuly97.value
⍴jjuly97.value
jjuly97.value.ShippedDate
1 HttpCommand.Get (service,'/Orders') (params)
params←1 2⍴   '$select' 'OrderID,ShippedDate'
params⍪← '$filter' 'month(ShippedDate) eq 7 and year(ShippedDate) eq 1997' 
params⍪←'$expand' 'Order_Details'
⎕←t ←HttpCommand.Get (service,'/Orders') (params)
jt←⎕Json t.Data
⍴jt.value
ObjIn jt.value
ObjIn jt.value.Order_Details
params⍪←'$compute' 'Order_Details/Quantity mul Order_Details/UnitPrice as Amount'
⎕←t ←HttpCommand.Get (service,'/Orders') (params)
t.Data
params←¯1↓params
⎕←t ←HttpCommand.Get (service,'/Orders') (params)
jt←⎕json t.Data
jt.value.Order_Details.(Quantity×(1-Discount)×UnitPrice)
⍴¨jt.value.Order_Details.(Quantity×(1-Discount)×UnitPrice)
+/⊃,/jt.value.Order_Details.(Quantity×(1-Discount)×UnitPrice)
⎕←t ←HttpCommand.Get (service,'/Order_Details/$count') 
t.Data
params←1 2⍴'$expand' 'Order'
params⍪←'$filter' 'month(Order/ShippedDate) eq 7 and year(Order/ShippedDate) eq 1997'
⎕←t ←HttpCommand.Get (service,'/Order_Details') (params)
jt←⎕json t.Data
ObjIn jt
⍴jt.value
jt.value.(Quantity×(1-Discount)×UnitPrice)
+/jt.value.(Quantity×(1-Discount)×UnitPrice)