<?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 Add item thows error when type isn't specified in the item_properties dictionary in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/add-item-thows-error-when-type-isn-t-specified-in/m-p/1234484#M8053</link>
    <description>&lt;P&gt;&lt;SPAN&gt;I'm using the API for Python to script adding content. The documentation states that the type key is optional in the item_properties dictionary when adding content.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;However, when I leave it out I get the following error:&lt;/SPAN&gt;&lt;BR /&gt;&lt;STRONG&gt;Exception: 'type' and 'title' property required.&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;(Error Code: 400)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Here is the documentation that I referenced that says type is an Optional string.&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="https://developers.arcgis.com/python/api-reference/arcgis.gis.toc.html#contentmanager" target="_blank" rel="noopener"&gt;https://developers.arcgis.com/python/api-reference/arcgis.gis.toc.html#contentmanager&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;(Navigate to&amp;gt;"add"&amp;gt;under the "Key:Value Dictionary...." table&amp;gt; note the "type" information&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is the snippet of code I'm using:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Throws the error above:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;item_prop = {
    "url": url,
    "title": title,
    "description": description,
    "accessInformation": accessInformation,
    "licenseInfo": termsofuse,
}
gis.content.add(item_properties=item_prop)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Will work:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;item_prop = {
    "type": type_item,
    "url": url,
    "title": title,
    "description": description,
    "accessInformation": accessInformation,
    "licenseInfo": termsofuse,
}
gis.content.add(item_properties=item_prop)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 23 Nov 2022 14:31:21 GMT</pubDate>
    <dc:creator>SupriyaK</dc:creator>
    <dc:date>2022-11-23T14:31:21Z</dc:date>
    <item>
      <title>Add item thows error when type isn't specified in the item_properties dictionary</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/add-item-thows-error-when-type-isn-t-specified-in/m-p/1234484#M8053</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I'm using the API for Python to script adding content. The documentation states that the type key is optional in the item_properties dictionary when adding content.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;However, when I leave it out I get the following error:&lt;/SPAN&gt;&lt;BR /&gt;&lt;STRONG&gt;Exception: 'type' and 'title' property required.&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;(Error Code: 400)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Here is the documentation that I referenced that says type is an Optional string.&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="https://developers.arcgis.com/python/api-reference/arcgis.gis.toc.html#contentmanager" target="_blank" rel="noopener"&gt;https://developers.arcgis.com/python/api-reference/arcgis.gis.toc.html#contentmanager&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;(Navigate to&amp;gt;"add"&amp;gt;under the "Key:Value Dictionary...." table&amp;gt; note the "type" information&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is the snippet of code I'm using:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Throws the error above:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;item_prop = {
    "url": url,
    "title": title,
    "description": description,
    "accessInformation": accessInformation,
    "licenseInfo": termsofuse,
}
gis.content.add(item_properties=item_prop)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Will work:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;item_prop = {
    "type": type_item,
    "url": url,
    "title": title,
    "description": description,
    "accessInformation": accessInformation,
    "licenseInfo": termsofuse,
}
gis.content.add(item_properties=item_prop)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Nov 2022 14:31:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/add-item-thows-error-when-type-isn-t-specified-in/m-p/1234484#M8053</guid>
      <dc:creator>SupriyaK</dc:creator>
      <dc:date>2022-11-23T14:31:21Z</dc:date>
    </item>
  </channel>
</rss>

