URI

<scenes_uri>/sharesetting[.<format>]

Supported methods

PUT

Parent resource

scenes

Introduction

sceneShareSetting is the share setting resource for scenes. By sending PUT request, you can update scene permissions in batch. The scene creators and administrators can update the scene permissions. The way of adding scenes can be realized by registering 3D service.

scenesShareSetting resource has five types of sharing, i.e., Private, Public, Specified department, Specified group and Specified user. Private means that only scene creators and administrators can search, view and edit scenes; Public means that all users (anonymous users included) can search and view scenes and all users (login users only) can edit scenes, the corresponding permission type must be authorized; Specified department means that the specified department members can search, view and edit scenes, the corresponding permission type must be authorized; Specified group means that one or more groups can search, view and edit scenes, the corresponding permission type must be authorized; Specified user means that one or more users can search, view and edit scenes, the corresponding permission type must be authorized.

Supported Methods:

  • PUT: Modify the share setting of scenes in batch.

Supported output formats: RJSON, JSON, HTML, XML.

Resource hierarchy

HTTP request methods

Implement the HTTP request on the following URI, where supermapiportal is the server name, with rjson being the output format.

http://supermapiportal:8190/iportal/web/scenes/sharesetting.rjson

PUT request

Modify the share setting of scenes in batch.

Request parameter

When sending the request, the following parameters need to be passed in the request body:

Name Type Description
ids List<Integer> The scene ID array.
entities List<IportalAuthorizeEntity> The share settings. The permission types include: SEARCH (search), READ (view), READWRITE (edit).

Response structure

The structure of the response resource representation is as follows:

Field Type Description
succeed boolean Whether the scenes sharing settings in batch are updated successfully or not.
error HttpError Error information. This field will not be displayed if the sharing settings of scenes are successfully updated.

Response example

There are five types of updating scenes in batch for the scenesShareSetting resource, i.e., private, public, specified department, specified group and specified user. This resource can be set as public, specified department, specified group and specified user together, or one of settings only. The following example shows you how to set sharing patterns one by one (make sure that your login status is a scene creator or an administrator):

1. Private

Execute PUT request for the scenesShareSetting resource: http://localhost:8190/iportal/web/scenes/sharesetting.rjson, and modify the share settings of scenes in batch as private. Only scene creator and administrator can search, view and edit the scenes.

{

    "ids": [

        "12",

        "13"

    ],

    "entities": []

}

The returned resource representation in rjson format is as follows:

{"succeed": true}

2. Public

Execute PUT request for the scenesShareSetting resource: http://localhost:8190/iportal/web/scenes/sharesetting.rjson, and modify the share settings of scenes in batch as public. All users (anonymous users included) can view:

{

    "ids": [

        "12",

        "13"

    ],

    "entities": [

        {

            "entityType": "USER",

            "entityName": "GUEST",

            "permissionType": "READ"

        }

    ]

}

The returned resource representation in rjson format is as follows:

{"succeed": true}

3. Specified department

Execute PUT request on scenesShareSetting resource: http://localhost:8190/iportal/web/scenes/sharesetting.rjson to modify the sharing settings as specified department, that is specify a department for current user, only the members in the department can view these scenes:

{

    "ids": [

        12,

        13

    ],

    "entities": [

        {

            "entityType": "DEPARTMENT",

            "entityId": 2,

            "permissionType": "READ"

        }

    ]

}

The returned resource representation in rjson format is as follows:

{"succeed": true}

4. Specified group

Execute PUT request for the scenesShareSetting resource: http://localhost:8190/iportal/web/scenes/sharesetting.rjson. Modify the share settings of scenes as the specified group members with ID 1 who has rights to check the scenes:

{

    "ids": [

        "12",

        "13"

    ],

    "entities": [

        {

            "entityType": "IPORTALGROUP",

            "entityId": "1",

            "permissionType": "READ"

        }

    ]

}

The returned resource representation in rjson format is as follows:

{"succeed": true}

5. Specified user

Execute PUT request for the scenesShareSetting resource: http://localhost:8190/iportal/web/scenes/sharesetting.rjson, and modify the share settings of scenes in batch as the specified user to check:

{

    "ids": [

        "12",

        "13"

    ],

    "entities": [

        {

            "entityType": "USER",

            "entityName": "wanghl",

            "permissionType": "READ"

        },

        {

            "entityType": "USER",

            "entityName": "zhaoyuan",

            "permissionType": "READ"

        }

    ]

}

The returned resource representation in rjson format is as follows:

{"succeed": true}

6. Mixed Share Settings

Scenes can be set as public, specified users and specified group together. The following example shows you how to set sharing patterns of public and specified group together (make sure that your login status is a scene creator or an administrator):

Execute PUT request for scenesShareSetting resource: http://localhost:8190/iportal/web/scenes/sharesetting.rjson, and modify the share settings of the scenes as specified group and public, i.e., the group members with ID 1 can view and all users (anonymous users included) can view:

{

    "ids": [

        12,

        13

    ],

    "entities": [

        {

            "entityType": "USER",

            "entityName": "GUEST",

            "permissionType": "READ"

        },

        {

            "entityType": "IPORTALGROUP",

            "entityId": "1",

            "permissionType": "READ"

        }

    ]

}

The returned resource representation in rjson format is as follows:

{"succeed": true}

See