fields


URI

<dataset_uri>/fields[.<format>]

Supported methods

GET, HEAD

Parent resource

dataset

Child resources

field

Introduction

fields resource indicates the collection of all property fields in a datasource.

Get the fields information list in dataset by sending GET request for the fields resource.

The property fields attribute table from dataset of SuperMap includes: System fields and non-system fields. System fields is generated by default when a user creates a new dataset, the fields can't be edited, the contents of fields also can't be edited except for SMUSERID. The non-system field is generated by user, it can be edited. The system fields from different datasets with different types are different, but all of them begin with the English letter "SM". Takes the UDB as an example, the system fields for different types' datasets are listed in the following table.

Dataset type System field
Point dataset SMID, SMX, SMY, SMLIBTIL, SMUSERID, SMGEOMETRYSIZE
Line dataset SMID, SMLENGTH, SMSDRIW, SMSDRIN, SMSDRIE, SMSDRIS, SMUSERID, SMTOPOERROR, SMGEOMETRYSIZE
Region dataset SMID, SMSDRIW , SMSDRIN, SMSDRIE, SMSDRIS, SMUSERID, SMARE, SMPERIMETER, SMGEOMETRYSIZE
Text dataset SMID, SMSDRIW, SMSDRIN, SMSDRIE, SMSDRIS, SMUSERID , SMGEOMETRYSIZE
Composite dataset SMID, SMSDRIW, SMSDRIN, SMSDRIE, SMSDRIS, SMUSERID , SMGEOTYPE, SMLIBTIL, SMGEOMETRYSIZE
3D point dataset SMID, SMX, SMY, SMZ, SMUSERID, SMGEOMETRYSIZE
3D line dataset SMID, SMLENGTH, SMSDRIW, SMSDRIN, SMSDRIE, SMSDRIS, SMUSERID, SMTOPOERROR, SMGEOMETRYSIZE
3D region dataset SMID, SMSDRIW , SMSDRIN, SMSDRIE, SMSDRIS, SMUSERID, SMARE, SMPERIMETER, SMGEOMETRYSIZE

Supported Methods:

Supported output formats: RJSON, JSON, HTML, XML.

Resource hierarchy

HTTP request methods

Perform HTTP request to the following URI, taks the output format rjson as an example, supermapiserver is the server name.

http://supermapiserver:8090/iserver/services/datacatalog/rest/datacatalog/sharefile/datasets/{datasetsName}/fields/{fieldName}.rjson

GET request

Get the field information collection. The elements in the collection are: field name, field type, alias, default value, whether it can be null, the maximum length, whether the length can be 0, etc.

Request parameter

None.

Response structure

The structure of the response returned by sending the GET request to fields resource is as follows:

Field Type Description
fieldNames List<String> Field name list
childUriList List<String> The path list for accessing field information (field resource).

Response example

Perform GET request on the field resource http://supermapiserver:8090/iserver/services/datacatalog/rest/datacatalog/sharefile/samples_processing_singleRegion_R/fields.rjson to get the field information collection of the dataset Capitals_310302807 from datasource World. The description of resource with rjson format is:

{

  "childUriList": [

    "http://localhost:8090/iserver/services/datacatalog/rest/datacatalog/sharefile/samples_processing_singleRegion_R/fields//SmID",

    "http://localhost:8090/iserver/services/datacatalog/rest/datacatalog/sharefile/samples_processing_singleRegion_R/fields//SmSdriW",

    "http://localhost:8090/iserver/services/datacatalog/rest/datacatalog/sharefile/samples_processing_singleRegion_R/fields//SmSdriN",

    "http://localhost:8090/iserver/services/datacatalog/rest/datacatalog/sharefile/samples_processing_singleRegion_R/fields//SmSdriE",

    "http://localhost:8090/iserver/services/datacatalog/rest/datacatalog/sharefile/samples_processing_singleRegion_R/fields//SmSdriS",

    "http://localhost:8090/iserver/services/datacatalog/rest/datacatalog/sharefile/samples_processing_singleRegion_R/fields//SmUserID",

    "http://localhost:8090/iserver/services/datacatalog/rest/datacatalog/sharefile/samples_processing_singleRegion_R/fields//SmArea",

    "http://localhost:8090/iserver/services/datacatalog/rest/datacatalog/sharefile/samples_processing_singleRegion_R/fields//SmPerimeter",

    "http://localhost:8090/iserver/services/datacatalog/rest/datacatalog/sharefile/samples_processing_singleRegion_R/fields//SmGeometrySize",

    "http://localhost:8090/iserver/services/datacatalog/rest/datacatalog/sharefile/samples_processing_singleRegion_R/fields//SmGeoPosition"

  ],

  "fieldNames": [

    "SmID",

    "SmSdriW",

    "SmSdriN",

    "SmSdriE",

    "SmSdriS",

    "SmUserID",

    "SmArea",

    "SmPerimeter",

    "SmGeometrySize",

    "SmGeoPosition"

  ]

}

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 fields resource exists, or if the fields resource can be accessed by clients. It can also determine if the fields resource supports an output format <format> if sending HEAD request to the URI which has added <format>.

See