FRAMES | NO FRAMES
Domain Objects

Overview

This document discusses the JSON domain objects as returned by the REST API. Domains specify the set of valid values for a field.

The following domain objects are discussed here:

Range Domain

Range domain specifies a range of valid values for a field. The type property for range domains is range.

JSON Syntax

{
"type" : "range",
"name" : "<domainName>",
"range" : [ <minValue>, <maxValue> ]
}

JSON Example

{
  "type": "range",
  "name": "Measured Length", 
  "range": [1,10000]
}

Coded Value Domain

Coded value domain specifies an explicit set of valid values for a field. Each valid value is assigned a unique name. The type property for coded value domains is codedValue.

JSON Syntax

{
"type" : "codedValue",
"name" : "<domainName>",
"codedValues" : 
[
  { "name" : "<codeName1>", "code" : <code1> },
  { "name" : "<codeName2>", "code" : <code2> }
]
}

JSON Example

{
 "type": "codedValue",
 "name": "Material",
 "codedValues": 
 [
     {
      "name": "Aluminum",
      "code": "AL"
     },
     {
      "name": "Copper",
      "code": "CU"
     },
     {
      "name": "Steel",
      "code": "STEL"
     },
     {
      "name": "Not Applicable",
      "code": "NA"
     }
  ]
}

Inherited Domain

Inherited domains apply to domains on sub-types. It implies that the domain for a field at the subtype level is the same as the domain for the field at the layer level.

JSON Syntax

{
"type" : "inherited"
}

JSON Example

{
"type" : "inherited"
}