URI
<mydata_uri>/sharesetting[.<format>]
Supported methods
Parent resource
Introduction
dataShareSetting is the resource of data sharing settings. With GET request, you can get permission of the specified data according to data ID. With PUT request, you can get permission of the specified data. Persons who upload files and administrator can get the permission information of the updated file.
For the introduction to permission of data and permission of how to update data in batch, please refer to PUT request of datasShareSetting resources.
Supported Methods:
- GET: Gets permission information of the specified data with data ID.
- PUT: Updates permission information of the specified data.
- HEAD: Check whether the dataShareSetting resource exists. or to access the dataShareSetting 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/mycontent/datas/{id}/sharesetting.rjson
GET request
Get permission information of the specified data with data ID.
Response structure
The structure of the response resource representation after implementing the GET request on the dataShareSetting resource will be as follows:
Field | Type | Description |
dataPermissionType | DataPermissionType | Data permission types, including DOWNLOAD and DELETE. A user who has DELETE permission also owns DOWNLOAD permission. |
entityType | EntityType | Entity types, including USER, ROLE, GROUP, IPORTALGROUP. |
entityName | String | Entity names, including names of USER, ROLE, GROUP, IPORTALGROUP. |
aliasName | String | Entity alias name. |
entityId | Integer | Entity ID. It is used to authorize groups. |
Response example
Execute GET request for dataShareSetting resource http://localhost:8090/iportal/web/mycontent/datas/11/sharesetting.rjson, and the returned rjson format result is as below. The permission information is open. admin has permission to download, update, and delete. All users (including anonymous users) have permissions to download files.
[
{
"aliasName": "admin",
"dataPermissionType": "DELETE",
"entityId": null,
"entityName": "admin",
"entityType": "USER"
},
{
"aliasName": "GUEST",
"dataPermissionType": "DOWNLOAD",
"entityId": null,
"entityName": "GUEST",
"entityType": "USER"
}
]
PUT request
Update permission information of the specified data with data ID.
Request parameter
Following arguments need to be passed in the request sent when executing PUT request for dataShareSetting resource
Field | Type | Description |
dataPermissionType | DataPermissionType | Data permission types, including DOWNLOAD, DELETE. |
entityType | EntityType | Entity types, including USER, ROLE, GROUP, IPORTALGROUP. |
entityName | String | Entity names, including names of USER, ROLE, GROUP, IPORTALGROUP. |
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 specified data sharing setting is updated successfully or not. |
error | Httperror | Error information. This field will not be displayed if the specified data sharing settings is successfully updated. |
Response example
Execute PUT request for dataShareSetting resource http://localhost:8090/iportal/web/mycontent/datas/11/sharesetting.rjson. The permission is changed from public to a specified user zhaoyuan2 who can download files. The request body is as follows:
[
{
"dataPermissionType": "DOWNLOAD",
"entityId": null,
"entityName": "zhaoyuan2",
"entityType": "USER"
}
]
The returned resource representation in rjson format 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 dataShareSetting resource exists, or if the dataShareSetting resource can be accessed by clients. It can also determine if the dataShareSetting resource supports an output format <format> if performed on a URI with .<format> included.