URI

<scene_uri>/sharesetting[.<format>]

Supported methods

GET, PUT, HEAD

Parent resource

scene

Introduction

sceneShareSetting resource is the share setting information for a single scene. By sending PUT request, you could update the share setting information for a single scene. The scene creator and administrator can update the permissions of the single scene.

Supported Methods:

  • GET: Get the share settings of the single scene.
  • PUT: Update the share settings of the single scene.
  • HEAD: Check whether the sceneShareSetting resource exists or whether it has permission to access the resource.

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:8090/iportal/web/scenes/{id}/sharesetting.rjson

GET request

Get the share settings of the single scene.

Response structure

The structure of the response resource representation after implementing the GET request on the sceneShareSetting resource will be as follows:

Field Type Description
entityName String Entity names, including names of USER, ROLE, GROUP, IPORTALGROUP.
entityType EntityType Entity types, including USER, ROLE, GROUP, IPORTALGROUP.
permissionType PermissionType Permisstion types that include READ, READWRITE, DELETE.
entityId Integer Entity ID. It is used to authorize groups.
aliasName String Entity alias name.

Response example

Execute GET request for sceneShareSetting resource http://localhost:8090/iportal/web/scenes/14/sharesetting.rjson, and the returned rjson format result is as below. The permission information is that iportal users have permission to view, edit, and delete. All users (including anonymous users) have permissions to view the scene.

[

    {

        "aliasName": "iportal",

        "entityId": null,

        "entityName": "iportal",

        "entityType": "USER",

        "permissionType": "DELETE"

    },

    {

        "aliasName": "GUEST",

        "entityId": null,

        "entityName": "GUEST",

        "entityType": "USER",

        "permissionType": "READ"

    }

]

PUT request

Update the share settings of the single scene.

Request parameter

Following arguments need to be passed in the request sent.

Field Type Description
entityName String Entity names, including names of USER, ROLE, GROUP, IPORTALGROUP.
entityType EntityType Entity types, including USER, ROLE, GROUP, IPORTALGROUP.
permissionType PermissionType Permisstion types that include READ, READWRITE, DELETE.
entityId Integer Entity ID. It is used to authorize groups.

Response structure

The structure of the response resource representation is as follows:

Field Type Description
succeed boolean Whether the scene sharing setting is updated successfully or not.
error Httperror Error information. This field will not be displayed if the scene sharing settings is successfully updated.

Response example

There are five types of updating single scene for the sceneShareSetting 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

Modify the authorized information of the scene as private. Only scene creator and administrator can check, edit, delete the scene. Execute PUT request for the sceneShareSetting resource: http://supermapiportal:8090/iportal/web/scenes/14/sharesetting.rjson. The request body is as follows:

[

    {

        "aliasName": "iportal",

        "entityId": null,

        "entityName": "iportal",

        "entityType": "USER",

        "permissionType": "DELETE"

    }

]

The response result in rjson format returned is as follows:

{ "succeed": true}

2. Public

Modify the authorized information of the scene as public. All users (anonymous users included) have the permission to check the scene. Execute PUT request for the sceneShareSetting resource: http://supermapiportal:8090/iportal/web/scenes/14/sharesetting.rjson. The request body is as follows:

[

    {

        "aliasName": "GUEST",

        "entityId": null,

        "entityName": "GUEST",

        "entityType": "USER",

        "permissionType": "READ"

    }

]

The response result in rjson format returned is as follows:

{ "succeed": true}

3. Specified department

Modify the authorized information of the scene as specified department, that is, specify a department for current user. Perform PUT request on sceneShareSetting resource: http://supermapiportal:8090/iportal/web/scenes/14/sharesetting.rjson with the request entity as follows:

[

    {

        "entityId": 2,

        "entityType": "DEPARTMENT",

        "permissionType": "READ"

    }

]

The returned result with rjson output format is as follows:

{ "succeed": true}

4. Specified group

Modify the authorized information as the specified group members with ID 2 who has rights to check this scene. Execute PUT request for the sceneShareSetting resource: http://supermapiportal:8090/iportal/web/scenes/14/sharesetting.rjson. The request body is as follows:

[

    {

        "entityId": 2,

        "entityType": "IPORTALGROUP",

        "permissionType": "READ"

    }

]

The response result in rjson format returned is as follows:

{ "succeed": true}

5. Specified user

Modify the authorized information of the scene as the specified user. For example, the specified user liyl can check the service informaiton. Execute PUT request for the sceneShareSetting resource: http://supermapiportal:8090/iportal/web/scenes/14/sharesetting.rjson. The request body is as follows:

[

    {

        "aliasName": "xiaoli",

        "entityId": null,

        "entityName": "liyl",

        "entityType": "USER",

        "permissionType": "READ"

    }

]

The response result in rjson format returned is as follows:

{ "succeed": true}

HEAD request

Asks for the response identical to the one that would correspond to a GET request, but without the response body. This is useful for retrieving meta-information written in response headers, without having to transport the entire content. The meta-information includes the media-type, content-encoding, transfer-encoding, content-length, etc.

HEAD request can be used to check if the sceneShareSetting resource exists, or if the sceneShareSetting resource can be accessed by clients. It can also determine if the sceneShareSetting resource supports an output format <format> if performed on a URI with .<format> included.

See