Presentation API Resource

HDC Presentation returned in JSON data type Web Service.

GET /presentation/json

Get list of presentations.

Response Body
media type data type description
application/json object JSON Response with the list of presentations and filters.

Example of response:

{"list":[{"presentationId":"2","presentationName":"Area","presentationDescription":"Test presentation 2","isAutomatic":false},{"presentationId":"22","presentationName":"Functionality","presentationDescription":"","isAutomatic":false},]}

POST /presentation/adhoc/json

Register ad hoc presentation

If showCustomSummary is set to true, summaryLabel and summarySufix should be provided. SummaryField - field from external domain that will be used to calculate custom summary column and totals. If not given when showCustomSummary is enabled, a summaryValue must be provided for all objects. A numeric value must be used in all cases.

Example of request:

{"filter": {"title": "Room Type test3", "domain": "3207", "objectClass": "HDV_H1_SPACE", "showSpotArea": false, "showCount": true, "showCustomSummary": true, "summaryLabel": "Area BRA", "summarySuffix" : "m2", "summaryField": "fi2space_areabra" }, "objects": [{ "value": "WC", "id": "5105701/10/1", "summaryValue": 50}, { "value": "BAD", "id": "5105701/10/107", "summaryValue": 30 }, { "value": "ROOM", "id": "5105701/10/106", "summaryValue": 22}, { "value": "ROOM", "id": "5105701/10/7", "summaryValue": 23}],"tools": [{ "name": "WC", "fillColor": "green", "fillOpacity": "0.4", "strokeColor": "darkgreen", "strokeOpacity": "0.8"}, { "name": "BAD", "fillColor": "blue", "fillOpacity": "0.4", "strokeColor": "darkblue", "strokeOpacity": "0.8"}, { "name": "ROOM", "fillColor": "blue", "fillOpacity": "0.4", "strokeColor": "darkblue", "strokeOpacity": "0.8"}] }

Request Body
media type data type description
application/json object JSON with definition of ad hoc presentation
Response Body
media type data type description
application/json object JSON with presentation id

Example of response:

{"objectId":"1081122505"}

POST /presentation/areareport/json

Request Body
media type data type description
application/json object JSON with definition of ad hoc area report presentation
Response Body
media type data type description
application/json object JSON with presentation id {"layerMode":true,"params":{"layerId":2,"vectorId":41482,"params":{"fieldId":"hd_objcustom2","classId":108,"precision":"2"}},"filter":{"title":"Area Report","hdcClassId":108,"showSpotArea":true,"showCount":true,"showCustomSummary":false},"tools":[{"name":"Success","vectorEffect":"none","fillColor":"#fcf16b","fillOpacity":"0.5","strokeColor":"#00ff00","strokeOpacity":"1","strokeWidth":"2px"},{"name":"Error","vectorEffect":"none","fillColor":"#e3e3e3","fillOpacity":"1","strokeColor":"#ff5c00","strokeOpacity":"1","strokeWidth":"2px"}]}

Example of response:

{"objectId":"1081122505"}

POST /presentation/hqlcriteria/json

Register hql criteria presentation for filtered objects' spots selection.

Treated as ad hoc presentation with following limitations: one should input one filter and one tool for Selection purposes It is advised to set ShowSpotArea to true and showCustomSummary to false.

Request Body
media type data type description
application/json object JSON with definition of ad hoc presentation
Response Body
media type data type description
application/json object JSON with presentation id {"hqlFilterCriteriaContext":{"perspectiveId":"121","hqlCriteria":"(fi2space_name is not empty) and (fi2space_function is not empty)","objects":[{"classId":18,"objectId":"5555","securityMask":"11","objectName":"RU: 2","perspectiveId":"12","navigate":null}]},"filter":{"title":"Selection","hdcClassId":18,"showSpotArea":true,"showCount":true,"showCustomSummary":false,"summaryLabel":"Area BRA","summarySuffix":"m2"},"tools":[{"name":"Selection","fillColor":"yellow","fillOpacity":"0.4","strokeColor":"darkgreen","strokeOpacity":"2px"}]}

Example of response:

{"objectId":"1081122505"}

GET /presentation/json/{drawingId}/{presentationId}

Apply presentation to drawing.

Request Parameters
name type description default constraints
drawingId path Id of a drawing that presentation is being applied to   long
presentationId path Presentation id   long
contextObjects query list of context objects    
Response Body
media type data type description
application/json object JSON Response text representation of applied presentation to drawing

Example of response:

{"spots":[{"spotId":"110023","filterId":"1437"},{"spotId":"110026","filterId":"1436"}],"filters":[{"label":"Area greater than 10","id":"1437","count":"1","sourceClass":"14","sourceClassLabel":"Room","hql":"fi2space_areanta >= 10","toolset":{"id":"3250","objectName":"jMeter","style":{"id":"---","stroke":"#000000","fill":"#FFFF00","fill-opacity":"0.5","stroke-opacity":"1","stroke-width":"0.7"}}},{"label":"Area smaller than 10","id":"1436","count":"1","sourceClass":"14","sourceClassLabel":"Room","hql":"fi2space_areanta <= 10","toolset":{"id":"3249","objectName":"toolset","style":{"id":"3249","stroke":"#00FFFF","fill":"#008000","fill-opacity":"1","stroke-opacity":"1","stroke-width":"0.8"}}}],"drawingId":"2550"}

POST /presentation/json/{drawingId}/{presentationId}

Apply presentation to drawing with additional hql filter data and criteria Example of request:

{"perspectiveId":"11","childClassId":108,"hqlCriteria":"(fi2space_function is not empty)","objects":[{"classId":128,"objectId":"51796"}]}

Request Parameters
name type description default constraints
drawingId path Id of a drawing that presentation is being applied to   long
presentationId path Presentation id   long
contextObjects query list of context objects    
Request Body
media type data type description
application/json object JSON with presentation filter data and criteria
Response Body
media type data type description
application/json object JSON Response text representation of applied presentation to drawing

Example of response:

{"spots":[{"spotId":"110023","filterId":"1437"},{"spotId":"110026","filterId":"1436"}],"filters":[{"label":"Area greater than 10","id":"1437","count":"1","sourceClass":"14","sourceClassLabel":"Room","hql":"fi2space_areanta >= 10","toolset":{"id":"3250","objectName":"jMeter","style":{"id":"---","stroke":"#000000","fill":"#FFFF00","fill-opacity":"0.5","stroke-opacity":"1","stroke-width":"0.7"}}},{"label":"Area smaller than 10","id":"1436","count":"1","sourceClass":"14","sourceClassLabel":"Room","hql":"fi2space_areanta <= 10","toolset":{"id":"3249","objectName":"toolset","style":{"id":"3249","stroke":"#00FFFF","fill":"#008000","fill-opacity":"1","stroke-opacity":"1","stroke-width":"0.8"}}}],"drawingId":"2550"}

GET /presentation/byguid/json/{drawingId}/{presentationId}

Apply presentation to drawing.

Request Parameters
name type description default constraints
drawingId path Id of a drawing that presentation is being applied to   long
presentationId path Presentation id   long
contextObjects query list of context objects identified by UUID identifier    
Response Body
media type data type description
application/json object JSON Response text representation of applied presentation to drawing

Example of response:

{"spots":[{"spotId":"110023","filterId":"1437"},{"spotId":"110026","filterId":"1436"}],"filters":[{"label":"Area greater than 10","id":"1437","count":"1","sourceClass":"14","sourceClassLabel":"Room","hql":"fi2space_areanta >= 10","toolset":{"id":"3250","objectName":"jMeter","style":{"id":"---","stroke":"#000000","fill":"#FFFF00","fill-opacity":"0.5","stroke-opacity":"1","stroke-width":"0.7"}}},{"label":"Area smaller than 10","id":"1436","count":"1","sourceClass":"14","sourceClassLabel":"Room","hql":"fi2space_areanta <= 10","toolset":{"id":"3249","objectName":"toolset","style":{"id":"3249","stroke":"#00FFFF","fill":"#008000","fill-opacity":"1","stroke-opacity":"1","stroke-width":"0.8"}}}],"drawingId":"2550"}

POST /presentation/byguid/json/{drawingId}/{presentationId}

Apply presentation to drawing with additional hql filter data and criteria Example of request:

{"perspectiveId":"11","childClassId":108,"hqlCriteria":"(fi2space_function is not empty)","objects":[{"systemGuid":"51796"}]}

Request Parameters
name type description default constraints
drawingId path Id of a drawing that presentation is being applied to   long
presentationId path Presentation id   long
contextObjects query list of context objects identified by UUID identifier    
Request Body
media type data type description
application/json object JSON with presentation filter data and criteria
Response Body
media type data type description
application/json object JSON Response text representation of applied presentation to drawing

Example of response:

{"spots":[{"spotId":"110023","filterId":"1437"},{"spotId":"110026","filterId":"1436"}],"filters":[{"label":"Area greater than 10","id":"1437","count":"1","sourceClass":"14","sourceClassLabel":"Room","hql":"fi2space_areanta >= 10","toolset":{"id":"3250","objectName":"jMeter","style":{"id":"---","stroke":"#000000","fill":"#FFFF00","fill-opacity":"0.5","stroke-opacity":"1","stroke-width":"0.7"}}},{"label":"Area smaller than 10","id":"1436","count":"1","sourceClass":"14","sourceClassLabel":"Room","hql":"fi2space_areanta <= 10","toolset":{"id":"3249","objectName":"toolset","style":{"id":"3249","stroke":"#00FFFF","fill":"#008000","fill-opacity":"1","stroke-opacity":"1","stroke-width":"0.8"}}}],"drawingId":"2550"}

GET /presentation/filters/json/{drawingId}/{presentationId}

Apply selected filters to drawing. Example of request:

{"perspectiveId":"11","childClassId":108,"hqlCriteria":"(fi2space_function is not empty)","objects":[{"classId":128,"objectId":"51796"}]}

Request Parameters
name type description default constraints
drawingId path Id of a drawing that presentation is being applied to   long
presentationId path   long
filterIds query comma-separated list of filter identifiers; e.g. 1, 2 after encoding: 1%2C+2    
Request Body
media type data type description
application/json object JSON with presentation filter data and criteria
Response Body
media type data type description
application/json object JSON Response text representation of applied presentation to drawing

Example of response:

{"spots":[{"spotId":"110023","filterId":"1437"},{"spotId":"110026","filterId":"1436"}],"filters":[{"label":"Area greater than 10","id":"1437","count":"1","sourceClass":"14","sourceClassLabel":"Room","hql":"fi2space_areanta >= 10","toolset":{"id":"3250","objectName":"jMeter","style":{"id":"---","stroke":"#000000","fill":"#FFFF00","fill-opacity":"0.5","stroke-opacity":"1","stroke-width":"0.7"}}},{"label":"Area smaller than 10","id":"1436","count":"1","sourceClass":"14","sourceClassLabel":"Room","hql":"fi2space_areanta <= 10","toolset":{"id":"3249","objectName":"toolset","style":{"id":"3249","stroke":"#00FFFF","fill":"#008000","fill-opacity":"1","stroke-opacity":"1","stroke-width":"0.8"}}}],"drawingId":"2550"}

GET /presentation/byguid/filters/json/{drawingId}/{presentationId}

Apply selected filters to drawing. Example of request:

{"perspectiveId":"11","childClassId":108,"hqlCriteria":"(fi2space_function is not empty)","objects":[{"systemGuid":"b0783ba9-e3fd-45c6-84c2-5f617d8e8e24"}]}

Request Parameters
name type description default constraints
drawingId path Id of a drawing that presentation is being applied to   long
presentationId path   long
filterIds query comma-separated list of filter identifiers; e.g. 1, 2 after encoding: 1%2C+2    
Request Body
media type data type description
application/json object JSON with presentation filter data and criteria
Response Body
media type data type description
application/json object JSON Response text representation of applied presentation to drawing

Example of response:

{"spots":[{"spotId":"110023","filterId":"1437"},{"spotId":"110026","filterId":"1436"}],"filters":[{"label":"Area greater than 10","id":"1437","count":"1","sourceClass":"14","sourceClassLabel":"Room","hql":"fi2space_areanta >= 10","toolset":{"id":"3250","objectName":"jMeter","style":{"id":"---","stroke":"#000000","fill":"#FFFF00","fill-opacity":"0.5","stroke-opacity":"1","stroke-width":"0.7"}}},{"label":"Area smaller than 10","id":"1436","count":"1","sourceClass":"14","sourceClassLabel":"Room","hql":"fi2space_areanta <= 10","toolset":{"id":"3249","objectName":"toolset","style":{"id":"3249","stroke":"#00FFFF","fill":"#008000","fill-opacity":"1","stroke-opacity":"1","stroke-width":"0.8"}}}],"drawingId":"2550"}