|
271 | 271 | "source": [
|
272 | 272 | "## Cloning an Experience and Validating its Success\n",
|
273 | 273 | "\n",
|
274 |
| - "Among other changes, 2.2.0 brings in the ability to clone experiences. This can be done both through `gis.content.clone_items()` or through the WebExperience class. We'll show here the helpful extra tools the class has to aid in this workflow." |
| 274 | + "Among other changes, 2.2.0 brought in the ability to clone experiences, meaning you can create experiences in one GIS organization and easily move them to another. As with other items, this can be done by using `gis.content.clone_items()`. We'll show here the helpful extra tools the class has to aid in this workflow." |
275 | 275 | ]
|
276 | 276 | },
|
277 | 277 | {
|
|
354 | 354 | ],
|
355 | 355 | "source": [
|
356 | 356 | "target = GIS(profile=\"another_online_profile\")\n",
|
357 |
| - "cloned_exp = portal_exp.clone(\n", |
358 |
| - " target = target, \n", |
359 |
| - " owner = \"another_online_user\",\n", |
| 357 | + "cloned_list = target.content.clone_items(\n", |
| 358 | + " [portal_exp],\n", |
360 | 359 | " search_existing_items = False,\n",
|
361 | 360 | ")\n",
|
| 361 | + "cloned_exp = cloned_list[1]\n", |
362 | 362 | "cloned_exp"
|
363 | 363 | ]
|
364 | 364 | },
|
|
374 | 374 | "cell_type": "code",
|
375 | 375 | "execution_count": null,
|
376 | 376 | "id": "d45bf80a",
|
377 |
| - "metadata": { |
378 |
| - "scrolled": false |
379 |
| - }, |
| 377 | + "metadata": {}, |
380 | 378 | "outputs": [],
|
381 | 379 | "source": [
|
382 | 380 | "WebExperience(cloned_exp).view()"
|
|
401 | 399 | "\n",
|
402 | 400 | "We'll show how to get an experience from the Developer Edition Experience Builder, upload it to different portals, and make sure the dependent data items get remapped accordingly. Instructions downloading and installing the Developer Edition can be found [here](https://developers.arcgis.com/experience-builder/guide/install-guide/).\n",
|
403 | 401 | "\n",
|
404 |
| - "First, you'll want to download your experience from the homepage of your local Experience Builder app, and then figure out what the path to the `config.json` file is. Once you know this, you can work with it in the ArcGIS API for Python." |
| 402 | + "It's easy as just downloading your experience from the Developer Edition interface, and then knowing the path to your the download folder. Within the inner folders, there will be a file named `config.json`- this file contains the structure of your experience, expressed in the exact same way that online experiences are. You can pass in the path to this file to the `upload()` function, or the path to the main project folder in version 2.4.0 or higher." |
405 | 403 | ]
|
406 | 404 | },
|
407 | 405 | {
|
|
618 | 616 | "id": "b7d49ce9",
|
619 | 617 | "metadata": {},
|
620 | 618 | "source": [
|
621 |
| - "As you can see, we can check instantly that our Experience is viewable in the new target GIS, and that the data sources were properly remapped. `dataSource_1` was remapped through `auto_remap`, and `dataSource_4` had its `itemId` and `portalUrl` values changed by `item_mapping`." |
| 619 | + "As you can see, we can check instantly that our Experience is viewable in the new target GIS, and that the data sources were properly remapped. `dataSource_1` was remapped through `auto_remap`, and `dataSource_4` had its `itemId` and `portalUrl` values changed by `item_mapping`.\n", |
| 620 | + "\n", |
| 621 | + "One final note is that as of ArcGIS API for Python version 2.4.0, locally created experiences uploaded to a portal will also copy the experience's image resources as well- so if you have embedded images in your experience, those will get carried over, portrayed in your experience, and stored in the experience item's resources." |
622 | 622 | ]
|
623 | 623 | }
|
624 | 624 | ],
|
|
638 | 638 | "name": "python",
|
639 | 639 | "nbconvert_exporter": "python",
|
640 | 640 | "pygments_lexer": "ipython3",
|
641 |
| - "version": "3.9.17" |
| 641 | + "version": "3.10.14" |
642 | 642 | }
|
643 | 643 | },
|
644 | 644 | "nbformat": 4,
|
|
0 commit comments