fixed typos and updated path to data file
"metadata": {},
"source": [
"### Searching for content in ArcGIS Online\n",
- "So far, we searched for content accessible to a user logged into ArcGIS Enterprise. Let's connect directly to an ArcGIS Online Organiztion and futher explore ways to search for web GIS content."
+ "So far, we searched for content accessible to a user logged into ArcGIS Enterprise. Let's connect directly to an ArcGIS Online Organization and futher explore ways to search for web GIS content."
]
},
{
"source": [
"## Creating new content\n",
"\n",
- "To create new items on your GIS, you use the [`add()`](https://esri.github.io/arcgis-python-api/apidoc/html/arcgis.gis.toc.html#arcgis.gis.ContentManager.add) method on `ContentManager` object. Again, rather than creating an instance of the `ContentManager` directly, the Python API implments the class as the `content` property of your `GIS` object.\n",
+ "To create new items on your GIS, you use the [`add()`](https://esri.github.io/arcgis-python-api/apidoc/html/arcgis.gis.toc.html#arcgis.gis.ContentManager.add) method on a `ContentManager` instance. Again, rather than creating an instance of the `ContentManager` directly, the Python API implments the class as the `content` property of your `GIS` object.\n",
"\n",
"The `add()` method accepts a dictionary containing the properties of the item to be created. The optional `data` parameter accepts a string path to a file. You can use the optional `metadata` parameter to specify an XML file containing metadata information.\n",
"\n",
- "All content you add this way is added to the authenticated user's contents. Let us connect to our Enterprise instance, add a csv file as an item and then publish a feature layer from it."
+ "All content you add this way is added to the authenticated user's contents. Let us connect to our Enterprise instance, add a csv file as an item and then publish a feature layer from it.\n",
+ "\n",
+ "For example, set up a path to the data:\n",
+ "`data_path = os.path.join(r\"<your_drive>:\\\\\", \"path\", \"to\", \"data\")`"
]
},
{
"metadata": {},
"outputs": [],
"source": [
- "data_path = os.path.join(r\"<your_drive>:\\\\\", \"path\", \"to\", \"data\")"
+ "data_path = (r\".\\data\")"
]
},
{
"\n",
"So far, we observed how an existing item can be used to publish a service. The `ContentManager` class allows you to publish a new service without any content using the `create_service()` method. This capability is useful when you want to create an empty service first then add content to it by editing it from client applications - Collector for ArcGIS for instance.\n",
"\n",
- "Before you create a service, you would want to ensure your desired service name is available. Since service name is part of the URL for a service, they need to be unique for a service type in an org. For this purpose, you would use `is_service_name_available()` method.\n",
+ "Before you create a service, you would want to ensure your desired service name is available. Since service name is part of the URL for a service, they need to be unique for a service type in an organization. For this purpose, you would use `is_service_name_available()` method.\n",
"\n",
"Below, let us publish an empty feature service. If successful, the API would return a feature layer item."
]
