Area calculation API Resource

WS for setting configuration (relations between class fields and layers) required to calculation of area *

POST /api/areacalc/json

Calculate area for given objects

Request Body
media type data type
application/json string (JSON)
Response Body
media type data type description
application/json object (JSON) JSON Response with report about object (was it updated or not)

Example of response:

{"updated":[{"classId":"108","objectId":"5183","objectName":"3","classLabel":"Rum","fields":[{"value":"41.7483","label":"Area BTA","name":"fi2space_areabta"}]}],"failed":[]}

Example

Request
POST /api/areacalc/json
Content-Type: application/json
Accept: application/json

                
...
                
              
Response
HTTP/1.1 201 Created
Content-Type: application/json

                
...
                
              

POST /api/areacalc/drawing/{drawingId}

Calculate areas for all spots on all layers in given drawing

Request Parameters
name type description
drawingId path Overlay drawing ID
Response Body
media type data type description
application/json object (JSON) JSON Response with report about objects (were they updated or not)

Example of response:

{"updated":[{"classId":"108","objectId":"5183","objectName":"3","classLabel":"Rum","fields":[{"value":"41.7483","label":"Area BTA","name":"fi2space_areabta"}]}],"failed":[]}

Example

Request
POST /api/areacalc/drawing/{drawingId}
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 201 Created
Content-Type: application/json

                
...
                
              

POST /api/areacalc/json/{layerId}

Calculate area for given objects connected to spots on specified layer

Request Parameters
name type description constraints
layerId path ID of layer to process long
Request Body
media type data type
application/json string (JSON)
Response Body
media type data type description
application/json object (JSON) JSON Response with report about object (was it updated or not)

Example of response:

{"updated":[{"classId":"108","objectId":"5183","objectName":"3","classLabel":"Rum","fields":[{"value":"41.7483","label":"Area BTA","name":"fi2space_areabta"}]}],"failed":[]}

Example

Request
POST /api/areacalc/json/{layerId}
Content-Type: application/json
Accept: application/json

                
...
                
              
Response
HTTP/1.1 201 Created
Content-Type: application/json

                
...
                
              

POST /api/areacalc/drawing/{drawingId}/{layerId}

Calculate areas for all spots on specified layer in given drawing

Request Parameters
name type description constraints
drawingId path Overlay drawing ID  
layerId path ID of layer to process long
Response Body
media type data type description
application/json object (JSON) JSON Response with report about objects (were they updated or not)

Example of response:

{"updated":[{"classId":"108","objectId":"5183","objectName":"3","classLabel":"Rum","fields":[{"value":"41.7483","label":"Area BTA","name":"fi2space_areabta"}]}],"failed":[]}

Example

Request
POST /api/areacalc/drawing/{drawingId}/{layerId}
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 201 Created
Content-Type: application/json

                
...
                
              

POST /api/areacalc/subtree/json/{perspId}/{classId}/{objectId}

Calculate area for given object with its subtree

Request Parameters
name type description constraints
classId path long
objectId path long
perspId path long
Response Body
media type data type description
application/json object (JSON) JSON Response with report about object (was it updated or not)

Example of response:

{"updated":[{"classId":"108","objectId":"5183","objectName":"3","classLabel":"Rum","fields":[{"value":"41.7483","label":"Area BTA","name":"fi2space_areabta"}]}],"failed":[]}

Example

Request
POST /api/areacalc/subtree/json/{perspId}/{classId}/{objectId}
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 201 Created
Content-Type: application/json

                
...
                
              

POST /api/areacalc/subtree/json/{perspId}/{classId}/{objectId}/{layerId}

Calculate area for given object with its subtree connected to spots on specified layer

Request Parameters
name type description constraints
classId path long
layerId path ID of layer to process long
objectId path long
perspId path long
Response Body
media type data type description
application/json object (JSON) JSON Response with report about object (was it updated or not)

Example of response:

{"updated":[{"classId":"108","objectId":"5183","objectName":"3","classLabel":"Rum","fields":[{"value":"41.7483","label":"Area BTA","name":"fi2space_areabta"}]}],"failed":[]}

Example

Request
POST /api/areacalc/subtree/json/{perspId}/{classId}/{objectId}/{layerId}
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 201 Created
Content-Type: application/json

                
...