diff --git a/samples/03_org_administrators/validate_item_metadata.ipynb b/samples/03_org_administrators/validate_item_metadata.ipynb index 5548395f4..15ccc5644 100644 --- a/samples/03_org_administrators/validate_item_metadata.ipynb +++ b/samples/03_org_administrators/validate_item_metadata.ipynb @@ -48,7 +48,7 @@ "\n", "import pandas as pd\n", "\n", - "from arcgis.gis import GIS" + "from arcgis.gis import GIS, ItemTypeEnum, ItemProperties" ] }, { @@ -466,7 +466,19 @@ } ], "source": [ - "gis.content.add({}, output_dir + out_file)" + "root_folder = gis.content.folders.get()\n", + "\n", + "new_item_props = ItemProperties(\n", + " \"title\":out_file,\n", + " \"type\":ItemTypeEnum.CSV.value,\n", + " \"tags\":\"item_metatdata_report\",\n", + " \"snippet\":\"Report on item attributes from API\"\n", + ")\n", + "\n", + "root_folder.add(\n", + " item_properties=new_item_props,\n", + " file=os.path.join(output_dir + out_file)\n", + ").result()" ] }, { @@ -516,7 +528,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.7.16" + "version": "3.11.0" }, "toc": { "base_numbering": 1, @@ -533,5 +545,5 @@ } }, "nbformat": 4, - "nbformat_minor": 2 + "nbformat_minor": 4 } diff --git a/samples/03_org_administrators/validate_user_profiles.ipynb b/samples/03_org_administrators/validate_user_profiles.ipynb index 2cb1fc7b4..1952ea7c2 100644 --- a/samples/03_org_administrators/validate_user_profiles.ipynb +++ b/samples/03_org_administrators/validate_user_profiles.ipynb @@ -44,7 +44,7 @@ "\n", "import pandas as pd\n", "\n", - "from arcgis.gis import GIS" + "from arcgis.gis import GIS, ItemPropertie, ItemTypeEnum" ] }, { @@ -281,7 +281,19 @@ } ], "source": [ - "gis.content.add({}, output_dir + out_file)" + "item_props = ItemProperties(\n", + " \"title\" = out_file,\n", + " \"type\" = ItemTypeEnum.CSV,\n", + " \"tags\" = \"user_profile_report\",\n", + " \"snippet\" = \"Report on user profile data from Python API\"\n", + ")\n", + "\n", + "root_folder = gis.content.folders.get()\n", + "\n", + "gis.content.add(\n", + " item_properties = item_props,\n", + " file= os.path.join(output_dir + out_file)\n", + ").result()" ] }, { @@ -331,7 +343,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.7.16" + "version": "3.11.0" }, "toc": { "base_numbering": 1, @@ -348,5 +360,5 @@ } }, "nbformat": 4, - "nbformat_minor": 2 + "nbformat_minor": 4 }