<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Is it posible to query for a specific domain. QueryDomains returns all in ArcGIS REST APIs and Services Questions</title>
    <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/is-it-posible-to-query-for-a-specific-domain/m-p/1691699#M5101</link>
    <description>&lt;P&gt;Hi All&lt;/P&gt;&lt;P&gt;I need to get the domain codes for a specific domain. I can use QueryDomains, but that returns all domains.&lt;/P&gt;&lt;P&gt;Is there a way to query for a specific domain using the REST API?&lt;/P&gt;&lt;P&gt;Otherwise I will have to filter the json afterwards, which I would like to avoid.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Carsten&lt;/P&gt;</description>
    <pubDate>Fri, 20 Mar 2026 14:20:13 GMT</pubDate>
    <dc:creator>CarstenB_orsted</dc:creator>
    <dc:date>2026-03-20T14:20:13Z</dc:date>
    <item>
      <title>Is it posible to query for a specific domain. QueryDomains returns all</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/is-it-posible-to-query-for-a-specific-domain/m-p/1691699#M5101</link>
      <description>&lt;P&gt;Hi All&lt;/P&gt;&lt;P&gt;I need to get the domain codes for a specific domain. I can use QueryDomains, but that returns all domains.&lt;/P&gt;&lt;P&gt;Is there a way to query for a specific domain using the REST API?&lt;/P&gt;&lt;P&gt;Otherwise I will have to filter the json afterwards, which I would like to avoid.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Carsten&lt;/P&gt;</description>
      <pubDate>Fri, 20 Mar 2026 14:20:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/is-it-posible-to-query-for-a-specific-domain/m-p/1691699#M5101</guid>
      <dc:creator>CarstenB_orsted</dc:creator>
      <dc:date>2026-03-20T14:20:13Z</dc:date>
    </item>
    <item>
      <title>Re: Is it posible to query for a specific domain. QueryDomains returns all</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/is-it-posible-to-query-for-a-specific-domain/m-p/1693980#M5106</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/475927"&gt;@CarstenB_orsted&lt;/a&gt;&amp;nbsp;I had thought that domains get attached to fields, and if you query the layer for the fields definitions that you could find what domain goes with it that way.&amp;nbsp; Not sure if it can be done via URL alone though.&lt;BR /&gt;&lt;BR /&gt;I think you can write an easy JS method like this:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;function getDomainByName(serviceJson, domainName) {
  if (serviceJson.domains?.[domainName]) {
    return serviceJson.domains[domainName];
  }
  return null;
}&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;other options might be to do the filter client side like this:&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const domain = domains.find(d =&amp;gt; d.name === "MyDomain");&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Can you do it from a layer definition like this?&amp;nbsp;/FeatureServer/0?f=json&lt;BR /&gt;&lt;BR /&gt;When I do this in code I usually either get the full list, and then known which one to look for by the field name that's associated, or hard code it in advance.&lt;BR /&gt;&lt;BR /&gt;That I realize, doesn't help if you aren't working in custom code though.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Apr 2026 17:07:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/is-it-posible-to-query-for-a-specific-domain/m-p/1693980#M5106</guid>
      <dc:creator>TimWestern</dc:creator>
      <dc:date>2026-04-01T17:07:19Z</dc:date>
    </item>
  </channel>
</rss>

