<?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 REST.api Query in ArcGIS REST APIs and Services Questions</title>
    <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/rest-api-query/m-p/488704#M2344</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Greetings,&lt;/P&gt;&lt;P&gt;I have a query,&amp;nbsp;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #000000; font-family: Verdana,Arial,Helvetica,sans-serif; font-size: 11px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;using Python&lt;/SPAN&gt; that returns all the Map Image layers.&lt;/P&gt;&lt;P&gt;I am trying to filter the query:&lt;/P&gt;&lt;P&gt;a) to filter out owner: esri_livingatlas&lt;/P&gt;&lt;P&gt;b) to filter out title: USA&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #000000; font-family: Verdana,Arial,Helvetica,sans-serif; font-size: 11px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;If I use != or NOT&amp;nbsp; for owner, to filter. I get an error??&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: transparent; color: #000000; font-family: Verdana,Arial,Helvetica,sans-serif; font-size: 11px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; min-height: 0px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #000000; font-family: Verdana,Arial,Helvetica,sans-serif; font-size: 11px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;I can only use two parameters in the Query??&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clive&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV&gt;source = GIS(source_portal, source_admin, source_admin_password, verify_cert=False)&lt;BR /&gt;print("LOGGED INTO SOURCE")&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;title = "*"&lt;BR /&gt;owner != "esri*"&lt;BR /&gt;content = source.content.search("title:" + title, item_type="Map Image Layer", max_items=500)&lt;/DIV&gt;&lt;DIV&gt;print("OUTPUT")&lt;BR /&gt;for item in content:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if 'title:' != '*USA*':&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print(item)&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;The output:&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #000000; font-family: monospace; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 16.94px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre-wrap; word-break: break-all; word-spacing: 0px; word-wrap: break-word;"&gt;START &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #000000; font-family: monospace; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 16.94px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre-wrap; word-break: break-all; word-spacing: 0px; word-wrap: break-word;"&gt;LOGGED INTO SOURCE &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #000000; font-family: monospace; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 16.94px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre-wrap; word-break: break-all; word-spacing: 0px; word-wrap: break-word;"&gt;OUTPUT &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #000000; font-family: monospace; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 16.94px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre-wrap; word-break: break-all; word-spacing: 0px; word-wrap: break-word;"&gt;&amp;lt;Item title:"National Weather Service Wind Forecast" type:Map Image Layer owner:esri_livingatlas&amp;gt; &amp;lt;Item title:"USA Weather Warnings and Watches" type:Map Image Layer owner:esri_livingatlas&amp;gt; &amp;lt;Item title:"National Weather Service Wind Gust Forecast" type:Map Image Layer owner:esri_livingatlas&amp;gt; &amp;lt;Item title:"USA Soil Map Units 2014 (Mature Support)" type:Map Image Layer owner:esri_livingatlas&amp;gt; &amp;lt;Item title:"2016 USA Organic Food Consumption" type:Map Image Layer owner:esri_livingatlas&amp;gt; &amp;lt;Item title:"2017 USA Diabetes Medication Users (Non-Insulin)" type:Map Image Layer owner:esri_livingatlas&amp;gt; &amp;lt;Item title:"2016 USA 401(k) Retirement Plans" type:Map Image Layer owner:esri_livingatlas&amp;gt; &amp;lt;Item title:"2017 USA Diabetes Medication Users (Insulin)" type:Map Image Layer owner:esri_livingatlas&amp;gt; &amp;lt;Item title:"USA USFS Lands (Mature Support)" type:Map Image Layer owner:esri_livingatlas&amp;gt; &amp;lt;Item title:"2016 USA Clothing/Accessory Store Market Opportunity" type:Map Image Layer owner:esri_livingatlas&amp;gt; &amp;lt;Item title:"2017 USA 401(k) Retirement Plans" type:Map Image Layer owner:esri_livingatlas&amp;gt; &amp;lt;Item title:"USA Soils Map Units" type:Map Image Layer owner:esri_livingatlas&amp;gt; &amp;lt;Item title:"2017 USA Transportation Fuel Spending" type:Map Image Layer owner:esri_livingatlas&amp;gt; &amp;lt;Item title:"2017 USA Child Care Spending" type:Map Image Layer owner:esri_livingatlas&amp;gt; &amp;lt;Item title:"2016 USA Online Banking" type:Map Image Layer owner:esri_livingatlas&amp;gt; &amp;lt;Item title:"USA Storm Reports" type:Map Image Layer owner:esri_livingatlas&amp;gt; &amp;lt;Item title:"USA Hazardous Waste Sites" type:Map Image Layer owner:esri_livingatlas&amp;gt; &amp;lt;Item title:"2017 USA Water and Public Services Spending" type:Map Image Layer owner:esri_livingatlas&amp;gt; &amp;lt;Item title:"USA NPS Lands (Mature Support)" type:Map Image Layer owner:esri_livingatlas&amp;gt; &amp;lt;Item title:"USA Wetlands 2015" type:Map Image Layer owner:esri_livingatlas&amp;gt; &amp;lt;Item title:"2017 USA Food Service Market Opportunity" type:Map Image Layer owner:esri_livingatlas&amp;gt; &amp;lt;Item title:"2017 USA Per Capita Income" type:Map Image Layer owner:esri_livingatlas&amp;gt; &amp;lt;Item title:"Elevation Coverage Map" type:Map Image Layer owner:esri_livingatlas&amp;gt; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 12 Feb 2020 12:56:08 GMT</pubDate>
    <dc:creator>CliveSwan</dc:creator>
    <dc:date>2020-02-12T12:56:08Z</dc:date>
    <item>
      <title>REST.api Query</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/rest-api-query/m-p/488704#M2344</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Greetings,&lt;/P&gt;&lt;P&gt;I have a query,&amp;nbsp;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #000000; font-family: Verdana,Arial,Helvetica,sans-serif; font-size: 11px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;using Python&lt;/SPAN&gt; that returns all the Map Image layers.&lt;/P&gt;&lt;P&gt;I am trying to filter the query:&lt;/P&gt;&lt;P&gt;a) to filter out owner: esri_livingatlas&lt;/P&gt;&lt;P&gt;b) to filter out title: USA&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #000000; font-family: Verdana,Arial,Helvetica,sans-serif; font-size: 11px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;If I use != or NOT&amp;nbsp; for owner, to filter. I get an error??&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: transparent; color: #000000; font-family: Verdana,Arial,Helvetica,sans-serif; font-size: 11px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; min-height: 0px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #000000; font-family: Verdana,Arial,Helvetica,sans-serif; font-size: 11px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;I can only use two parameters in the Query??&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clive&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV&gt;source = GIS(source_portal, source_admin, source_admin_password, verify_cert=False)&lt;BR /&gt;print("LOGGED INTO SOURCE")&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;title = "*"&lt;BR /&gt;owner != "esri*"&lt;BR /&gt;content = source.content.search("title:" + title, item_type="Map Image Layer", max_items=500)&lt;/DIV&gt;&lt;DIV&gt;print("OUTPUT")&lt;BR /&gt;for item in content:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if 'title:' != '*USA*':&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print(item)&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;The output:&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #000000; font-family: monospace; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 16.94px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre-wrap; word-break: break-all; word-spacing: 0px; word-wrap: break-word;"&gt;START &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #000000; font-family: monospace; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 16.94px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre-wrap; word-break: break-all; word-spacing: 0px; word-wrap: break-word;"&gt;LOGGED INTO SOURCE &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #000000; font-family: monospace; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 16.94px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre-wrap; word-break: break-all; word-spacing: 0px; word-wrap: break-word;"&gt;OUTPUT &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #000000; font-family: monospace; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 16.94px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre-wrap; word-break: break-all; word-spacing: 0px; word-wrap: break-word;"&gt;&amp;lt;Item title:"National Weather Service Wind Forecast" type:Map Image Layer owner:esri_livingatlas&amp;gt; &amp;lt;Item title:"USA Weather Warnings and Watches" type:Map Image Layer owner:esri_livingatlas&amp;gt; &amp;lt;Item title:"National Weather Service Wind Gust Forecast" type:Map Image Layer owner:esri_livingatlas&amp;gt; &amp;lt;Item title:"USA Soil Map Units 2014 (Mature Support)" type:Map Image Layer owner:esri_livingatlas&amp;gt; &amp;lt;Item title:"2016 USA Organic Food Consumption" type:Map Image Layer owner:esri_livingatlas&amp;gt; &amp;lt;Item title:"2017 USA Diabetes Medication Users (Non-Insulin)" type:Map Image Layer owner:esri_livingatlas&amp;gt; &amp;lt;Item title:"2016 USA 401(k) Retirement Plans" type:Map Image Layer owner:esri_livingatlas&amp;gt; &amp;lt;Item title:"2017 USA Diabetes Medication Users (Insulin)" type:Map Image Layer owner:esri_livingatlas&amp;gt; &amp;lt;Item title:"USA USFS Lands (Mature Support)" type:Map Image Layer owner:esri_livingatlas&amp;gt; &amp;lt;Item title:"2016 USA Clothing/Accessory Store Market Opportunity" type:Map Image Layer owner:esri_livingatlas&amp;gt; &amp;lt;Item title:"2017 USA 401(k) Retirement Plans" type:Map Image Layer owner:esri_livingatlas&amp;gt; &amp;lt;Item title:"USA Soils Map Units" type:Map Image Layer owner:esri_livingatlas&amp;gt; &amp;lt;Item title:"2017 USA Transportation Fuel Spending" type:Map Image Layer owner:esri_livingatlas&amp;gt; &amp;lt;Item title:"2017 USA Child Care Spending" type:Map Image Layer owner:esri_livingatlas&amp;gt; &amp;lt;Item title:"2016 USA Online Banking" type:Map Image Layer owner:esri_livingatlas&amp;gt; &amp;lt;Item title:"USA Storm Reports" type:Map Image Layer owner:esri_livingatlas&amp;gt; &amp;lt;Item title:"USA Hazardous Waste Sites" type:Map Image Layer owner:esri_livingatlas&amp;gt; &amp;lt;Item title:"2017 USA Water and Public Services Spending" type:Map Image Layer owner:esri_livingatlas&amp;gt; &amp;lt;Item title:"USA NPS Lands (Mature Support)" type:Map Image Layer owner:esri_livingatlas&amp;gt; &amp;lt;Item title:"USA Wetlands 2015" type:Map Image Layer owner:esri_livingatlas&amp;gt; &amp;lt;Item title:"2017 USA Food Service Market Opportunity" type:Map Image Layer owner:esri_livingatlas&amp;gt; &amp;lt;Item title:"2017 USA Per Capita Income" type:Map Image Layer owner:esri_livingatlas&amp;gt; &amp;lt;Item title:"Elevation Coverage Map" type:Map Image Layer owner:esri_livingatlas&amp;gt; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Feb 2020 12:56:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/rest-api-query/m-p/488704#M2344</guid>
      <dc:creator>CliveSwan</dc:creator>
      <dc:date>2020-02-12T12:56:08Z</dc:date>
    </item>
    <item>
      <title>Re: REST.api Query</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/rest-api-query/m-p/488705#M2345</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I placed the NOT in the variable, this worked..&lt;/P&gt;&lt;P&gt;It excluded all the esri_ layers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV&gt;owner = "* NOT esri"&lt;BR /&gt;#content = source.content.search("title:" + title, item_type="Map Image Layer", max_items=500)&lt;BR /&gt;content = source.content.search("Owner:" + owner, item_type="Map Image Layer", max_items=500)&lt;/DIV&gt;&lt;DIV&gt;print("OUTPUT")&lt;BR /&gt;for item in content:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print(item)&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Feb 2020 13:28:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/rest-api-query/m-p/488705#M2345</guid>
      <dc:creator>CliveSwan</dc:creator>
      <dc:date>2020-02-12T13:28:05Z</dc:date>
    </item>
  </channel>
</rss>

