{ "info": { "_postman_id": "65fbf73d-e86b-423e-a2a0-af6a2c29cde0", "name": "cpmPlus OData Examples", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" }, "item": [ { "name": "Equipment instance queries", "item": [ { "name": "Path", "request": { "method": "GET", "header": [], "url": { "raw": "https://{{cpmPlusUrl}}/odata/Path", "protocol": "https", "host": [ "{{cpmPlusUrl}}" ], "path": [ "odata", "Path" ] } }, "response": [] }, { "name": "Path Client Paging", "request": { "method": "GET", "header": [], "url": { "raw": "https://{{cpmPlusUrl}}/odata/Path?$top=10", "protocol": "https", "host": [ "{{cpmPlusUrl}}" ], "path": [ "odata", "Path" ], "query": [ { "key": "$top", "value": "10" } ] }, "description": "Note that by using top, we will not receive a next link if there are more items after the first 10." }, "response": [] }, { "name": "Path Server Paging", "request": { "method": "GET", "header": [ { "key": "Prefer", "value": "odata.maxpagesize=10", "type": "text" } ], "url": { "raw": "https://{{cpmPlusUrl}}/odata/Path", "protocol": "https", "host": [ "{{cpmPlusUrl}}" ], "path": [ "odata", "Path" ] }, "description": "By specifying the odata.maxpagesize in the Prefer header we can control the server side paging." }, "response": [] }, { "name": "Path?$select=Id,DisplayName", "request": { "method": "GET", "header": [], "url": { "raw": "https://{{cpmPlusUrl}}/odata/Path?$select=Id,DisplayName", "protocol": "https", "host": [ "{{cpmPlusUrl}}" ], "path": [ "odata", "Path" ], "query": [ { "key": "$select", "value": "Id,DisplayName" } ] } }, "response": [] }, { "name": "Path?$expand=Equipment", "request": { "method": "GET", "header": [], "url": { "raw": "https://{{cpmPlusUrl}}/odata/Path?$expand=Equipment", "protocol": "https", "host": [ "{{cpmPlusUrl}}" ], "path": [ "odata", "Path" ], "query": [ { "key": "$expand", "value": "Equipment" } ] } }, "response": [] }, { "name": "Path?$expand=Equipment($expand=Base)", "request": { "method": "GET", "header": [], "url": { "raw": "https://{{cpmPlusUrl}}/odata/Path?$expand=Equipment($expand=Base)", "protocol": "https", "host": [ "{{cpmPlusUrl}}" ], "path": [ "odata", "Path" ], "query": [ { "key": "$expand", "value": "Equipment($expand=Base)" } ] } }, "response": [] }, { "name": "Path?$expand=Equipment($select=Name)&$select=DisplayName", "request": { "method": "GET", "header": [], "url": { "raw": "https://{{cpmPlusUrl}}/odata/Path?$expand=Equipment($select=Name)&$select=Equipment", "protocol": "https", "host": [ "{{cpmPlusUrl}}" ], "path": [ "odata", "Path" ], "query": [ { "key": "$expand", "value": "Equipment($select=Name)" }, { "key": "$select", "value": "Equipment" } ] } }, "response": [] }, { "name": "Path?$filter=Manufacturer eq 'Tank Company'", "request": { "method": "GET", "header": [], "url": { "raw": "https://{{cpmPlusUrl}}/odata/Path?$filter=Manufacturer eq 'Tank Company'", "protocol": "https", "host": [ "{{cpmPlusUrl}}" ], "path": [ "odata", "Path" ], "query": [ { "key": "$filter", "value": "Manufacturer eq 'Tank Company'" } ] } }, "response": [] }, { "name": "Path_Pipe", "request": { "method": "GET", "header": [], "url": { "raw": "https://{{cpmPlusUrl}}/odata/Path_Pipe", "protocol": "https", "host": [ "{{cpmPlusUrl}}" ], "path": [ "odata", "Path_Pipe" ] } }, "response": [] }, { "name": "Path_Pipe('Example site.Water transfer system.Pipe')", "request": { "method": "GET", "header": [], "url": { "raw": "https://{{cpmPlusUrl}}/odata/Path_Pipe('Example site.Water transfer system.Pipe')", "protocol": "https", "host": [ "{{cpmPlusUrl}}" ], "path": [ "odata", "Path_Pipe('Example site.Water transfer system.Pipe')" ] } }, "response": [] } ], "event": [ { "listen": "prerequest", "script": { "id": "65c1dc52-eead-4a7f-a3b5-6fd02b65230f", "type": "text/javascript", "exec": [ "" ] } }, { "listen": "test", "script": { "id": "ff9c11b3-977e-40ed-aca7-e5c5e3c02143", "type": "text/javascript", "exec": [ "" ] } } ], "protocolProfileBehavior": {} }, { "name": "Equipment class queries", "item": [ { "name": "Equipment", "request": { "method": "GET", "header": [], "url": { "raw": "https://{{cpmPlusUrl}}/odata/Equipment", "protocol": "https", "host": [ "{{cpmPlusUrl}}" ], "path": [ "odata", "Equipment" ] } }, "response": [] }, { "name": "Equipment(Id=eacf9022-4819-4710-9d04-bb40d30c91c7)", "request": { "method": "GET", "header": [], "url": { "raw": "https://{{cpmPlusUrl}}/odata/Equipment(Id=eacf9022-4819-4710-9d04-bb40d30c91c7)", "protocol": "https", "host": [ "{{cpmPlusUrl}}" ], "path": [ "odata", "Equipment(Id=eacf9022-4819-4710-9d04-bb40d30c91c7)" ] } }, "response": [] }, { "name": "Equipment('Pump')", "request": { "method": "GET", "header": [], "url": { "raw": "https://{{cpmPlusUrl}}/odata/Equipment('Pump')", "protocol": "https", "host": [ "{{cpmPlusUrl}}" ], "path": [ "odata", "Equipment('Pump')" ] } }, "response": [] } ], "event": [ { "listen": "prerequest", "script": { "id": "e0e9debb-503b-49c5-b058-8880bddc58d4", "type": "text/javascript", "exec": [ "" ] } }, { "listen": "test", "script": { "id": "0f424320-45b7-45a6-bf14-93670d0cc5e7", "type": "text/javascript", "exec": [ "" ] } } ], "protocolProfileBehavior": {} }, { "name": "Functions", "item": [ { "name": "FetchGraphData (mandatory)", "request": { "method": "GET", "header": [], "url": { "raw": "https://{{cpmPlusUrl}}/odata/FetchGraphData(classname='EquipmentHistory', startx='2020-02-01T00:00:00Z', endx='2020-03-01T00:00:00Z', wherestring='Path=%3F AND Property=%3F', whereargs=['Example site.Water transfer system.Tank area.Source tank', 'Level'])", "protocol": "https", "host": [ "{{cpmPlusUrl}}" ], "path": [ "odata", "FetchGraphData(classname='EquipmentHistory', startx='2020-02-01T00:00:00Z', endx='2020-03-01T00:00:00Z', wherestring='Path=%3F AND Property=%3F', whereargs=['Example site.Water transfer system.Tank area.Source tank', 'Level'])" ] } }, "response": [] }, { "name": "FetchGraphData (all)", "request": { "method": "GET", "header": [], "url": { "raw": "https://{{cpmPlusUrl}}/odata/FetchGraphData(classname='EquipmentHistory', startx='2020-02-20T00:00:00Z', endx='2020-03-01T00:00:00Z', wherestring='Path=%3F AND Property=%3F', whereargs=['Example site.Water transfer system.Tank area.Source tank', 'Level'], xproperty='Time', yproperty='Value', yformat=ABB.Vtrin.OData.RETURN_FORMAT'ALL', statusformat=ABB.Vtrin.OData.RETURN_FORMAT'ALL', filter='AVG30min')", "protocol": "https", "host": [ "{{cpmPlusUrl}}" ], "path": [ "odata", "FetchGraphData(classname='EquipmentHistory', startx='2020-02-20T00:00:00Z', endx='2020-03-01T00:00:00Z', wherestring='Path=%3F AND Property=%3F', whereargs=['Example site.Water transfer system.Tank area.Source tank', 'Level'], xproperty='Time', yproperty='Value', yformat=ABB.Vtrin.OData.RETURN_FORMAT'ALL', statusformat=ABB.Vtrin.OData.RETURN_FORMAT'ALL', filter='AVG30min')" ] } }, "response": [] }, { "name": "FetchGraphDataMerge (mandatory)", "request": { "method": "GET", "header": [], "url": { "raw": "https://{{cpmPlusUrl}}/odata/FetchGraphDataMerge(classnames=['EquipmentHistory', 'EquipmentHistory'], wherestrings=['Path=%3F AND Property=%3F', 'Path=%3F AND Property=%3F'], whereargs=['Example site.Water transfer system.Tank area.Source tank', 'Level', 'Example site.Water transfer system.Tank area.Target tank', 'Level'], startx='2020-02-26T11:00:12.459826Z', endx= '2020-02-26T11:00:23.459826Z')", "protocol": "https", "host": [ "{{cpmPlusUrl}}" ], "path": [ "odata", "FetchGraphDataMerge(classnames=['EquipmentHistory', 'EquipmentHistory'], wherestrings=['Path=%3F AND Property=%3F', 'Path=%3F AND Property=%3F'], whereargs=['Example site.Water transfer system.Tank area.Source tank', 'Level', 'Example site.Water transfer system.Tank area.Target tank', 'Level'], startx='2020-02-26T11:00:12.459826Z', endx= '2020-02-26T11:00:23.459826Z')" ] } }, "response": [] }, { "name": "FetchGraphDataMerge (all)", "request": { "method": "GET", "header": [], "url": { "raw": "https://{{cpmPlusUrl}}/odata/FetchGraphDataMerge(classnames=['EquipmentHistory', 'EquipmentHistory'], wherestrings=['Path=%3F AND Property=%3F', 'Path=%3F AND Property=%3F'], whereargs=['Example site.Water transfer system.Tank area.Source tank', 'Level', 'Example site.Water transfer system.Tank area.Target tank', 'Level'], startx='2020-02-26T11:00:12.459826Z', endx= '2020-02-26T11:00:23.459826Z', xpropertys=['Time', 'Time'], ypropertys=['Value', 'Value'], queryfilters=['', ''], mergefilter='', yformat=ABB.Vtrin.OData.RETURN_FORMAT'FORMATED', statusformat=ABB.Vtrin.OData.RETURN_FORMAT'FORMATED')", "protocol": "https", "host": [ "{{cpmPlusUrl}}" ], "path": [ "odata", "FetchGraphDataMerge(classnames=['EquipmentHistory', 'EquipmentHistory'], wherestrings=['Path=%3F AND Property=%3F', 'Path=%3F AND Property=%3F'], whereargs=['Example site.Water transfer system.Tank area.Source tank', 'Level', 'Example site.Water transfer system.Tank area.Target tank', 'Level'], startx='2020-02-26T11:00:12.459826Z', endx= '2020-02-26T11:00:23.459826Z', xpropertys=['Time', 'Time'], ypropertys=['Value', 'Value'], queryfilters=['', ''], mergefilter='', yformat=ABB.Vtrin.OData.RETURN_FORMAT'FORMATED', statusformat=ABB.Vtrin.OData.RETURN_FORMAT'FORMATED')" ] } }, "response": [] }, { "name": "FetchGraphDataStack (mandatory)", "request": { "method": "GET", "header": [], "url": { "raw": "https://{{cpmPlusUrl}}/odata/FetchGraphDataStack(classnames=['EquipmentHistory', 'EquipmentHistory'], wherestrings=['Path=%3F AND Property=%3F', 'Path=%3F AND Property=%3F'], whereargs=['Example site.Water transfer system.Tank area.Source tank', 'Level', 'Example site.Water transfer system.Tank area.Target tank', 'Level'], startx='2020-02-26T11:00:12.459826Z', endx= '2020-02-26T11:00:23.459826Z')", "protocol": "https", "host": [ "{{cpmPlusUrl}}" ], "path": [ "odata", "FetchGraphDataStack(classnames=['EquipmentHistory', 'EquipmentHistory'], wherestrings=['Path=%3F AND Property=%3F', 'Path=%3F AND Property=%3F'], whereargs=['Example site.Water transfer system.Tank area.Source tank', 'Level', 'Example site.Water transfer system.Tank area.Target tank', 'Level'], startx='2020-02-26T11:00:12.459826Z', endx= '2020-02-26T11:00:23.459826Z')" ] } }, "response": [] }, { "name": "FetchGraphDataStack (all)", "request": { "method": "GET", "header": [], "url": { "raw": "https://{{cpmPlusUrl}}/odata/FetchGraphDataStack(classnames=['EquipmentHistory', 'EquipmentHistory'], wherestrings=['Path=%3F AND Property=%3F', 'Path=%3F AND Property=%3F'], whereargs=['Example site.Water transfer system.Tank area.Source tank', 'Level', 'Example site.Water transfer system.Tank area.Target tank', 'Level'], startx='2020-02-26T11:00:12.459826Z', endx= '2020-02-26T11:00:23.459826Z', xpropertys=['Time', 'Time'], ypropertys=['Value', 'Value'], queryfilters=['', ''], stackfilter='', yformat=ABB.Vtrin.OData.RETURN_FORMAT'FORMATED', statusformat=ABB.Vtrin.OData.RETURN_FORMAT'FORMATED')", "protocol": "https", "host": [ "{{cpmPlusUrl}}" ], "path": [ "odata", "FetchGraphDataStack(classnames=['EquipmentHistory', 'EquipmentHistory'], wherestrings=['Path=%3F AND Property=%3F', 'Path=%3F AND Property=%3F'], whereargs=['Example site.Water transfer system.Tank area.Source tank', 'Level', 'Example site.Water transfer system.Tank area.Target tank', 'Level'], startx='2020-02-26T11:00:12.459826Z', endx= '2020-02-26T11:00:23.459826Z', xpropertys=['Time', 'Time'], ypropertys=['Value', 'Value'], queryfilters=['', ''], stackfilter='', yformat=ABB.Vtrin.OData.RETURN_FORMAT'FORMATED', statusformat=ABB.Vtrin.OData.RETURN_FORMAT'FORMATED')" ] } }, "response": [] }, { "name": "FetchGraphDataCalc (mandatory)", "request": { "method": "GET", "header": [], "url": { "raw": "https://{{cpmPlusUrl}}/odata/FetchGraphDataCalc(classnames=['EquipmentHistory', 'EquipmentHistory'], wherestrings=['Path=%3F AND Property=%3F', 'Path=%3F AND Property=%3F'], whereargs=['Example site.Water transfer system.Tank area.Source tank', 'Level', 'Example site.Water transfer system.Tank area.Target tank', 'Level'], startx='2020-02-26T11:00:12.459826Z', endx= '2020-02-26T11:00:23.459826Z', expression='A+B', expressionIndices=['A', 'B'])", "protocol": "https", "host": [ "{{cpmPlusUrl}}" ], "path": [ "odata", "FetchGraphDataCalc(classnames=['EquipmentHistory', 'EquipmentHistory'], wherestrings=['Path=%3F AND Property=%3F', 'Path=%3F AND Property=%3F'], whereargs=['Example site.Water transfer system.Tank area.Source tank', 'Level', 'Example site.Water transfer system.Tank area.Target tank', 'Level'], startx='2020-02-26T11:00:12.459826Z', endx= '2020-02-26T11:00:23.459826Z', expression='A+B', expressionIndices=['A', 'B'])" ] } }, "response": [] }, { "name": "FetchGraphDataCalc (all)", "request": { "method": "GET", "header": [], "url": { "raw": "https://{{cpmPlusUrl}}/odata/FetchGraphDataCalc(classnames=['EquipmentHistory', 'EquipmentHistory'], wherestrings=['Path=%3F AND Property=%3F', 'Path=%3F AND Property=%3F'], whereargs=['Example site.Water transfer system.Tank area.Source tank', 'Level', 'Example site.Water transfer system.Tank area.Target tank', 'Level'], startx='2020-02-26T11:00:12.459826Z', endx= '2020-02-26T11:00:23.459826Z', expression='A+B', expressionIndices=['A', 'B'], xpropertys=['Time', 'Time'], ypropertys=['Value', 'Value'], queryfilters=['', ''], calcfilter='', yformat=ABB.Vtrin.OData.RETURN_FORMAT'FORMATED', statusformat=ABB.Vtrin.OData.RETURN_FORMAT'FORMATED')", "protocol": "https", "host": [ "{{cpmPlusUrl}}" ], "path": [ "odata", "FetchGraphDataCalc(classnames=['EquipmentHistory', 'EquipmentHistory'], wherestrings=['Path=%3F AND Property=%3F', 'Path=%3F AND Property=%3F'], whereargs=['Example site.Water transfer system.Tank area.Source tank', 'Level', 'Example site.Water transfer system.Tank area.Target tank', 'Level'], startx='2020-02-26T11:00:12.459826Z', endx= '2020-02-26T11:00:23.459826Z', expression='A+B', expressionIndices=['A', 'B'], xpropertys=['Time', 'Time'], ypropertys=['Value', 'Value'], queryfilters=['', ''], calcfilter='', yformat=ABB.Vtrin.OData.RETURN_FORMAT'FORMATED', statusformat=ABB.Vtrin.OData.RETURN_FORMAT'FORMATED')" ] } }, "response": [] } ], "protocolProfileBehavior": {} }, { "name": "Actions", "item": [ { "name": "WriteGraphData (Write)", "request": { "method": "POST", "header": [ { "key": "Content-Type", "name": "Content-Type", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{\r\n\t\"classname\": \"EquipmentHistory\",\r\n\t\"XValues\": [\"2020-03-02T13:00:00Z\", \"2020-03-02T14:00:00Z\"],\r\n\t\"YValues\": [1500, 2000],\r\n\t\"Statuses\": [\"OK\", \"OK\"],\r\n\t\"wherestring\": \"Path=? AND Property=?\",\r\n\t\"whereargs\": [\"Example site.Water transfer system.Tank area.Target tank\", \"Level\"]\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{cpmPlusUrl}}/odata/WriteGraphData()", "protocol": "https", "host": [ "{{cpmPlusUrl}}" ], "path": [ "odata", "WriteGraphData()" ] } }, "response": [] }, { "name": "WriteGraphData (Delete)", "request": { "method": "POST", "header": [ { "key": "Content-Type", "name": "Content-Type", "type": "text", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\r\n\t\"classname\": \"EquipmentHistory\",\r\n\t\"XValues\": [\"2020-03-02T13:00:00Z\", \"2020-03-02T14:00:00Z\"],\r\n\t\"YValues\": [null, null],\r\n\t\"Statuses\": [\"OK\", \"OK\"],\r\n\t\"wherestring\": \"Path=? AND Property=?\",\r\n\t\"whereargs\": [\"Example site.Water transfer system.Tank area.Target tank\", \"Level\"]\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{cpmPlusUrl}}/odata/WriteGraphData()", "protocol": "https", "host": [ "{{cpmPlusUrl}}" ], "path": [ "odata", "WriteGraphData()" ] } }, "response": [] }, { "name": "ReplaceGraphDataRange (Replace)", "request": { "method": "POST", "header": [ { "key": "Content-Type", "name": "Content-Type", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{\r\n\t\"classname\": \"EquipmentHistory\",\r\n\t\"startx\" : \"2020-03-02T12:00:00Z\",\r\n\t\"endx\" : \"2020-03-02T15:00:00Z\",\r\n\t\"XValues\": [\"2020-03-02T12:00:00Z\", \"2020-03-02T15:00:00Z\"],\r\n\t\"YValues\": [2500, 3000],\r\n\t\"Statuses\": [\"OK\", \"OK\"],\r\n\t\"wherestring\": \"Path=? AND Property=?\",\r\n\t\"whereargs\": [\"Example site.Water transfer system.Tank area.Target tank\", \"Level\"]\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{cpmPlusUrl}}/odata/ReplaceGraphDataRange()", "protocol": "https", "host": [ "{{cpmPlusUrl}}" ], "path": [ "odata", "ReplaceGraphDataRange()" ] } }, "response": [] }, { "name": "ReplaceGraphDataRange (Delete)", "request": { "method": "POST", "header": [ { "key": "Content-Type", "name": "Content-Type", "type": "text", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\r\n\t\"classname\": \"EquipmentHistory\",\r\n\t\"startx\" : \"2020-03-02T12:00:00Z\",\r\n\t\"endx\" : \"2020-03-02T15:00:00Z\",\r\n\t\"XValues\": [],\r\n\t\"YValues\": [],\r\n\t\"Statuses\": [],\r\n\t\"wherestring\": \"Path=? AND Property=?\",\r\n\t\"whereargs\": [\"Example site.Water transfer system.Tank area.Target tank\", \"Level\"]\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{cpmPlusUrl}}/odata/ReplaceGraphDataRange()", "protocol": "https", "host": [ "{{cpmPlusUrl}}" ], "path": [ "odata", "ReplaceGraphDataRange()" ] } }, "response": [] } ], "protocolProfileBehavior": {} }, { "name": "Service document", "request": { "method": "GET", "header": [], "url": { "raw": "https://{{cpmPlusUrl}}/odata", "protocol": "https", "host": [ "{{cpmPlusUrl}}" ], "path": [ "odata" ] } }, "response": [] }, { "name": "Metadata document", "request": { "method": "GET", "header": [], "url": { "raw": "https://{{cpmPlusUrl}}/odata$metadata", "protocol": "https", "host": [ "{{cpmPlusUrl}}" ], "path": [ "odata$metadata" ] } }, "response": [] } ], "auth": { "type": "basic", "basic": [ { "key": "password", "value": "{{cpmPlusPassword}}", "type": "string" }, { "key": "username", "value": "{{cpmPlusUsername}}", "type": "string" } ] }, "event": [ { "listen": "prerequest", "script": { "id": "ed0cac00-5b5d-4084-87fb-31dbb6370c7e", "type": "text/javascript", "exec": [ "" ] } }, { "listen": "test", "script": { "id": "df4a39e1-2637-4887-bc46-8a6809679f58", "type": "text/javascript", "exec": [ "" ] } } ], "protocolProfileBehavior": {} }