<fields_uri>/{fieldName}[.<format>]
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.
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
Gets the field informations. They are: field names, types, alias, default value, whether it can be null, the maximum length, whether the length can be 0, etc.
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. |
Executing a GET request on field resource with URI: http://supermapiserver:8090/iserver/services/datacatalog/rest/datacatalog/relationship/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"
}
}
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.