Query Domains (Map Service)

URL:
https://<featureservice-url>/queryDomains
Methods:
GET
Version Introduced:
10.5.1

Description

This operation was added at 10.5.1. Services that support the queryDomains operation include the supportsQueryDomains property set to true in the service resource.

The queryDomains operation returns full domain information for the domains referenced by the layers in the service. This operation is performed on a map service resource. The operation takes an array of layer IDs and returns the set of domains referenced by the layers.

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

Request parameters

ParameterDetails

f

Description: The response format. The default response format is html.

Values: html | json

layers

Description: An array of layers.

The set of domains to return is based on the domains referenced by these layers.

Syntax:

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

Example:

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

Example usage

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.