URI

<myData_uri>/simpledata[.<format>]

Supported Methods

GET, HEAD

Parent Resource

myData

Description

The dataDatasetSimpleData resource is the sample data resource for datasets in the data registered by the user. Currently, HDFS type registered data is supported.

Supported Methods:

  • GET: Get the first 5 records of the specified dataset in the registered data store.
  • HEAD: Check whether the dataDatasetSimpleData resource exists or whether the permissions allow access to the dataDatasetSimpleData resource.

Supported output formats: RJSON, JSON, XML.

Resource hierarchy

HTTP Request Methods

Perform HTTP requests on the following URI. The rjson output format is used as an example, where supermapiportal is the server name.

http://supermapiportal:8190/iportal/web/mycontent/datas/{id}/simpledata.rjson

GET Request

Get the first 5 records of the specified dataset in the registered data store.

Request Parameters

When sending a GET request to the dataDatasetSimpleData resource to get sample data for a dataset, the following parameters must be included in the request body:

Name Type Description
datasetName String The name of the dataset.

Response Structure

None

Response Example

Perform a GET request on the dataDatasetSimpleData resource: http://localhost:8190/iportal/web/mycontent/datas/939714271/simpledata.rjson?datasetName=Point_1548654921688_New_Point. The rjson format response is as follows:

[

    [

        "0",

        "1",

        "2",

        "130.072837",

        "355.011449"

    ],

    [

        "0",

        "2",

        "5",

        "200.767948",

        "250.551509"

    ],

    [

        "0",

        "3",

        "4",

        "335.827264",

        "184.077002"

    ],

    [

        "0",

        "4",

        "10",

        "499.375654",

        "247.386056"

    ],

    [

        "0",

        "5",

        "15",

        "482.493239",

        "172.470342"

    ]

]

HEAD Request

Returns the same HTTP response headers as the GET request, but without the response entity. Metadata information contained in the response headers can be retrieved without transferring the entire response content. Metadata information includes media type, character encoding, compression encoding, entity content length, etc.

A HEAD request can be used to check whether the dataDatasetSimpleData resource exists or whether the client has permission to access the dataDatasetSimpleData resource. By performing a HEAD request on the URI with .<format> appended, you can also quickly determine whether the dataDatasetSimpleData resource supports the <format> format representation.

See