<myDatas_uri>/{id}[.<format>]
fileUpload, fileDownload, uploadProgess, fileDigest, service, dataShareSetting, publishStatus
myData represents the specific data resource, which supports query, modify and delete operations.
Supported Methods:
Supported representation formats: RJSON, JSON, HTML, XML.
Execute HTTP request on the following URI, here we take rjosn as the output format as an example. Where, supermapiserver is the server name.
http://supermapiportal:8090/iportal/web/mycontent/datas/{id}.rjson
Gets the info of the data specified by data item id.
The structure of the response resource representation after executing the GET request on the myData resource will be as follows:
Field |
Type | Description |
userName |
String | The name of the user who uploaded the data. |
type | DataItemType | Data type. Can be WORKSPACE (a zip package which includes workspace data with file extension *.sxwu, *.smwu, *.sxw or *.smw), SMTILES, SVTILES, MBTiles, TPK, UDB, UGCV5, Excel data and CSV data type. |
fileName | String | File name. |
size | int | File size. The unit is B. |
serviceStatuses | ServiceStatus[] | The publishing status of the servcie. |
serviceId | String | The service id. |
id | Integer | The data item id. |
lastModfiedTime | Date | The last modified time. |
status | Status | The file status. |
storageId | String | The data file storage id. |
publishInfo | DataPublishInfo | The data publish info. |
authorizeSetting | List<IportalDataAuthorizeEntity> | The data authorization info. |
nickname | String | The user nickname. |
tags | List<String> | The data tag. |
description | String | The descriptive information about the data. |
dataItemServices | List<DataServiceInfo> | A list of services which are got by publishing the uploaded data. |
coordType | DataCoordType | Data coordinate type. |
thumbnail | String | Thumbnail path of the data. |
createTime | Long | Data creation time, ie., the upload time. |
dataMetaInfo | DataMetaInfo | The data meta-info. |
downloadCount | Long | The data download times. |
MD5 | String | MD5 of the data. |
dataCheckResult | DataCheckResult | The check result of the data and the corresponding services. |
Execut a GET request http://localhost:8090/iportal/web/mycontent/datas/672142608.rjson on myData resource, the returned resource representation is as follows:
{
"MD5": "c71d848955786c54cb072c2bfad6dc64",
"authorizeSetting": [
{
"aliasName": "admin",
"dataPermissionType": "DELETE",
"entityId": null,
"entityName": "admin",
"entityRoles": null,
"entityType": "USER"
},
{
"aliasName": "GUEST",
"dataPermissionType": "DOWNLOAD",
"entityId": null,
"entityName": "GUEST",
"entityRoles": null,
"entityType": "USER"
}
],
"coordType": "WGS84",
"createTime": 1514860737401,
"dataCheckResult": {
"dataCheckInfo": null,
"serviceCheckInfos": []
},
"dataItemServices": [],
"dataMetaInfo": {
"baseLayerType": null,
"bounds": "",
"epsgCode": 0,
"fileEncoding": null,
"previewURL": "",
"providers": "",
"proxiedServiceType": null,
"proxiedServiceUrl": null,
"realspaceType": null,
"releaseTimeMilli": 0,
"xField": "longitude",
"yField": "latitude"
},
"description": "",
"downloadCount": 0,
"fileName": "China 5A level scenic spots.xlsx",
"id": 672142608,
"lastModfiedTime": 1514860786733,
"nickname": "admin",
"publishInfo": null,
"serviceId": null,
"serviceStatus": "UNPUBLISHED",
"size": 26639,
"status": "OK",
"storageId": "uwwj74jj_ejka135u_ec4bd16f_0f3b_41b1_b107_c07fe03c2b25",
"tags": [
"travel"
],
"thumbnail": "${iportalDirectoryServicesRootUrl}/../services/../web/static/portal/img/map/cloud.png",
"type": "EXCEL",
"userName": "admin"
}
Updates the info of the data specified by data item id.
Request parameter
When sending a PUT request, the following parameters should be included in the request body:
Name | Type | Description |
fileName | String | File name. |
type | DataItemType | File type. Can be WORKSPACE (a zip package which includes workspace data with file extension *.sxwu, *.smwu, *.sxw or *.smw), SMTILES, SVTILES, MBTiles, TPK, UDB, UGCV5, Excel data and CSV data type. |
tags | List<String> getNames() | The data tag. |
description | String | The descriptive information about the data. |
thumbnail | String | Thumbnail path of the data. |
dataMetaInfo | DataMetaInfo | The data meta-info. |
authorizeSetting | List<IportalDataAuthorizeEntity> | The data authorization info. |
Response structure
The structure for the resource representation returned should be:
Field |
Type | Description |
succeed |
boolean | Whether the data is updated successfully. |
newResourceID | Integer | The resource id of the newly created data. The id value is the same with the value of the id in the request. |
Response example
To modify the uploaded description, perform a PUT request http://localhost:8090/iportal/web/mycontent/datas/672142608.rjson on myData resource with the following request body:
{
"fileName": "China 5A level scenic spots.xlsx",
"type": "EXCEL",
"tags":[
"travel"
],
"authorizeSetting": [],
"thumbnail": "",
"dataMetaInfo": {
"baseLayerType": null,
"bounds": "",
"epsgCode": 0,
"fileEncoding": null,
"previewURL": "",
"providers": "",
"proxiedServiceType": null,
"proxiedServiceUrl": null,
"realspaceType": null,
"releaseTimeMilli": 0,
"xField": "longitude",
"yField": "latitude"
},
"description":"travel data"
}
the returned response result in rjson format is as follows:
{
"newResourceID": "672142608",
"succeed": true
}
Deletes the data specified data item id, including the data item and the data file.
Response structure
The structure for the resource representation returned should be:
Field |
Type | Description |
succeed |
boolean | Whether the data is deleted successfully. |
Response example
The returned rjson format representation after executing the DELETE request on the myData resource http://localhost:8090/iportal/web/mycontent/datas/672142608.rjson is:
{ "succeed": true}
Returns the same HTTP response header as the GET request, but no response entity, which can be used to retrieve the meta data contained in response message header without having to transmit the entire response content. Meta data information includes media type, character coding, compression coding, entity content length, etc.
HEAD request is used to determine whether the myData resource exists, or if the user has the authority to access it. By executing an HEAD request with a .<format> URI, you can quickly determine whether the myData resource supports the <format> representation.