{ "info": { "_postman_id": "a1b2c3d4-odata-ut-calcite-regression", "name": "OData Calcite Regression (AO.UT)", "description": "Regression suite for cloudseer-odata: $filter (incl. arithmetic), $compute (core + extended), $expand, $search (incl. NOT), $orderby (on declared properties only — **not** on `$compute` aliases; see folder 16), $top/$skip, $count, $apply (sum/avg/min/max/count/countdistinct). Entity sets match AO.UT CSDL in `scripts/error.txt`.\n\n**Geometry (supported):** When an MSO property is typed as **GEOMETRY** in metadata, OData JSON payloads use **geospatial** values (JTS → Olingo). Use **`$select`** / **`$expand`** to read geometry columns. **`$filter` canonical geo functions** (`geo.distance`, `geo.length`, `geo.intersects`) are **not** translated to `ST_*` in this build — expect **501** (folder 06).\n\n**Folder 18 — MSO / Calcite UDF:** Raw semantic SQL against `MSOFunctions` (e.g. `ST_*`, `ao_lower`) via **`GET /api/agentic/getDataForMsoQuery`** and validation via **`POST /api/easyAnswers/validateMsoQuery`** (`cloudseer-pipeline`). Set collection vars **`ontologyUid`** (required) and **`ontologyName`** (for validate). OData `$filter` does not expose arbitrary MSO UDF names; use this folder for direct SQL.\n\n**Environment:** `platformServerUrl`, `basicAuthUser`, `basicAuthPassword`, `xApiKey`, optional `ontologyUid`, `ontologyName`.\n\n**Newman:**\n`newman run cloudseer-odata/postman/OData-Calcite-Regression.postman_collection.json -e cloudseer-odata/postman/OData-Local.postman_environment.json`\n\n**Not supported or limited in this build:**\n- `$filter`: `any`/`all` collection lambdas; `isof` (501); **`geo.distance` / `geo.length` / `geo.intersects`** (501 — not wired to Calcite `ST_*` in OData; use folder 18 for raw SQL).\n- **`$orderby` referencing only `$compute` aliases** — Olingo rejects unknown properties → expect **400** (folder 16).\n- **`geo.distance` with length unit (3-arg)** — 400 or 501 (folder 06).\n- Combining `$apply` with `$expand` or `$compute` (400).\n- `$compute`: multi-segment property paths; function style `add()`/`sub()` (use infix `add`/`sub` in $compute).\n- `$apply`: groupby rollup; multiple top-level apply transformations; custom aggregate methods.\n\n**Notes:** Encode `$` via Postman Params when needed. In raw URLs, unary **`+` in `$filter` / `$compute`** must be **`%2B`** (a bare `+` in the query string is decoded as a space). $apply JSON requires `Accept: application/json`. Some datetime/`totaloffsetminutes`/`fractionalseconds` on `Edm.Date` may be engine-sensitive. Extra `cast(...,'Edm.*')` targets need a suitable column or literal.", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" }, "auth": { "type": "basic", "basic": [ { "key": "username", "value": "{{basicAuthUser}}", "type": "string" }, { "key": "password", "value": "{{basicAuthPassword}}", "type": "string" } ] }, "event": [ { "listen": "prerequest", "script": { "type": "text/javascript", "exec": [ "pm.request.headers.upsert({ key: 'X-API-Key', value: pm.collectionVariables.get('xApiKey') || '' });" ] } } ], "variable": [ { "key": "platformServerUrl", "value": "http://localhost:8090" }, { "key": "basicAuthUser", "value": "" }, { "key": "basicAuthPassword", "value": "" }, { "key": "xApiKey", "value": "" }, { "key": "ontologyUid", "value": "", "type": "string" }, { "key": "ontologyName", "value": "", "type": "string" } ], "item": [ { "name": "00 Smoke", "item": [ { "name": "OData:$metadata · SQL:n/a · UT CSDL", "request": { "method": "GET", "header": [ { "key": "Accept", "value": "*/*" } ], "url": "{{platformServerUrl}}/odata/UT/$metadata", "description": "GET service metadata document." }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('XML or JSON metadata', function () {", " const ct = (pm.response.headers.get('Content-Type') || '').toLowerCase();", " pm.expect(ct.includes('xml') || ct.includes('json')).to.be.true;", "});" ] } } ] } ] }, { "name": "01 $filter — string", "item": [ { "name": "OData:$filter · SQL:POSITION/CAST · contains", "request": { "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": "{{platformServerUrl}}/odata/UT/Meter?$filter=contains(manufacturer,'a')&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$filter · SQL:POSITION/CAST · startswith", "request": { "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": "{{platformServerUrl}}/odata/UT/Meter?$filter=startswith(manufacturer,'x')&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$filter · SQL:POSITION/CAST · endswith", "request": { "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": "{{platformServerUrl}}/odata/UT/Meter?$filter=endswith(manufacturer,'x')&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$filter · SQL:CHAR_LENGTH/CAST · length gt", "request": { "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": "{{platformServerUrl}}/odata/UT/Meter?$filter=length(manufacturer) gt 0&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$filter · SQL:POSITION/CASE · indexof", "request": { "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": "{{platformServerUrl}}/odata/UT/Meter?$filter=indexof(manufacturer,'a') ge -1&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$filter · SQL:SUBSTRING/CAST · substring(2)", "request": { "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": "{{platformServerUrl}}/odata/UT/Meter?$filter=substring(manufacturer,1) ne ''&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$filter · SQL:SUBSTRING/CAST · substring(3)", "request": { "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": "{{platformServerUrl}}/odata/UT/Meter?$filter=substring(manufacturer,1,3) ne ''&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$filter · SQL:LOWER/CAST · tolower", "request": { "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": "{{platformServerUrl}}/odata/UT/Meter?$filter=tolower(manufacturer) ne ''&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$filter · SQL:UPPER/CAST · toupper", "request": { "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": "{{platformServerUrl}}/odata/UT/Meter?$filter=toupper(manufacturer) ne ''&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$filter · SQL:TRIM/CAST · trim", "request": { "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": "{{platformServerUrl}}/odata/UT/Meter?$filter=trim(manufacturer) ne ''&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$filter · SQL:CONCAT/CAST · concat(2)", "request": { "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": "{{platformServerUrl}}/odata/UT/Meter?$filter=concat(manufacturer,material) ne ''&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$filter · SQL:CONCAT/CAST · concat(3)", "request": { "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": "{{platformServerUrl}}/odata/UT/Meter?$filter=concat(manufacturer,material,serialNumber) ne ''&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] } ] }, { "name": "02 $filter — datetime", "item": [ { "name": "OData:$filter · SQL:EXTRACT(YEAR)/CAST · year", "request": { "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": "{{platformServerUrl}}/odata/UT/Meter?$filter=year(dateOfManufacture) ge 1900&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$filter · SQL:EXTRACT(MONTH)/CAST · month", "request": { "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": "{{platformServerUrl}}/odata/UT/Meter?$filter=month(dateOfManufacture) ge 1&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$filter · SQL:EXTRACT(DAY)/CAST · day", "request": { "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": "{{platformServerUrl}}/odata/UT/Meter?$filter=day(dateOfManufacture) ge 1&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$filter · SQL:EXTRACT(HOUR)/CAST · hour", "request": { "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": "{{platformServerUrl}}/odata/UT/Meter?$filter=hour(dateOfManufacture) ge 0&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$filter · SQL:EXTRACT(MINUTE)/CAST · minute", "request": { "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": "{{platformServerUrl}}/odata/UT/Meter?$filter=minute(dateOfManufacture) ge 0&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$filter · SQL:EXTRACT(SECOND)/CAST · second", "request": { "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": "{{platformServerUrl}}/odata/UT/Meter?$filter=second(dateOfManufacture) ge 0&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$filter · SQL:EXTRACT/EPOCH · fractionalseconds", "request": { "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": "{{platformServerUrl}}/odata/UT/Meter?$filter=fractionalseconds(dateOfManufacture) ge 0&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$filter · SQL:EXTRACT(EPOCH) · totalseconds", "request": { "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": "{{platformServerUrl}}/odata/UT/Meter?$filter=totalseconds(dateOfManufacture) ge 0&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$filter · SQL:CAST DATE · date()", "request": { "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": "{{platformServerUrl}}/odata/UT/Meter?$filter=date(dateOfManufacture) le now()&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$filter · SQL:CAST TIME · time()", "request": { "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": "{{platformServerUrl}}/odata/UT/Meter?$filter=hour(time(dateOfManufacture)) ge 0&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$filter · SQL:TIMEZONE_EXTRACT · totaloffsetminutes", "request": { "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": "{{platformServerUrl}}/odata/UT/Meter?$filter=totaloffsetminutes(dateOfManufacture) ge -840&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$filter · SQL:CURRENT_TIMESTAMP · date lt now()", "request": { "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": "{{platformServerUrl}}/odata/UT/Meter?$filter=dateOfManufacture lt now()&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$filter · SQL:TIMESTAMP literal · date gt mindatetime", "request": { "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": "{{platformServerUrl}}/odata/UT/Meter?$filter=dateOfManufacture gt mindatetime()&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$filter · SQL:TIMESTAMP literal · date lt maxdatetime", "request": { "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": "{{platformServerUrl}}/odata/UT/Meter?$filter=dateOfManufacture lt maxdatetime()&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$filter · SQL:EXTRACT · paymentDate", "request": { "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": "{{platformServerUrl}}/odata/UT/Payments?$filter=year(paymentDate) ge 1900&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] } ] }, { "name": "03 $filter — math", "item": [ { "name": "OData:$filter · SQL:ROUND/CAST · round(1)", "request": { "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": "{{platformServerUrl}}/odata/UT/Payments?$filter=round(paymentAmount_value) ge 0&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$filter · SQL:ROUND/CAST · round(2)", "request": { "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": "{{platformServerUrl}}/odata/UT/Payments?$filter=round(paymentAmount_value,2) ge 0&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$filter · SQL:FLOOR/CAST · floor", "request": { "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": "{{platformServerUrl}}/odata/UT/Payments?$filter=floor(paymentAmount_value) ge 0&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$filter · SQL:CEILING/CAST · ceiling", "request": { "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": "{{platformServerUrl}}/odata/UT/Payments?$filter=ceiling(paymentAmount_value) ge 0&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$filter · SQL:FLOOR/CAST · Premise latitude", "request": { "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": "{{platformServerUrl}}/odata/UT/Premise?$filter=floor(latitude) ge -90&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$filter · SQL:unary MINUS · -property lt 0", "request": { "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": "{{platformServerUrl}}/odata/UT/Meter?$filter=-lengthOfService lt 0&$top=1", "description": "FilterVisitor maps OData unary MINUS to SQL (-(expr))." }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$filter · SQL:unary PLUS · %2Bproperty (identity)", "request": { "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": "{{platformServerUrl}}/odata/UT/Meter?$filter=%2BlengthOfService ge 0&$top=1", "description": "Unary plus → SQL (expr) when Olingo emits UnaryOperatorKind.PLUS. Use %2B so + is not decoded as a space. Olingo 4.10 may reject this at parse time (400); FilterVisitor still implements PLUS for compatible parsers / future versions." }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200 or parse-time 400 for unary +', function () {", " pm.expect([200, 400]).to.include(pm.response.code);", "});", "if (pm.response.code === 200) {", " pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", " });", "}" ] } } ] } ] }, { "name": "04 $filter — cast", "item": [ { "name": "OData:$filter · SQL:CAST · Edm.String", "request": { "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": "{{platformServerUrl}}/odata/UT/Meter?$filter=cast(manufacturer,'Edm.String') ne ''&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$filter · SQL:CAST · Edm.Boolean", "request": { "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": "{{platformServerUrl}}/odata/UT/Meter?$filter=cast(isCompoundMeter,'Edm.Boolean') eq isCompoundMeter&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$filter · SQL:CAST · Edm.Int32", "request": { "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": "{{platformServerUrl}}/odata/UT/Meter?$filter=cast(lengthOfService,'Edm.Int32') ge 0&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$filter · SQL:CAST · Edm.Int64", "request": { "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": "{{platformServerUrl}}/odata/UT/CustomerNew?$filter=cast(customerIdNew,'Edm.Int64') ge 0&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$filter · SQL:CAST · Edm.Double", "request": { "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": "{{platformServerUrl}}/odata/UT/Payments?$filter=cast(paymentAmount_value,'Edm.Double') ge 0&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$filter · SQL:CAST · Edm.Decimal", "request": { "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": "{{platformServerUrl}}/odata/UT/Payments?$filter=cast(paymentAmount_value,'Edm.Decimal') ge 0&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$filter · SQL:CAST · Edm.Date", "request": { "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": "{{platformServerUrl}}/odata/UT/Meter?$filter=cast(dateOfManufacture,'Edm.Date') le now()&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$filter · SQL:CAST · Edm.Single", "request": { "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": "{{platformServerUrl}}/odata/UT/Premise?$filter=cast(latitude,'Edm.Single') ge -90&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$filter · SQL:CAST · Edm.DateTime", "request": { "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": "{{platformServerUrl}}/odata/UT/Meter?$filter=cast(dateOfManufacture,'Edm.DateTime') le now()&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] } ] }, { "name": "05 $filter — logical", "item": [ { "name": "OData:$filter · SQL:AND · length props", "request": { "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": "{{platformServerUrl}}/odata/UT/Meter?$filter=lengthOfService ge 0 and length(manufacturer) ge 0&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$filter · SQL:OR · tautology", "request": { "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": "{{platformServerUrl}}/odata/UT/Meter?$filter=lengthOfService lt 0 or lengthOfService ge 0&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$filter · SQL:NOT · not lt", "request": { "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": "{{platformServerUrl}}/odata/UT/Meter?$filter=not (lengthOfService lt -999999)&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$filter · SQL:IS NULL · manufacturer", "request": { "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": "{{platformServerUrl}}/odata/UT/Meter?$filter=manufacturer eq null or manufacturer ne null&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] } ] }, { "name": "06 $filter — negative", "item": [ { "name": "OData:$filter · NEGATIVE · isof not supported", "request": { "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": "{{platformServerUrl}}/odata/UT/Meter?$filter=isof(manufacturer,'Edm.String')&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 501', function () { pm.response.to.have.status(501); });", "pm.test('Error payload', function () { pm.expect(pm.response.text()).to.include('error'); });" ] } } ] }, { "name": "OData:$filter · NEGATIVE · geo.distance literals 501", "request": { "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": "{{platformServerUrl}}/odata/UT/Meter?$filter=geo.distance(geography'POINT(1 1)',geography'POINT(2 2)') gt 0&$top=1", "description": "OData `$filter` geo canonical functions are not mapped to `ST_*` in this build (`ODataCanonicalMethodSql` → 501). Use folder 18 for raw semantic SQL with `ST_Distance`." }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 501', function () { pm.response.to.have.status(501); });", "pm.test('Error payload', function () { pm.expect(pm.response.text()).to.include('error'); });" ] } } ] }, { "name": "OData:$filter · NEGATIVE · geo.length literal 501", "request": { "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": "{{platformServerUrl}}/odata/UT/Meter?$filter=geo.length(geography'LINESTRING(0 0,1 1)') gt 0&$top=1", "description": "Same as geo.distance — not supported in OData `$filter` for this build (501)." }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 501', function () { pm.response.to.have.status(501); });", "pm.test('Error payload', function () { pm.expect(pm.response.text()).to.include('error'); });" ] } } ] }, { "name": "OData:$filter · NEGATIVE · geo.intersects literals 501", "request": { "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": "{{platformServerUrl}}/odata/UT/Meter?$filter=geo.intersects(geography'POINT(1 1)',geography'POLYGON((0 0,2 0,2 2,0 2,0 0))')&$top=1", "description": "Same as geo.distance — not supported in OData `$filter` for this build (501)." }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 501', function () { pm.response.to.have.status(501); });", "pm.test('Error payload', function () { pm.expect(pm.response.text()).to.include('error'); });" ] } } ] }, { "name": "OData:$filter · NEGATIVE · geo.distance 3-arg unit 501", "request": { "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": "{{platformServerUrl}}/odata/UT/Meter?$filter=geo.distance(geography'POINT(1 1)',geography'POINT(2 2)','kilometer') gt 0&$top=1", "description": "Length-unit overload: ODataCanonicalMethodSql returns 501 when parsed. Olingo may reject 3-arg at parse time → 400." }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 400 or 501', function () { pm.expect([400, 501]).to.include(pm.response.code); });", "pm.test('Error payload', function () { pm.expect(pm.response.text()).to.include('error'); });" ] } } ] }, { "name": "OData:$filter · NEGATIVE · bad syntax 400", "request": { "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": "{{platformServerUrl}}/odata/UT/Meter?$filter=(manufacturer eq )&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 400', function () { pm.response.to.have.status(400); });", "pm.test('Error payload', function () { pm.expect(pm.response.text()).to.include('error'); });" ] } } ] } ] }, { "name": "07 $compute", "item": [ { "name": "OData:$compute+$select · SQL:CONCAT/CAST · concat alias", "request": { "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": "{{platformServerUrl}}/odata/UT/Meter?$compute=concat(manufacturer,material) as cm&$select=id,cm&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$compute+$select · SQL:LOWER · tolower alias", "request": { "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": "{{platformServerUrl}}/odata/UT/Meter?$compute=tolower(manufacturer) as lm&$select=id,lm&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$compute+$select · SQL:EXTRACT · year alias", "request": { "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": "{{platformServerUrl}}/odata/UT/Meter?$compute=year(dateOfManufacture) as yy&$select=id,yy&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$compute+$select · SQL:CURRENT_TIMESTAMP · now alias", "request": { "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": "{{platformServerUrl}}/odata/UT/Meter?$compute=now() as ts&$select=id,ts&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$compute+$select · SQL:TIMESTAMP literal · mindatetime", "request": { "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": "{{platformServerUrl}}/odata/UT/Meter?$compute=mindatetime() as mindt&$select=id,mindt&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$compute+$select · SQL:TIMESTAMP literal · maxdatetime", "request": { "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": "{{platformServerUrl}}/odata/UT/Meter?$compute=maxdatetime() as maxdt&$select=id,maxdt&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$compute+$select · SQL:ROUND · round alias", "request": { "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": "{{platformServerUrl}}/odata/UT/Payments?$compute=round(paymentAmount_value,2) as r2&$select=id,r2&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$compute+$select · SQL:CAST · cast Double", "request": { "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": "{{platformServerUrl}}/odata/UT/Payments?$compute=cast(paymentAmount_value,'Edm.Double') as dbl&$select=id,dbl&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$compute+$select · SQL:add · infix add", "request": { "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": "{{platformServerUrl}}/odata/UT/Meter?$compute=lengthOfService add 1 as p1&$select=id,p1&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$compute+$select · SQL:sub · infix sub", "request": { "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": "{{platformServerUrl}}/odata/UT/Meter?$compute=lengthOfService sub 1 as m1&$select=id,m1&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$compute+$select · SQL:mul · infix mul", "request": { "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": "{{platformServerUrl}}/odata/UT/Meter?$compute=lengthOfService mul 2 as x2&$select=id,x2&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$compute+$select · SQL:div · infix div", "request": { "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": "{{platformServerUrl}}/odata/UT/Payments?$compute=paymentAmount_value div 2 as half&$select=id,half&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$compute+$select · SQL:mod · infix mod", "request": { "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": "{{platformServerUrl}}/odata/UT/Meter?$compute=lengthOfService mod 3 as md&$select=id,md&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$compute+$select · SQL:unary minus", "request": { "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": "{{platformServerUrl}}/odata/UT/Meter?$compute=- lengthOfService as negLen&$select=id,negLen&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$compute+$select · SQL:CHAR_LENGTH · length", "request": { "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": "{{platformServerUrl}}/odata/UT/Meter?$compute=length(manufacturer) as mlen&$select=id,mlen&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$compute+$select · SQL:indexof alias", "request": { "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": "{{platformServerUrl}}/odata/UT/Meter?$compute=indexof(manufacturer,'a') as ix&$select=id,ix&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$compute+$select · ContractAccount boolean", "request": { "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": "{{platformServerUrl}}/odata/UT/ContractAccount?$compute=isAutopayEnabled as ap&$select=id,ap&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] } ] }, { "name": "08 $expand — join", "item": [ { "name": "OData:$expand * · SQL:multi-JOIN · ContractAccount", "request": { "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": "{{platformServerUrl}}/odata/UT/ContractAccount?$expand=*&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$expand · SQL:JOIN/FK · installation", "request": { "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": "{{platformServerUrl}}/odata/UT/ContractAccount?$expand=installation&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$expand · SQL:JOIN/FK · customer", "request": { "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": "{{platformServerUrl}}/odata/UT/ContractAccount?$expand=customer&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$expand+$select · SQL:JOIN/PROJECT · installation customer", "request": { "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": "{{platformServerUrl}}/odata/UT/ContractAccount?$expand=installation($select=id,startDate),customer($select=id,firstName)&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$expand+$select · SQL:JOIN/PROJECT · CustomerInteractions premise", "request": { "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": "{{platformServerUrl}}/odata/UT/CustomerInteractions?$expand=premise($select=id,address_city,address_state)&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$expand nested · SQL:JOIN · installation meter", "request": { "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": "{{platformServerUrl}}/odata/UT/ContractAccount?$expand=installation($expand=meter($select=id,manufacturer))&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$filter+$expand · SQL:WHERE+JOIN · ContractAccount customer", "request": { "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": "{{platformServerUrl}}/odata/UT/ContractAccount?$filter=isAutopayEnabled eq true&$expand=customer&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] } ] }, { "name": "09 $search", "item": [ { "name": "OData:$search · SQL:POSITION/LOWER OR · term", "request": { "method": "GET", "header": [{ "key": "Accept", "value": "application/json" }], "url": "{{platformServerUrl}}/odata/UT/Meter?$search=a&$top=1", "description": "$search matches substring across searchable base columns (OR)." }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});", "pm.test('value array', function () {", " const j = pm.response.json();", " pm.expect(j).to.have.property('value');", " pm.expect(j.value).to.be.an('array');", "});" ] } } ] }, { "name": "OData:$search · SQL:AND · two terms", "request": { "method": "GET", "header": [{ "key": "Accept", "value": "application/json" }], "url": "{{platformServerUrl}}/odata/UT/Meter?$search=a%20AND%20b&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$search+$filter · SQL:search AND filter", "request": { "method": "GET", "header": [{ "key": "Accept", "value": "application/json" }], "url": "{{platformServerUrl}}/odata/UT/Meter?$search=meter&$filter=lengthOfService ge 0&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$search · SQL:NOT · negated term", "request": { "method": "GET", "header": [{ "key": "Accept", "value": "application/json" }], "url": "{{platformServerUrl}}/odata/UT/Meter?$search=NOT%20zzzznonexistent&$top=1", "description": "NOT wraps termClause in SQL NOT (...). Uses unlikely token so most rows still match other columns OR semantics may return many rows." }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] } ] }, { "name": "10 $orderby", "item": [ { "name": "OData:$orderby · SQL:ORDER BY · manufacturer asc", "request": { "method": "GET", "header": [{ "key": "Accept", "value": "application/json" }], "url": "{{platformServerUrl}}/odata/UT/Meter?$orderby=manufacturer asc&$top=3" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$orderby · SQL:ORDER BY · dateOfManufacture desc", "request": { "method": "GET", "header": [{ "key": "Accept", "value": "application/json" }], "url": "{{platformServerUrl}}/odata/UT/Meter?$orderby=dateOfManufacture desc&$top=3" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$orderby · SQL:ORDER BY · Payments amount", "request": { "method": "GET", "header": [{ "key": "Accept", "value": "application/json" }], "url": "{{platformServerUrl}}/odata/UT/Payments?$orderby=paymentAmount_value desc&$top=3" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$orderby+$filter · SQL:ORDER BY+WHERE", "request": { "method": "GET", "header": [{ "key": "Accept", "value": "application/json" }], "url": "{{platformServerUrl}}/odata/UT/Meter?$filter=lengthOfService ge 0&$orderby=serialNumber asc&$top=2" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] } ] }, { "name": "11 Pagination ($top/$skip, nextLink)", "item": [ { "name": "OData:$top+$skip · SQL:LIMIT/OFFSET · page 1", "request": { "method": "GET", "header": [{ "key": "Accept", "value": "application/json" }], "url": "{{platformServerUrl}}/odata/UT/Meter?$orderby=id&$top=2&$skip=0" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});", "pm.test('At most $top rows', function () {", " const j = pm.response.json();", " pm.expect(j.value.length).to.be.at.most(2);", "});" ] } } ] }, { "name": "OData:$top+$skip · SQL:LIMIT/OFFSET · page 2", "request": { "method": "GET", "header": [{ "key": "Accept", "value": "application/json" }], "url": "{{platformServerUrl}}/odata/UT/Meter?$orderby=id&$top=2&$skip=2" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:pagination · nextLink may appear when full page", "request": { "method": "GET", "header": [{ "key": "Accept", "value": "application/json" }], "url": "{{platformServerUrl}}/odata/UT/Meter?$orderby=id&$top=1&$skip=0", "description": "If at least one row exists and page is full, body may include @odata.nextLink with preserved $filter/$orderby/$search." }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] } ] }, { "name": "12 $count", "item": [ { "name": "OData:$count · JSON:@odata.count · with $top", "request": { "method": "GET", "header": [{ "key": "Accept", "value": "application/json" }], "url": "{{platformServerUrl}}/odata/UT/Meter?$count=true&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});", "pm.test('@odata.count present', function () {", " const j = pm.response.json();", " pm.expect(j).to.have.property('@odata.count');", " pm.expect(j['@odata.count']).to.be.a('number');", "});" ] } } ] }, { "name": "OData:$count+$filter · total matches filter", "request": { "method": "GET", "header": [{ "key": "Accept", "value": "application/json" }], "url": "{{platformServerUrl}}/odata/UT/Meter?$count=true&$filter=lengthOfService ge 0&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('@odata.count present', function () {", " const j = pm.response.json();", " pm.expect(j).to.have.property('@odata.count');", "});" ] } } ] }, { "name": "OData:$count+$orderby+$skip · nextLink preserves count", "request": { "method": "GET", "header": [{ "key": "Accept", "value": "application/json" }], "url": "{{platformServerUrl}}/odata/UT/Payments?$count=true&$orderby=id&$top=2&$skip=0" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('@odata.count present', function () {", " const j = pm.response.json();", " pm.expect(j).to.have.property('@odata.count');", "});" ] } } ] } ] }, { "name": "13 $apply — groupby/aggregate", "item": [ { "name": "OData:$apply · SQL:GROUP BY/COUNT(*) · $count", "request": { "method": "GET", "header": [{ "key": "Accept", "value": "application/json" }], "url": "{{platformServerUrl}}/odata/UT/Meter?$apply=groupby((manufacturer),aggregate($count as rowCount))&$top=10", "description": "Requires Accept: application/json. $apply uses OData Data Aggregation groupby/aggregate." }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});", "pm.test('value array', function () {", " const j = pm.response.json();", " pm.expect(j.value).to.be.an('array');", "});" ] } } ] }, { "name": "OData:$apply · SQL:GROUP BY/SUM · lengthOfService", "request": { "method": "GET", "header": [{ "key": "Accept", "value": "application/json" }], "url": "{{platformServerUrl}}/odata/UT/Meter?$apply=groupby((manufacturer),aggregate(lengthOfService with sum as sumLoS))&$top=10" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$apply · SQL:GROUP BY/AVG · Payments", "request": { "method": "GET", "header": [{ "key": "Accept", "value": "application/json" }], "url": "{{platformServerUrl}}/odata/UT/Payments?$apply=groupby((paymentMethod),aggregate(paymentAmount_value with average as avgAmt))&$top=10" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$apply · SQL:GROUP BY/MIN/MAX", "request": { "method": "GET", "header": [{ "key": "Accept", "value": "application/json" }], "url": "{{platformServerUrl}}/odata/UT/Meter?$apply=groupby((material),aggregate(lengthOfService with min as minLoS,lengthOfService with max as maxLoS))&$top=10" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$apply+$orderby · SQL:GROUP BY + ORDER BY alias", "request": { "method": "GET", "header": [{ "key": "Accept", "value": "application/json" }], "url": "{{platformServerUrl}}/odata/UT/Meter?$apply=groupby((manufacturer),aggregate($count as cnt))&$orderby=cnt desc&$top=5" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$apply+$filter · SQL:WHERE+GROUP BY", "request": { "method": "GET", "header": [{ "key": "Accept", "value": "application/json" }], "url": "{{platformServerUrl}}/odata/UT/Meter?$filter=lengthOfService ge 0&$apply=groupby((manufacturer),aggregate($count as c))&$top=10" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$apply multi-key · SQL:GROUP BY two props", "request": { "method": "GET", "header": [{ "key": "Accept", "value": "application/json" }], "url": "{{platformServerUrl}}/odata/UT/Meter?$apply=groupby((manufacturer,material),aggregate($count as pairs))&$top=10" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$apply · SQL:COUNT(DISTINCT) · countdistinct", "request": { "method": "GET", "header": [{ "key": "Accept", "value": "application/json" }], "url": "{{platformServerUrl}}/odata/UT/Meter?$apply=groupby((manufacturer),aggregate(serialNumber with countdistinct as distinctSerials))&$top=10", "description": "Maps to COUNT(DISTINCT serialNumber) per ODataApplyToSemanticSql.COUNT_DISTINCT. Fails if Olingo rejects `with countdistinct` spelling—adjust to match server parser." }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] } ] }, { "name": "14 $filter — arithmetic", "item": [ { "name": "OData:$filter · SQL:+ · add", "request": { "method": "GET", "header": [{ "key": "Accept", "value": "application/json" }], "url": "{{platformServerUrl}}/odata/UT/Meter?$filter=lengthOfService add 0 ge 0&$top=1", "description": "OData infix `add` → SQL + (FilterVisitor)." }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$filter · SQL:- · sub", "request": { "method": "GET", "header": [{ "key": "Accept", "value": "application/json" }], "url": "{{platformServerUrl}}/odata/UT/Meter?$filter=lengthOfService sub 0 ge 0&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$filter · SQL:* · mul", "request": { "method": "GET", "header": [{ "key": "Accept", "value": "application/json" }], "url": "{{platformServerUrl}}/odata/UT/Meter?$filter=lengthOfService mul 1 ge 0&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$filter · SQL:/ · div", "request": { "method": "GET", "header": [{ "key": "Accept", "value": "application/json" }], "url": "{{platformServerUrl}}/odata/UT/Payments?$filter=paymentAmount_value div 2 ge 0&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$filter · SQL:% · mod", "request": { "method": "GET", "header": [{ "key": "Accept", "value": "application/json" }], "url": "{{platformServerUrl}}/odata/UT/Meter?$filter=lengthOfService mod 3 ge 0&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$filter · SQL:compound · parens add", "request": { "method": "GET", "header": [{ "key": "Accept", "value": "application/json" }], "url": "{{platformServerUrl}}/odata/UT/Meter?$filter=(lengthOfService add numberOfDials) ge 0&$top=1", "description": "Parenthesized binary add of two Int32 props → SQL (a + b)." }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] } ] }, { "name": "15 $compute — extended", "item": [ { "name": "OData:$compute+$select · SQL:UPPER · toupper", "request": { "method": "GET", "header": [{ "key": "Accept", "value": "application/json" }], "url": "{{platformServerUrl}}/odata/UT/Meter?$compute=toupper(manufacturer) as um&$select=id,um&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$compute+$select · SQL:TRIM · trim", "request": { "method": "GET", "header": [{ "key": "Accept", "value": "application/json" }], "url": "{{platformServerUrl}}/odata/UT/Meter?$compute=trim(manufacturer) as tr&$select=id,tr&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$compute+$select · SQL:POSITION · startswith bool", "request": { "method": "GET", "header": [{ "key": "Accept", "value": "application/json" }], "url": "{{platformServerUrl}}/odata/UT/Meter?$compute=startswith(manufacturer,'x') as sw&$select=id,sw&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$compute+$select · SQL:POSITION · endswith", "request": { "method": "GET", "header": [{ "key": "Accept", "value": "application/json" }], "url": "{{platformServerUrl}}/odata/UT/Meter?$compute=endswith(manufacturer,'x') as ew&$select=id,ew&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$compute+$select · SQL:POSITION · contains", "request": { "method": "GET", "header": [{ "key": "Accept", "value": "application/json" }], "url": "{{platformServerUrl}}/odata/UT/Meter?$compute=contains(manufacturer,'a') as cn&$select=id,cn&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$compute+$select · SQL:SUBSTRING · substring(2)", "request": { "method": "GET", "header": [{ "key": "Accept", "value": "application/json" }], "url": "{{platformServerUrl}}/odata/UT/Meter?$compute=substring(manufacturer,1) as s2&$select=id,s2&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$compute+$select · SQL:SUBSTRING · substring(3)", "request": { "method": "GET", "header": [{ "key": "Accept", "value": "application/json" }], "url": "{{platformServerUrl}}/odata/UT/Meter?$compute=substring(manufacturer,1,3) as s3&$select=id,s3&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$compute+$select · SQL:EXTRACT · month/day", "request": { "method": "GET", "header": [{ "key": "Accept", "value": "application/json" }], "url": "{{platformServerUrl}}/odata/UT/Meter?$compute=month(dateOfManufacture) as mo,day(dateOfManufacture) as dy&$select=id,mo,dy&$top=1", "description": "Two assignments in one $compute (comma-separated)." }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$compute+$select · SQL:FLOOR/CEILING/ROUND(1) · Payments", "request": { "method": "GET", "header": [{ "key": "Accept", "value": "application/json" }], "url": "{{platformServerUrl}}/odata/UT/Payments?$compute=floor(paymentAmount_value) as fl,ceiling(paymentAmount_value) as cl,round(paymentAmount_value) as r1&$select=id,fl,cl,r1&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$compute+$select · SQL:EXTRACT/EPOCH · totalseconds", "request": { "method": "GET", "header": [{ "key": "Accept", "value": "application/json" }], "url": "{{platformServerUrl}}/odata/UT/Meter?$compute=totalseconds(dateOfManufacture) as tsec&$select=id,tsec&$top=1", "description": "May fail on some backends when casting DATE to TIMESTAMP for EPOCH." }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$compute+$select · SQL:CAST DATE/TIME · date time", "request": { "method": "GET", "header": [{ "key": "Accept", "value": "application/json" }], "url": "{{platformServerUrl}}/odata/UT/Meter?$compute=date(dateOfManufacture) as donly,time(dateOfManufacture) as tonly&$select=id,donly,tonly&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$compute+$select · SQL:TIMEZONE · totaloffsetminutes", "request": { "method": "GET", "header": [{ "key": "Accept", "value": "application/json" }], "url": "{{platformServerUrl}}/odata/UT/Meter?$compute=totaloffsetminutes(dateOfManufacture) as tzmin&$select=id,tzmin&$top=1", "description": "Engine-sensitive on Edm.Date → TIMESTAMP WITH TIME ZONE." }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$compute+$select · SQL:fractionalseconds", "request": { "method": "GET", "header": [{ "key": "Accept", "value": "application/json" }], "url": "{{platformServerUrl}}/odata/UT/Meter?$compute=fractionalseconds(dateOfManufacture) as fsec&$select=id,fsec&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] } ] }, { "name": "16 $orderby + $compute (negative — alias orderby)", "item": [ { "name": "OData:$compute+$orderby · NEGATIVE · unknown property on orderby (400)", "request": { "method": "GET", "header": [{ "key": "Accept", "value": "application/json" }], "url": "{{platformServerUrl}}/odata/UT/Meter?$compute=length(manufacturer) as mlen&$select=id,mlen&$orderby=mlen desc&$top=5", "description": "Without server-side rewrite of `$orderby` for `$compute` aliases, Olingo validates `mlen` against the entity type and rejects the request (typically **400**). Order by declared properties only, or use `$select` without ordering on compute-only aliases." }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 400 (Olingo rejects orderby on compute alias)', function () { pm.response.to.have.status(400); });", "pm.test('Error payload', function () { pm.expect(pm.response.text()).to.include('error'); });" ] } } ] } ] }, { "name": "17 CSDL metadata (scripts/error.txt)", "description": "Entity sets, keys, and navs aligned with `scripts/error.txt` AO.UT snapshot: geom strings, Payments/Bills doubles, collection expands, MeterReading navs.", "item": [ { "name": "OData:$select · Storm geom (Edm.String CSDL)", "request": { "method": "GET", "header": [{ "key": "Accept", "value": "application/json" }], "url": "{{platformServerUrl}}/odata/UT/Storm?$select=stormId,geom,name&$top=1", "description": "CSDL: `geom` Type=Edm.String (opaque WKT in JSON until ontology maps GEOMETRY)." }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$select · Premise geom (Edm.String CSDL)", "request": { "method": "GET", "header": [{ "key": "Accept", "value": "application/json" }], "url": "{{platformServerUrl}}/odata/UT/Premise?$select=id,geom,latitude,longitude&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$filter · Payments clearingAmount_value dueDate isOnTime", "request": { "method": "GET", "header": [{ "key": "Accept", "value": "application/json" }], "url": "{{platformServerUrl}}/odata/UT/Payments?$filter=clearingAmount_value ge 0 and year(dueDate) ge 2000 and isOnTime eq true&$top=1", "description": "Extended Payments scalars from CSDL: clearingAmount_value, dueDate, isOnTime." }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$filter · Payments isPaymentReturned returnDate", "request": { "method": "GET", "header": [{ "key": "Accept", "value": "application/json" }], "url": "{{platformServerUrl}}/odata/UT/Payments?$filter=isPaymentReturned eq false or returnDate eq null&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$filter+$expand · Bills doubles and navs", "request": { "method": "GET", "header": [{ "key": "Accept", "value": "application/json" }], "url": "{{platformServerUrl}}/odata/UT/Bills?$filter=finalBalance_value ge 0&$expand=premise($select=id),contractAccount($select=id),customer($select=id,firstName)&$top=1", "description": "Bills: Double *_value fields; navs premise, contractAccount, customer." }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$filter · ContractAccount extra booleans", "request": { "method": "GET", "header": [{ "key": "Accept", "value": "application/json" }], "url": "{{platformServerUrl}}/odata/UT/ContractAccount?$filter=isEbillEnabled eq true or isBudgetBillEnabled eq true or isInstallmentPlanEnabled eq true&$top=1", "description": "CSDL booleans beyond isAutopayEnabled." }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$expand · MeterReading meter + readStatus collection", "request": { "method": "GET", "header": [{ "key": "Accept", "value": "application/json" }], "url": "{{platformServerUrl}}/odata/UT/MeterReading?$expand=meter($select=id,manufacturer),readStatus($select=id,name)&$top=1", "description": "Single nav meter; collection nav readStatus (subset)." }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$filter · MeterReading consumption Single", "request": { "method": "GET", "header": [{ "key": "Accept", "value": "application/json" }], "url": "{{platformServerUrl}}/odata/UT/MeterReading?$filter=consumption ge 0.0&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$expand+$select · CustomerInteractions document contractAccount", "request": { "method": "GET", "header": [{ "key": "Accept", "value": "application/json" }], "url": "{{platformServerUrl}}/odata/UT/CustomerInteractions?$expand=document($select=id,name,type),contractAccount($select=id,isAutopayEnabled)&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$expand · Premise premiseType collection", "request": { "method": "GET", "header": [{ "key": "Accept", "value": "application/json" }], "url": "{{platformServerUrl}}/odata/UT/Premise?$expand=premiseType($select=id,name,description)&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$expand · MonthlyTemperature premise+contractAccount collections", "request": { "method": "GET", "header": [{ "key": "Accept", "value": "application/json" }], "url": "{{platformServerUrl}}/odata/UT/MonthlyTemperature?$expand=premise($select=id),contractAccount($select=id)&$top=1", "description": "Both navs are Collection in CSDL." }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$expand · NeighbourhoodAvgBills multi collection navs", "request": { "method": "GET", "header": [{ "key": "Accept", "value": "application/json" }], "url": "{{platformServerUrl}}/odata/UT/NeighbourhoodAvgBills?$expand=premise($select=id),contractAccount($select=id),customer($select=id)&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$expand · NeighbourhoodAvgPayments collections", "request": { "method": "GET", "header": [{ "key": "Accept", "value": "application/json" }], "url": "{{platformServerUrl}}/odata/UT/NeighbourhoodAvgPayments?$expand=premise($select=id),contractAccount($select=id),customer($select=id)&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$expand · MeterIssues meter+category", "request": { "method": "GET", "header": [{ "key": "Accept", "value": "application/json" }], "url": "{{platformServerUrl}}/odata/UT/MeterIssues?$expand=meter($select=id,serialNumber),category($select=id,name)&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$expand · Contract contractAccount+serviceType", "request": { "method": "GET", "header": [{ "key": "Accept", "value": "application/json" }], "url": "{{platformServerUrl}}/odata/UT/Contract?$expand=contractAccount($select=id),serviceType($select=id,name)&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$expand · CustomerAddress customer+addressType", "request": { "method": "GET", "header": [{ "key": "Accept", "value": "application/json" }], "url": "{{platformServerUrl}}/odata/UT/CustomerAddress?$expand=customer($select=id,firstName),addressType($select=id,name)&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$expand · ServiceOrderNotes serviceOrder", "request": { "method": "GET", "header": [{ "key": "Accept", "value": "application/json" }], "url": "{{platformServerUrl}}/odata/UT/ServiceOrderNotes?$expand=serviceOrder($select=id,statusCode,orderType)&$top=1" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$top · MeterReadType lookup list", "request": { "method": "GET", "header": [{ "key": "Accept", "value": "application/json" }], "url": "{{platformServerUrl}}/odata/UT/MeterReadType?$select=id,name,description&$top=10" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$top · UtilitiesDocument lookup list", "request": { "method": "GET", "header": [{ "key": "Accept", "value": "application/json" }], "url": "{{platformServerUrl}}/odata/UT/UtilitiesDocument?$select=id,name,type&$top=10" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('JSON content-type', function () {", " const ct = pm.response.headers.get('Content-Type') || '';", " pm.expect(ct.toLowerCase()).to.include('json');", "});" ] } } ] }, { "name": "OData:$filter · OPTIONAL geo.intersects Premise.geom column (501 in this build)", "request": { "method": "GET", "header": [{ "key": "Accept", "value": "application/json" }], "url": "{{platformServerUrl}}/odata/UT/Premise?$filter=geo.intersects(geom,'POLYGON((-10 -10,10 -10,10 10,-10 10,-10 -10))')&$select=id&$top=1", "description": "OData `$filter` geo functions are not supported (501), same as literal geo tests in folder 06. To validate `ST_Intersects` against a column, use folder 18 raw SQL." }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status 501 (geo.intersects not in OData $filter)', function () { pm.response.to.have.status(501); });", "pm.test('Error payload', function () { pm.expect(pm.response.text()).to.include('error'); });" ] } } ] } ] }, { "name": "18 MSO semantic SQL — Calcite UDF (MSOFunctions)", "description": "Executes raw semantic SQL so Calcite resolves `ST_*`, `ao_lower`, and other UDFs registered in `MSOSchemaFactory` / `MSOFunctions`. Requires Spring `cloudseer-pipeline` resources on the same host as OData. Set **`ontologyUid`** (ontology UID); for validate, set **`ontologyName`** (ontology display name). SQL uses schema **`UT`** and alias **`t0`** to match OData-generated queries. Each GET uses a **pre-request** script to URL-encode `msoQuery`.", "item": [ { "name": "API:getDataForMsoQuery · ST_Distance literals", "event": [ { "listen": "prerequest", "script": { "type": "text/javascript", "exec": [ "const sql = \"SELECT ST_Distance(ST_GeomFromText('POINT (0 0)'), ST_GeomFromText('POINT (3 4)')) AS d FROM \\\"UT\\\".\\\"Meter\\\" t0 LIMIT 1\";", "const uid = pm.variables.get('ontologyUid');", "const base = pm.variables.get('platformServerUrl');", "pm.request.url = base + '/api/agentic/getDataForMsoQuery?ontologyUid=' + encodeURIComponent(uid || '') + '&limit=3&msoQuery=' + encodeURIComponent(sql);" ] } }, { "listen": "test", "script": { "type": "text/javascript", "exec": [ "const uid = pm.variables.get('ontologyUid');", "if (!uid || !String(uid).trim()) {", " console.warn('18 MSO: set ontologyUid (collection or env) to assert 200');", " return;", "}", "pm.test('Status 200', function () { pm.response.to.have.status(200); });" ] } } ], "request": { "method": "GET", "header": [{ "key": "Accept", "value": "application/json" }], "url": "{{platformServerUrl}}/api/agentic/getDataForMsoQuery", "description": "`AgenticEasyAnswersResource#getDataForMsoQuery` → `QnAService#executeMsoQuery`. Pre-request builds URL with encoded `msoQuery`." } }, { "name": "API:getDataForMsoQuery · ST_Length LINESTRING", "event": [ { "listen": "prerequest", "script": { "type": "text/javascript", "exec": [ "const sql = \"SELECT ST_Length(ST_GeomFromText('LINESTRING (0 0, 3 4)')) AS len FROM \\\"UT\\\".\\\"Meter\\\" t0 LIMIT 1\";", "const uid = pm.variables.get('ontologyUid');", "const base = pm.variables.get('platformServerUrl');", "pm.request.url = base + '/api/agentic/getDataForMsoQuery?ontologyUid=' + encodeURIComponent(uid || '') + '&limit=3&msoQuery=' + encodeURIComponent(sql);" ] } }, { "listen": "test", "script": { "type": "text/javascript", "exec": [ "const uid = pm.variables.get('ontologyUid');", "if (!uid || !String(uid).trim()) { console.warn('18 MSO: set ontologyUid'); return; }", "pm.test('Status 200', function () { pm.response.to.have.status(200); });" ] } } ], "request": { "method": "GET", "header": [{ "key": "Accept", "value": "application/json" }], "url": "{{platformServerUrl}}/api/agentic/getDataForMsoQuery" } }, { "name": "API:getDataForMsoQuery · ST_Intersects literals", "event": [ { "listen": "prerequest", "script": { "type": "text/javascript", "exec": [ "const sql = \"SELECT ST_Intersects(ST_GeomFromText('POINT (1 1)'), ST_GeomFromText('POLYGON ((0 0, 2 0, 2 2, 0 2, 0 0))')) AS hit FROM \\\"UT\\\".\\\"Meter\\\" t0 LIMIT 1\";", "const uid = pm.variables.get('ontologyUid');", "const base = pm.variables.get('platformServerUrl');", "pm.request.url = base + '/api/agentic/getDataForMsoQuery?ontologyUid=' + encodeURIComponent(uid || '') + '&limit=3&msoQuery=' + encodeURIComponent(sql);" ] } }, { "listen": "test", "script": { "type": "text/javascript", "exec": [ "const uid = pm.variables.get('ontologyUid');", "if (!uid || !String(uid).trim()) { console.warn('18 MSO: set ontologyUid'); return; }", "pm.test('Status 200', function () { pm.response.to.have.status(200); });" ] } } ], "request": { "method": "GET", "header": [{ "key": "Accept", "value": "application/json" }], "url": "{{platformServerUrl}}/api/agentic/getDataForMsoQuery" } }, { "name": "API:getDataForMsoQuery · ST_AsText ST_GeomFromText", "event": [ { "listen": "prerequest", "script": { "type": "text/javascript", "exec": [ "const sql = \"SELECT ST_AsText(ST_GeomFromText('POINT (10 20)')) AS wkt FROM \\\"UT\\\".\\\"Meter\\\" t0 LIMIT 1\";", "const uid = pm.variables.get('ontologyUid');", "const base = pm.variables.get('platformServerUrl');", "pm.request.url = base + '/api/agentic/getDataForMsoQuery?ontologyUid=' + encodeURIComponent(uid || '') + '&limit=3&msoQuery=' + encodeURIComponent(sql);" ] } }, { "listen": "test", "script": { "type": "text/javascript", "exec": [ "const uid = pm.variables.get('ontologyUid');", "if (!uid || !String(uid).trim()) { console.warn('18 MSO: set ontologyUid'); return; }", "pm.test('Status 200', function () { pm.response.to.have.status(200); });" ] } } ], "request": { "method": "GET", "header": [{ "key": "Accept", "value": "application/json" }], "url": "{{platformServerUrl}}/api/agentic/getDataForMsoQuery" } }, { "name": "API:getDataForMsoQuery · ao_lower literal", "event": [ { "listen": "prerequest", "script": { "type": "text/javascript", "exec": [ "const sql = \"SELECT ao_lower('HELLO WORLD') AS lowered FROM \\\"UT\\\".\\\"Meter\\\" t0 LIMIT 1\";", "const uid = pm.variables.get('ontologyUid');", "const base = pm.variables.get('platformServerUrl');", "pm.request.url = base + '/api/agentic/getDataForMsoQuery?ontologyUid=' + encodeURIComponent(uid || '') + '&limit=3&msoQuery=' + encodeURIComponent(sql);" ] } }, { "listen": "test", "script": { "type": "text/javascript", "exec": [ "const uid = pm.variables.get('ontologyUid');", "if (!uid || !String(uid).trim()) { console.warn('18 MSO: set ontologyUid'); return; }", "pm.test('Status 200', function () { pm.response.to.have.status(200); });" ] } } ], "request": { "method": "GET", "header": [{ "key": "Accept", "value": "application/json" }], "url": "{{platformServerUrl}}/api/agentic/getDataForMsoQuery", "description": "MSO UDF `ao_lower(String)` from `MSOFunctions`; uses a literal so it does not depend on row data." } }, { "name": "API:getDataForMsoQuery · ST_Distance column + literal (Premise geom)", "event": [ { "listen": "prerequest", "script": { "type": "text/javascript", "exec": [ "const sql = \"SELECT t0.\\\"id\\\", ST_Distance(ST_GeomFromText(t0.\\\"geom\\\"), ST_GeomFromText('POINT (0 0)')) AS d FROM \\\"UT\\\".\\\"Premise\\\" t0 WHERE t0.\\\"geom\\\" IS NOT NULL LIMIT 3\";", "const uid = pm.variables.get('ontologyUid');", "const base = pm.variables.get('platformServerUrl');", "pm.request.url = base + '/api/agentic/getDataForMsoQuery?ontologyUid=' + encodeURIComponent(uid || '') + '&limit=3&msoQuery=' + encodeURIComponent(sql);" ] } }, { "listen": "test", "script": { "type": "text/javascript", "exec": [ "const uid = pm.variables.get('ontologyUid');", "if (!uid || !String(uid).trim()) { console.warn('18 MSO: set ontologyUid'); return; }", "pm.test('200 or SQL/geom error', function () { pm.expect([200, 400, 500]).to.include(pm.response.code); });" ] } } ], "request": { "method": "GET", "header": [{ "key": "Accept", "value": "application/json" }], "url": "{{platformServerUrl}}/api/agentic/getDataForMsoQuery", "description": "Requires `geom` as WKT text; fails if binary/invalid — adjust per ontology." } }, { "name": "API:getMsoQueryCount · ST_Distance literal query", "event": [ { "listen": "prerequest", "script": { "type": "text/javascript", "exec": [ "const sql = \"SELECT ST_Distance(ST_GeomFromText('POINT (0 0)'), ST_GeomFromText('POINT (1 1)')) AS d FROM \\\"UT\\\".\\\"Meter\\\" t0 LIMIT 1\";", "const uid = pm.variables.get('ontologyUid');", "const base = pm.variables.get('platformServerUrl');", "pm.request.url = base + '/api/agentic/getMsoQueryCount?ontologyUid=' + encodeURIComponent(uid || '') + '&msoQuery=' + encodeURIComponent(sql);" ] } }, { "listen": "test", "script": { "type": "text/javascript", "exec": [ "const uid = pm.variables.get('ontologyUid');", "if (!uid || !String(uid).trim()) { console.warn('18 MSO: set ontologyUid'); return; }", "pm.test('Status 200', function () { pm.response.to.have.status(200); });" ] } } ], "request": { "method": "GET", "header": [{ "key": "Accept", "value": "application/json" }], "url": "{{platformServerUrl}}/api/agentic/getMsoQueryCount" } }, { "name": "API:validateMsoQuery · POST AOCalciteUtils", "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/json" }, { "key": "Content-Type", "value": "text/plain" } ], "body": { "mode": "raw", "raw": "SELECT ST_AsText(ST_GeomFromText('POINT (1 2)')) AS wkt FROM \"UT\".\"Meter\" t0 LIMIT 1", "options": { "raw": { "language": "text" } } }, "url": "{{platformServerUrl}}/api/easyAnswers/validateMsoQuery?ontologyName={{ontologyName}}", "description": "`QnAResource#validateMsoQuery` — body is raw semantic SQL; query param **`ontologyName`** (display name, not UID)." }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "const on = pm.variables.get('ontologyName');", "if (!on || !String(on).trim()) { console.warn('18 MSO: set collection variable ontologyName for validate'); return; }", "pm.test('Status 200', function () { pm.response.to.have.status(200); });", "pm.test('validation payload', function () { const j = pm.response.json(); pm.expect(j).to.have.property('success'); });" ] } } ] } ] } ] }