Query Domains (Feature Service)

URL:
https://<root>/<serviceName>/FeatureServer/queryDomains
Methods:
GET
Version Introduced:
10.5

Description

The queryDomains operation processes an array of layer IDs for a feature service and returns the full domain information for domains referenced by those layers. Support for this operation in indicated when the feature service has the supportsQueryDomains property set to true .

This operation can be used by clients to efficiently work with domains. For example, a client can use the queryDomains operation once to get and cache domain information. Clients can then set the returnDomainNames parameter as true on a feature layer resource to get just the domain names from the layer. The domain names returned from the feature layer resource can then be used to find the full domain information in the cache.

Request parameters

ParameterDetails

layers

An array of layers IDs. The domains returned from this request are the domains referenced by the specified layers.

Syntax

Use dark colors for code blocksCopy
1
layers=[<layerId1>,<layerId2>]

Example

Use dark colors for code blocksCopy
1
layers=[0,1,2,3,4,5,6]

f

The response format. The default response format is html.

Values: html | json | pjson

Example usage

The following is a sample request for the queryDomains operation:

Use dark colors for code blocksCopy
1
https://machine.domain.com/webadaptor/rest/services/PoolPermits/FeatureServer/queryDomains?layers=[0,1,2,3,4,5,6]&f=pjson

JSON Response syntax

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
{
  "domains": [
    {
      "type": "<domainType>",
      "name": "<domainName>",
      "fieldType": "<esriFieldType>",
      "range": [
        <minValue>,
        <maxValue>
      ],
      "mergePolicy": "<mergePolicy>",
      "splitPolicy": "<splitPolicy>"
    },
    {
      "type": "<domainType>",
      "name": "<domainName2>",
      "fieldType": "<esriFieldType>",
      "codedValues": [
        {
          "name": "<codedValueDescription1>",
          "code": <codedValue1>
        },
        {
          "name": "<codedValueDescription2>",
          "code": <codedValue2>
        },
      ],
      "mergePolicy": "<mergePolicy>",
      "splitPolicy": "<splitPolicy>"
    }
  ]
}

JSON Response example

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
{
  "domains": [
    {
      "type": "range",
      "name": "RDOM_1",
      "fieldType": "esriFieldTypeInteger",
      "range": [
        1,
        50
      ],
      "mergePolicy": "esriMPTDefaultValue",
      "splitPolicy": "esriSPTDefaultValue"
    },
    {
      "type": "range",
      "name": "RDOM_3",
      "fieldType": "esriFieldTypeDouble",
      "range": [
        100,
        150.5
      ],
      "mergePolicy": "esriMPTDefaultValue",
      "splitPolicy": "esriSPTDefaultValue"
    },
    {
      "type": "codedValue",
      "name": "CDOM_1",
      "fieldType": "esriFieldTypeDouble",
      "codedValues": [
        {
          "name": "code 1 description",
          "code": 1
        },
        {
          "name": "code 1.5 description",
          "code": 1.5
        },
        {
          "name": "code 2 description",
          "code": 2
        },
        {
          "name": "code 2.5 description",
          "code": 2.5
        }
      ],
      "mergePolicy": "esriMPTDefaultValue",
      "splitPolicy": "esriSPTDefaultValue"
    },
    {
      "type": "codedValue",
      "name": "CDOM_3",
      "fieldType": "esriFieldTypeInteger",
      "codedValues": [
        {
          "name": "code 100 description",
          "code": "code 100"
        },
        {
          "name": "code 200 description",
          "code": "code 200"
        },
        {
          "name": "code 300 description",
          "code": "code 300"
        }
      ],
      "mergePolicy": "esriMPTDefaultValue",
      "splitPolicy": "esriSPTDefaultValue"
    },
    {
      "type": "codedValue",
      "name": "CDOM_4",
      "fieldType": "esriFieldTypeDouble",
      "codedValues": [
        {
          "name": "coded 1000.1 desc",
          "code": 1000.1
        },
        {
          "name": "coded 2000.1 desc",
          "code": 2000.2
        },
        {
          "name": "coded 3000.1 desc",
          "code": 3000.3000000000002
        }
      ],
      "mergePolicy": "esriMPTDefaultValue",
      "splitPolicy": "esriSPTDefaultValue"
    }
  ]
}

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.