Layer admin API Resource

Abstract class for REST webservices

POST /api/admin/layer

Add global layer.

Example of request:

{"layerName":"layerName","toolset":{"style":{"stroke":"#339966","stroke-width":"1","vector-effect":"none","stroke-opacity":1,"fill":"#008000","fill-opacity":1}}}

Request Body
media type data type description
application/json HdcVectorLayerTO (JSON) The specification of layer that has to be added.
Response Body
media type data type description
application/json HdcBasicObjectIdOnlyTO (JSON) JSON Response with id of added layer

Example of response:

{"objectId":"1"}

Example

Request
POST /api/admin/layer
Content-Type: application/json
Accept: application/json

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

                
{ }
                
              

DELETE /api/admin/layer/{layerId}

Delete layer.

Request Parameters
name type description constraints
layerId path ID of layer to be deleted long
Response Body
media type data type description
application/json HdcSuccessTO (JSON) JSON Response with information, whether the deletion has or has not been succeeded.

Example

Request
DELETE /api/admin/layer/{layerId}
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 204 No Content
Content-Type: application/json

                
{ }
                
              

PUT /api/admin/layer/{layerId}

Update layer.

Example of request:

{"layerName":"layerName","toolset":{"id":"2909782","objectName":"layer_layerName","style":{"stroke":"#339966","stroke-width":"1","vector-effect":"none","stroke-opacity":1,"fill":"#008000","fill-opacity":1}}}

Request Parameters
name type description constraints
layerId path ID of layer to be updated long
Request Body
media type data type description
application/json HdcVectorLayerTO (JSON) The specification of layer that has to be updated.
Response Body
media type data type description
application/json HdcSuccessTO (JSON) JSON Response with information, whether the updating has or has not been succeeded.

Example

Request
PUT /api/admin/layer/{layerId}
Content-Type: application/json
Accept: application/json

                
{ }
                
              
Response
HTTP/1.1 204 No Content
Content-Type: application/json

                
{ }
                
              

POST /api/admin/layer/assign/{layerId}

Assign restrictions for users or/and groups

Example of request:

{"list":[{"id":"userId"}]} or {"list":[{"id":"groupId"}]}

Request Parameters
name type description constraints
layerId path layer to be set with restrictions long
restriction query restriction type  
Request Body
media type data type
application/json string (JSON)
Response Body
media type data type description
application/json HdcSuccessTO (JSON) JSON response with information if assignment was successful or not

Example

Request
POST /api/admin/layer/assign/{layerId}
Content-Type: application/json
Accept: application/json

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

                
{ }
                
              

GET /api/admin/layer/global/json

Get list of global layers

Response Body
media type data type description
application/json array of HdcVectorLayerTO (JSON) JSON with list of layers

Example

Request
GET /api/admin/layer/global/json
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
[ { } ]
                
              

GET /api/admin/layer/members/{layerId}

Get list of users or groups, which are restricted for editing layer

Request Parameters
name type description constraints
layerId path id of layer long
mode query Could be users - get list of users or groups - get list of groups  
restriction query restriction type  
Response Body
media type data type description
application/json object (JSON) JSON Response with list of users

Example of response:

{"list":[{"id":2,"name":"user1","userFullName":"User 1","enabled":false,"email":""}]} or {"list":[{"id":22,"name":"Group C5","description":"Description of group C1","enabled":false}]}

Example

Request
GET /api/admin/layer/members/{layerId}
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
...
                
              

POST /api/admin/layer/unassign/{layerId}

Unassign view restrictions for users or/and groups

Example of request:

{"list":[{"id":"userId"}]} or {"list":[{"id":"groupId"}]}

Request Parameters
name type description constraints
layerId path layer to be set with restrictions long
restriction query restriction type  
Request Body
media type data type
application/json string (JSON)
Response Body
media type data type description
application/json HdcSuccessTO (JSON) JSON response with information if assignment was successful or not

Example

Request
POST /api/admin/layer/unassign/{layerId}
Content-Type: application/json
Accept: application/json

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

                
{ }