URI
<myDatas_uri>/sharesetting[.<format>]
Supported Methods
Parent resource
Introduction
dataShareSetting is the share setting resources of the data, and the implementation of PUT request allows you to update the data permission information. The uploader and administrator of the data file can update the permission information of the data file.
There are five types of data sharing methods for the datasShareSetting resource: private, public, specified department, specified group and specified user. Private indicates that data uploaders, administrators can download, update, and delete data; publicly indicates that all users are allowed to download (including anonymous users), update and delete (logon users only) data with the corresponding permission type granted; specified department represents that members of a specified department can download, update, and delete data with the corresponding permission type granted; specified group represents that members of one or more groups are allowed to download, update, and delete data with the corresponding permission types granted; specified users means that the specified one or more users can download, update, delete data with the corresponding permission type granted.
Note:
- SuperMap iPortal 7C(2015) and higher versions only grant system administrators and users possess the DATA_CENTER role permission to upload data and publish the data as service. Administrators can modify roles associated by user at http://supermapiserver:8090/iportal/manager/security/users, and you can implement the POST on the user resource for modification.
- Please refer to the fileUpload resource for more information about the data file upload.
- Please refer to the fileDownload resource for more information about the data file download.
Supported Methods:
- PUT: Batch/updates the data rights
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/sharesetting.rjson
PUT request
Batch updates the data rights info.
Request parameter
Following arguments need to be passed in the request sent.
Name | Type | Description |
ids | List<Integer> | The ID array of the data. |
entities | List<IportalDataAuthorizeEntity> | The sharing settings for the data. Data permission types include DOWNLOAD, DELETE. |
The structure of entities is as follows:
Field | Type | Description |
dataPermissionType | DataPermissionType | The data permission type. Data permission types include DOWNLOAD, DELETE. The user possessing the DELETE permission can possesses the DOWNLOAD permission at the same time. |
entityType | EntityType | Entity type. Entity types include DEPARTMENT, USER, ROLE, GROUP, IPORTALGROUP. For example: "entityType": "USER", representing granting permission to specified users. |
entityName | String | Entity name. The name of the corresponding DEPARTMENTUSER, ROLE, GROUP, IPORTALGROUP. |
aliasName | String | Entity alias name. For example, when the entityType is USER, the alias represents nickname. |
entityId | Integer | Entity id. used for group permission. |
Response structure
The structure of the response resource representation is as follows:
Field | Type | Description |
succeed | boolean | Whether the data sharing settings have been updated successfully in batches. |
error | Httperror | Error information. This field will not be displayed if the data sharing settings for batch update is successfully updated. |
Response example
There are five types of data sharing methods for the: private, public, specified department, specified group and specified user. The default permission type for the uploaded data files is private, that is, only data uploaders and administrators are allowed to download, update, delete data. The following are examples (please make sure that the data file uploaders or administrators are logged in):
Implement the PUT request on the datasShareSetting resource http://localhost:8090/iportal/web/mycontent/datas/sharesetting.rjson to update the permission information of data to private in batch, that is, allowing data file uploaders and administrators to download, update, and delete data files.
{
"ids": [
"1",
"2"
],
"entities": []
}
The returned resource representation in rjson format is as follows:
{"succeed": true}
Implement the PUT request on the datasShareSetting resource http://localhost:8090/iportal/web/mycontent/datas/sharesetting.rjson to update the permission information of the data to public in batch, that is, allowing all users (including anonymous users) to download data files.
{
"ids": [
"1",
"2"
],
"entities": [
{
"entityType": "USER",
"entityName": "GUEST",
"dataPermissionType": "DOWNLOAD"
}
]
}
The returned resource representation in rjson format is as follows:
{"succeed": true}
Implement the PUT request on the datasShareSetting resource http://localhost:8090/iportal/web/mycontent/datas/sharesetting.rjson to update the permission information of data to specified department in batch, that is, allowing members of the department of the current users to download data files.
{
"ids": [
"1",
"2"
],
"entities": [
{
"entityId": 2,
"entityType": "DEPARTMENT",
"dataPermissionType": "DOWNLOAD"
}
]
}
The returned resource representation in rjson format is as follows:
{"succeed": true}
Implement the PUT request on the datasShareSetting resource http://localhost:8090/iportal/web/mycontent/datas/sharesetting.rjson to update the permission information of data to specified group in batch, that is, allowing members of the group with Id of 1 to download data files.
{
"ids": [
"1",
"2"
],
"entities": [
{
"entityId": 1,
"entityType": "IPORTALGROUP",
"dataPermissionType": "DOWNLOAD"
}
]
}
The returned resource representation in rjson format is as follows:
{"succeed": true}
Implement the PUT request on the datasShareSetting resource http://localhost:8090/iportal/web/mycontent/datas/sharesetting.rjson to update the permission information of the data to specified users in batch, that is, allowing specified users to download data files.
{
"ids": [
"1",
"2"
],
"entities": [
{
"entityType": "USER",
"entityName": "zhaoyuan",
"dataPermissionType": "DOWNLOAD"
},
{
"entityType": "USER",
"entityName": "zhaoyuan2",
"dataPermissionType": "DOWNLOAD"
}
]
}
The returned resource representation in rjson format is as follows:
{"succeed": true}