myDatas


URI

<mycontent_uri>/datas[.<format>]

Supported methods

GET, POST, HEAD

Parent resource

myContent

Child resources

dataCapacity, myData, batchDelete, datasShareSetting

Introduction

myDatas is the info about all the data uploaded by the current user.

Supported Methods:

Supported output formats: rjson, json, html, xml.

Resource hierarchy

HTTP request methods

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

http://supermapiportal:8090/iportal/web/mycontent/datas.rjson

GET request

Get the list of the info about all the data uploaded by the current user.

If this parameter is not set, then the list of data info on the first page will be returned. If the parameter is set, the list of the data info specified by the user will be returned. The request parameters are included in URI.

Name Type Description

userName

String User name. This parameter is outdated and not used any more in 8C and higher versions. It is advised you use the parameter userNames.

userNames

String[] The name of the data author. You can search by the author name. By default, all the names will be searched.
type DataItemType The data type. This parameter is outdated and not used any more in 8C and higher versions. It is advised you use the parameter types. It can be AUDIO, MBTILES, PHOTOS, SMTILES, SVTILES, TPK, UDB, UGCV5, VIDEO, WORKSPACE ( *. sxwu, *. smwu, *.  sxw or *.  smw workspaces in zip files or UNKNOWN(all the other file types other than the above mentioned. )
types DataItemType[]

Data type. Can be WORKSPACE (a zip package compressed by workspace data with file extension names *.sxwu, *.smwu, *.sxw or *.smw), SMTILES, SVTILES, MBTiles, TPKs, UDBs, UGCV5, Excel data and CSV data type.

fileName String File name.
serviceStatuses ServiceStatus[] The servcie publish status.
serviceId String The service id.
ids Integer[] The int array of data item id.
keywords String[]   Keyword.
orderBy DataItemOrderBy Sort field.
orderType OrderType Filer by ascending order or descending order.
tags String[] The data tag.
filterFields FilterFields[] Field filtering for keyword queries. Field names need to be capitalized. For example, to filter according to the key characters of file name, you need to set: keywords=["City0426.zip"]&filterFields=["FILENAME"].

Response structure

Execute a GET request on the myDatas resource to return the list of all the data info that the current user has uploaded. It includes the following fields:

Field Type Description
content List<DataItem> Page content.
currentPage int The current page number.
pageSize int The size of each page.
searchParameter SearchParameter The search parameter for the current page.
total int The total record number.
totalPage int The total number of pages.

Response example

The returned rjson format representation after executing the GET request on the myDatas resource http://localhost:8090/iportal/web/mycontent/datas.rjson is as follows:

{

    "content": [

        {

            "authorizeSetting": [

                {

                    "aliasName": "admin",

                    "dataPermissionType": "DELETE",

                    "entityId": null,

                    "entityName": "admin",

                    "entityType": "USER"

                }

            ],

            "coordType": null,

            "dataItemServices": [

                {

                    "accessCount": 0,

                    "address": "http://192.168.120.40:8090/iserver/services/map_ChengShi0427/rest",

                    "createTime": null,

                    "dataID": 2,

                    "serviceID": "map_ChengShi0427",

                    "serviceName": null,

                    "serviceNode": "9gsekrun",

                    "serviceStatus": "PUBLISHED",

                    "serviceType": "RESTMAP",

                    "updateTime": null

                },

                {

                    "accessCount": 0,

                    "address": "http://192.168.120.40:8090/iserver/services/data_ChengShi0427/rest",

                    "createTime": null,

                    "dataID": 2,

                    "serviceID": "data_ChengShi0427",

                    "serviceName": null,

                    "serviceNode": "9gsekrun",

                    "serviceStatus": "PUBLISHED",

                    "serviceType": "RESTDATA",

                    "updateTime": null

                }

            ],

            "description": null,

            "fileName": "City0427.zip",

            "id": 2,

            "lastModfiedTime": 1461723763837,

            "nickname": "admin",

            "publishInfo": null,

            "serviceId": null,

            "serviceStatus": "PUBLISHED",

            "size": 19604468,

            "status": "OK",

            "storageId": "Aiportal_g5mbqjsv_cd444c54_23fe_40ef_827d_b3ea052676c8",

            "tags": [],

            "thumbnail": null,

            "type": "WORKSPACE",

            "userName": "admin"

        }

    ],

    "currentPage": 1,

    "pageSize": 9,

    "searchParameter": {

        "currentPage": 1,

        "currentUser": null,

        "fileName": null,

        "filterFields": null,

        "groupIds": null,

        "ids": null,

        "keywords": null,

        "orderBy": null,

        "orderType": "ASC",

        "pageSize": 9,

        "serviceId": null,

        "serviceStatuses": null,

        "status": null,

        "tags": null,

        "type": null,

        "types": null,

        "userName": null,

        "userNames": [

            "admin"

        ]

    },

    "total": 1,

    "totalPage": 1

}

If you want to get the specified data list information, such as to filter according to the key character of the file name, you need to set keywords=["City0426.zip"]&filterFields=["FILENAME"], that is, execute GET request on myDatas resource: http://localhost:8090/iportal/web/mycontent/datas.rjson?keywords=["City0426.zip"]&filterFields=["FILENAME"], the returned rjson format representation is as follows:

{

    "content": [],

    "currentPage": 1,

    "pageSize": 9,

    "searchParameter": {

        "currentPage": 1,

        "currentUser": null,

        "fileName": null,

        "filterFields": [

            "FILENAME"

        ],

        "groupIds": null,

        "ids": null,

        "keywords": [

            "City0426.zip"

        ],

        "orderBy": null,

        "orderType": "ASC",

        "pageSize": 9,

        "serviceId": null,

        "serviceStatuses": null,

        "status": null,

        "tags": null,

        "type": null,

        "types": null,

        "userName": null,

        "userNames": [

            "admin"

        ]

    },

    "total": 0,

    "totalPage": 0

}

POST request

Create data item id.

Request parameter

The following arguments need to be included in the request sent.

Name Type Description
type DataItemType [Mandatory Parameter]
File type. Can be WORKSPACE (a zip package compressed by workspace data with file extension names *.sxwu, *.smwu, *.sxw or *.smw), SMTILES, SVTILES, MBTiles, TPKs, UDBs, UGCV5, Excel data and CSV data type.
fileName String [Mandatory Parameter]
The file name.
tags List<String> getNames() [Optional Parameter]
Data tag.
description String [Optional Parameter]
Data descriptive info.

authorizeSetting

List<IportalDataAuthorizeEntity>

[Optional Parameter]
Data sharing settings. The permission type includes: DELETE(view/ download/ delete), DOWNLOAD(view/ download).

Response structure

The structure for the resource representation returned should be:

Field

Type Description

childID

String Child resource id. The data item id.

childContent

Object

The content of the child resource.

childUrl

String

Child resource URI .

customResult

Object

Self-defined result.

isAsynchronizedReturn

boolean

Whether the result is returned in an asynchronous way. For this resource, the value of isAsynchronizedReturn is always false.

Response example

Execute a POST request on the myDatas resource: http://localhost:8090/iportal/web/mycontent/datas.rjson, and you can get the required data item id for uploading the data. The request is:

{

    "fileName": "city0724.zip",

    "authorizeSetting": [

        {

            "entityType": "USER",

            "entityName": "GUEST",

            "DataPermissionType": "DOWNLOAD"

        }

    ],

    "type": "WORKSPACE"

}

The response result in rjson format returned is as follows:

{

    "childID": "2",

    "isAsynchronizedReturn": false,

    "childContent": null,

    "childUrl": null,

    "customResult": null

}

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 myDatas resource exists, or if the myDatas resource can be accessed by clients. It can also determine if the myDatas resource supports an output format <format> if performed on a URI with .<format> included.

See