<?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 Re: Not Able to Get Portal Null Contents Item ID using ArcGIS API for Python in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/not-able-to-get-portal-null-contents-item-id-using/m-p/1511902#M10380</link>
    <description>&lt;P&gt;I expect something with type set to null to be broken.&lt;/P&gt;&lt;P&gt;Have you tried accessing it with the id, since you appear to have that?&lt;/P&gt;&lt;LI-CODE lang="python"&gt;id = "SET THIS TO AN ID"
item = gis.content.get(id)
print(f'Title: {item.title}, ID: {item.id}, Type: {item.type}')&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And also maybe this would work?&lt;/P&gt;&lt;LI-CODE lang="python"&gt;items = gis.content.search(query=f'owner:{username}', max_items=1000)
for item in items:
  if not item.type:
    print(f'Title: {item.title}, ID: {item.id}, Type: {item.type}')&lt;/LI-CODE&gt;</description>
    <pubDate>Mon, 29 Jul 2024 20:49:11 GMT</pubDate>
    <dc:creator>Brian_Wilson</dc:creator>
    <dc:date>2024-07-29T20:49:11Z</dc:date>
    <item>
      <title>Not Able to Get Portal Null Contents Item ID using ArcGIS API for Python</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/not-able-to-get-portal-null-contents-item-id-using/m-p/1511861#M10378</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using ArcGIS Enterprise 10.9.1 Sharing API I am able to see some `null` type items in my portal&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="BHK_0-1722281999789.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/111017i0F6C4875CABAE749/image-size/large?v=v2&amp;amp;px=999" role="button" title="BHK_0-1722281999789.png" alt="BHK_0-1722281999789.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;but when I try to get these items through ArcGIS API for Python like this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;username = "PortalUserXXX"
item_type = 'null'  # This represents null type

# Search for items
items = gis.content.search(query=f'owner:{username} AND type:"{item_type}"', max_items=1000)

# Print the retrieved items
for item in items:
    print(f'Title: {item.title}, ID: {item.id}, Type: {item.type}')&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am not getting anything in return.&lt;/P&gt;&lt;P&gt;I even tried this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;username = "PortalUserXXX"
item_type = None  # This represents null type&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and same result! I tried this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;username = "PortalUserXXX"
item_type = ''  # This represents null type&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;which is returning all items BUT not the Null one! Can you please let me know what I am doing wrong and what I am missing here?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jul 2024 20:08:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/not-able-to-get-portal-null-contents-item-id-using/m-p/1511861#M10378</guid>
      <dc:creator>BHK</dc:creator>
      <dc:date>2024-07-29T20:08:20Z</dc:date>
    </item>
    <item>
      <title>Re: Not Able to Get Portal Null Contents Item ID using ArcGIS API for Python</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/not-able-to-get-portal-null-contents-item-id-using/m-p/1511902#M10380</link>
      <description>&lt;P&gt;I expect something with type set to null to be broken.&lt;/P&gt;&lt;P&gt;Have you tried accessing it with the id, since you appear to have that?&lt;/P&gt;&lt;LI-CODE lang="python"&gt;id = "SET THIS TO AN ID"
item = gis.content.get(id)
print(f'Title: {item.title}, ID: {item.id}, Type: {item.type}')&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And also maybe this would work?&lt;/P&gt;&lt;LI-CODE lang="python"&gt;items = gis.content.search(query=f'owner:{username}', max_items=1000)
for item in items:
  if not item.type:
    print(f'Title: {item.title}, ID: {item.id}, Type: {item.type}')&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 29 Jul 2024 20:49:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/not-able-to-get-portal-null-contents-item-id-using/m-p/1511902#M10380</guid>
      <dc:creator>Brian_Wilson</dc:creator>
      <dc:date>2024-07-29T20:49:11Z</dc:date>
    </item>
    <item>
      <title>Re: Not Able to Get Portal Null Contents Item ID using ArcGIS API for Python</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/not-able-to-get-portal-null-contents-item-id-using/m-p/1511911#M10381</link>
      <description>&lt;P&gt;Hi Braian&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for reply. on first code&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;id = "647f546a463e474e9abf0211f4d4ccfe"
item = gis.content.get(id)
print(f'Title: {item.title}, ID: {item.id}, Type: {item.type}')&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am getting this error message:&amp;nbsp;&amp;nbsp;&lt;STRONG&gt;Unable to find ItemInfo for item '647f546a463e474e9abf0211f4d4ccfe' (Error Code: 500)&lt;/STRONG&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;your second submitted&amp;nbsp; snippet also is not returning anything&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jul 2024 20:56:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/not-able-to-get-portal-null-contents-item-id-using/m-p/1511911#M10381</guid>
      <dc:creator>BHK</dc:creator>
      <dc:date>2024-07-29T20:56:40Z</dc:date>
    </item>
    <item>
      <title>Re: Not Able to Get Portal Null Contents Item ID using ArcGIS API for Python</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/not-able-to-get-portal-null-contents-item-id-using/m-p/1511928#M10382</link>
      <description>&lt;P&gt;It's just a broken service. If you can look in your Portal server "contents/items" folder, you can find the folder that has the name matching the ID and look inside.&amp;nbsp; For example on my server it's in C:\arcgis\arcgisportal\content\items.&lt;/P&gt;&lt;P&gt;There will be a folder there for each item and you could open the folder and look inside. For instance on my server I could look in folder "b87919419f6c4cd4a1580085f58b0c8f" and for this service there is a folder "esriinfo" and in there is "iteminfo.json" and I could dump the contents of that file in a readable way and I'd see this&lt;/P&gt;&lt;LI-CODE lang="python"&gt;$ python -m json.tool &amp;lt; iteminfo.json
{
    "culture": "en-US",
    "name": "Clatsop_County_Locator",
    "guid": "",
    "catalogPath": "",
    "snippet": "Locator based on E911 address points, points of interest, parcels, and roads",
    "description": "Locator based on E911 address points, points of interest, parcels, and roads",
    "summary": "Locator based on E911 address points, points of interest, parcels, and roads",
    "title": "Clatsop_County_Locator",
    "tags": [
        "Clatsop",
        "County",
        "address",
        "locator",
        "geocode"
    ],
    "type": "Geocoding Service",
    "typeKeywords": [
        "Tool",
        "Service",
        "Geocoding Service",
        "Locator Service",
        "ArcGIS Server"
    ],
    "thumbnail": "",
    "url": "",
    "minScale": 0,
    "maxScale": 0,
    "spatialReference": "",
    "accessInformation": "",
    "licenseInfo": ""
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In your case, well, it might tell you all about a service that used to work but is now broken, and probably you will have to delete the item folder and then reindex your Portal to make it go away.&lt;/P&gt;&lt;P&gt;But if you are not comfortable doing that then you should put in a request to Esri help desk instead of trusting some random guy on Community who is retiring in less than 3 days. LOL (YAY YAY)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jul 2024 21:31:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/not-able-to-get-portal-null-contents-item-id-using/m-p/1511928#M10382</guid>
      <dc:creator>Brian_Wilson</dc:creator>
      <dc:date>2024-07-29T21:31:39Z</dc:date>
    </item>
    <item>
      <title>Re: Not Able to Get Portal Null Contents Item ID using ArcGIS API for Python</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/not-able-to-get-portal-null-contents-item-id-using/m-p/1511936#M10383</link>
      <description>&lt;P&gt;I should add, if you cannot find the item folder at all or the folder is empty then you can probably jump right to part two, reindex your portal. It is relatively harmless to do but makes the Portal unavailable for a few minutes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To reindex you log into your Portal Admin site, go to System, Indexer, and click Reindex.&lt;/P&gt;&lt;P&gt;The portal admin site is found at the same URL as the home page for your Portal but you replace "home" with "portaladmin" for example&lt;/P&gt;&lt;P&gt;&lt;A href="https://bhk.somewhere.com/portal/portaladmin" target="_blank"&gt;https://bhk.somewhere.com/portal/portaladmin&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jul 2024 21:36:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/not-able-to-get-portal-null-contents-item-id-using/m-p/1511936#M10383</guid>
      <dc:creator>Brian_Wilson</dc:creator>
      <dc:date>2024-07-29T21:36:30Z</dc:date>
    </item>
  </channel>
</rss>

