field


URI

<fields_uri>/{fieldName}[.<format>]

Supported methods

GET, HEAD

Parent resource

fields

Introduction

 field resources indicates a field of a dataset. As shown in the URI, accesses a field by using {fieldName}.

Supported Methods:

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

Resource hierarchy

HTTP request methods

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://supermapiserver:8090/iserver/services/datacatalog/relationship/datasets/{datasetName}/fileds/{filedName}.rjson

GET request

Gets the field information, including: field name, type, alias, default value, whether it can be null, the maximum length, whether the length can be 0, etc.

Response structure

By performing a Get request on field resource, fieldInfo can be obtained. The response structure is as follows:

Field Type Description
name String Field name. Uniquely identifies a field without a duplicate name.
caption String Alias.
type FieldType Field type
defaultValue String The default value.
isRequired boolean Whether it is a required field. True means yes. False means no.
isSystemField boolean Whether it is SuperMap system field, true means yes.
The SuperMap system field is a field with prefix SM, except for SMUserID.
isZeroLengthAllowed boolean Whether it is allowed that the length is 0;
maxLength int The maximum length of field.

Example

Executing a GET request on field resource with URI: http://supermapiserver:8090/iserver/services/datacatalog/rest/datacatalog/spatiotemporal/datasets/Capitals_310302807/fields/SMID.rjson to get the rjson format of the SMID field in dataset Capitals_310302807, the descriptions are as follwing:

{

  " childUriList": null,

  " fieldInfo": {

    " caption": " SmID",

    " defaultValue": " ",

    " isRequired": true,

    " isSystemField": true,

    " isZeroLengthAllowed": false,

    " maxLength": 4,

    " name": " SMID",

    " type": " INT32"

  }

}

HEAD request

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 field resource exists, or if the client has the authority to access it. By executing an HEAD request with a .<format> URI, you can quickly determine whether the field resource supports the <format> representation.

See