|
13 | 13 | "id": "3c886262", |
14 | 14 | "metadata": {}, |
15 | 15 | "source": [ |
16 | | - "The `arcgis.apps.dashboards` module, introduced in ArcGIS Python API v2.4.3, provides programmatic tools for managing dashboard items. It enables automation of common tasks such as:\n", |
| 16 | + "The [`arcgis.apps.dashboards`](/python/latest/api-reference/arcgis.apps.dashboards.html) module, introduced in ArcGIS Python API v2.4.3, provides programmatic tools for managing dashboard items. It enables automation of common tasks such as:\n", |
17 | 17 | "\n", |
18 | 18 | "<ul><li><b>Updating Data Sources:</b> Replace outdated or deprecated data sources without manual edits.\n", |
19 | 19 | "<li><b>Preserving Layout and Interactivity:</b> Reuse existing dashboard configurations while connecting to new datasets.</li>\n", |
|
27 | 27 | "source": [ |
28 | 28 | "This module supports only modern ArcGIS Dashboards items and does not work with items created in the retired ArcGIS Dashboards Classic app. \n", |
29 | 29 | "\n", |
30 | | - "Tip: To check whether a dashboard is supported, you can look at its data using the item’s `get_data()` function. Dashboards with a version shown as a string (such as \"4.30.0\",\"4.31.0\" and so on) or a number of 27 or higher are supported (see helper function below). If you find an older Classic dashboard (those with a version number below 27), you can update it by opening it in ArcGIS Dashboards, switching to Edit mode, and saving it." |
| 30 | + "> Tip: To check whether a dashboard is supported, you can look at its data using the item’s [`get_data()`](/python/latest/api-reference/arcgis.gis.toc.html#arcgis.gis.Item.get_data) function. Dashboards with a version shown as a string (such as \"4.30.0\",\"4.31.0\" and so on) or a number of 27 or higher are supported (see helper function below). If you find an older Classic dashboard (those with a version number below 27), you can update it by opening it in ArcGIS Dashboards, switching to Edit mode, and saving it." |
31 | 31 | ] |
32 | 32 | }, |
33 | 33 | { |
|
59 | 59 | "id": "7dde42a9", |
60 | 60 | "metadata": {}, |
61 | 61 | "source": [ |
62 | | - "<blockquote><b>[TBD] Note:</b> Support is currently limited to ArcGIS Online dashboards. ArcGIS Enterprise support will be introduced in a future release.</blockquote>" |
| 62 | + "<blockquote><b>Note:</b> Support is currently limited to ArcGIS Online dashboards. ArcGIS Enterprise support will be introduced in a future release.</blockquote>" |
63 | 63 | ] |
64 | 64 | }, |
65 | 65 | { |
|
76 | 76 | "metadata": {}, |
77 | 77 | "source": [ |
78 | 78 | "\n", |
79 | | - "`DashboardManager` is the main class for managing dashboard items. It supports operations such as dependency discovery and replacement, copying and upgrading dashboards.\n" |
| 79 | + "[`DashboardManager`](\"/python/latest/api-reference/arcgis.apps.dashboards.html#dashboardmanager\") is the main class for managing dashboard items. It supports operations such as dependency discovery and replacement, copying and upgrading dashboards.\n" |
80 | 80 | ] |
81 | 81 | }, |
82 | 82 | { |
|
186 | 186 | "id": "130d11d9", |
187 | 187 | "metadata": {}, |
188 | 188 | "source": [ |
189 | | - "The `get_dependencies()` function in the `DashboardManager` class retrieves the dependencies that a dashboard uses, including web maps and scenes, feature layers, embedded apps, and Arcade data expressions. You can optionally retrieve layer IDs and fields by specifying the DependencyOptions object." |
| 189 | + "The [`get_dependencies()`](/python/latest/api-reference/arcgis.apps.dashboards.html#arcgis.apps.dashboards.DashboardManager.get_dependencies) function in the `DashboardManager` class retrieves the dependencies that a dashboard uses, including web maps and scenes, feature layers, embedded apps, and Arcade data expressions. You can optionally retrieve layer IDs and fields by specifying the [DependencyOptions](/python/latest/api-reference/arcgis.apps.dashboards.html#dependencyoptions) object." |
190 | 190 | ] |
191 | 191 | }, |
192 | 192 | { |
|
226 | 226 | "id": "0875080c", |
227 | 227 | "metadata": {}, |
228 | 228 | "source": [ |
229 | | - " The `replace_dependencies()` function allows you to update existing dependencies and data sources by replacing them with new ones. The `item_mapping` parameter is a list of `ItemMapping` objects, where each entry maps a source item ID to a target item ID. Within each `ItemMapping`, optional `LayerMapping` and `FieldMapping` objects specify layer-level and field-level details for the replacement.\n", |
| 229 | + " The [`replace_dependencies()`](/python/latest/api-reference/arcgis.apps.dashboards.html#arcgis.apps.dashboards.DashboardManager.replace_dependencies) function allows you to update existing dependencies and data sources by replacing them with new ones. The `item_mapping` parameter is a list of [`ItemMapping`](/python/latest/api-reference/arcgis.apps.dashboards.html#arcgis.apps.dashboards.ItemMapping) objects, where each entry maps a source item ID to a target item ID. Within each `ItemMapping`, optional [`LayerMapping`](/python/latest/api-reference/arcgis.apps.dashboards.html#arcgis.apps.dashboards.LayerMapping) and [`FieldMapping`](/python/latest/api-reference/arcgis.apps.dashboards.html#fieldmapping) objects specify layer-level and field-level details for the replacement.\n", |
230 | 230 | "\n", |
231 | 231 | "Here is an example of item_mapping structure -" |
232 | 232 | ] |
|
300 | 300 | "source": [ |
301 | 301 | "The `replace_dependencies()` function updates an existing dashboard, making it ideal for scenarios where you need to fix broken data sources or update data with most current information. \n", |
302 | 302 | "\n", |
303 | | - "However, if the goal is to simply reuse the design layout and configurations of an existing dashboard and create a copy with different data sources, use the `copy()` function instead. Let's look at how this works below." |
| 303 | + "However, if the goal is to simply reuse the design layout and configurations of an existing dashboard and create a copy with different data sources, use the [`copy()`](/python/latest/api-reference/arcgis.apps.dashboards.html#arcgis.apps.dashboards.DashboardManager.copy) function instead. Let's look at how this works below." |
304 | 304 | ] |
305 | 305 | }, |
306 | 306 | { |
|
316 | 316 | "id": "4f489047", |
317 | 317 | "metadata": {}, |
318 | 318 | "source": [ |
319 | | - "The `copy()` function duplicates an existing dashboard within the same organization. \n", |
| 319 | + "The [`copy()`](/python/latest/api-reference/arcgis.apps.dashboards.html#arcgis.apps.dashboards.DashboardManager.copy) function duplicates an existing dashboard within the same organization. \n", |
320 | 320 | "\n", |
321 | 321 | "> Note: Providing an `ItemMapping` list through the `item_mapping` parameter lets you remap dependencies in the new dashboard; otherwise, the copy will continue to reference the original dependencies.\n", |
322 | 322 | "\n", |
|
385 | 385 | "id": "646057ec", |
386 | 386 | "metadata": {}, |
387 | 387 | "source": [ |
388 | | - "> Tip - If the goal is to clone dashboards from one organization to another, it is recommended to use `clone_items()` as it has also been enhanced to support dashboard items and the remapping of their dependencies.\n" |
| 388 | + "> Tip - If the goal is to clone dashboards from one organization to another, it is recommended to use [`clone_items()`](/python/latest/api-reference/arcgis.gis.toc.html#arcgis.gis.ContentManager.clone_items) as it has also been enhanced to support dashboard items and the remapping of their dependencies.\n" |
389 | 389 | ] |
390 | 390 | }, |
391 | 391 | { |
|
401 | 401 | "id": "5de7b145", |
402 | 402 | "metadata": {}, |
403 | 403 | "source": [ |
404 | | - "Use the `upgrade()` function to update a dashboard item to the latest version supported by the portal." |
| 404 | + "Use the [`upgrade()`](/python/latest/api-reference/arcgis.apps.dashboards.html#arcgis.apps.dashboards.DashboardManager.upgrade) function to update a dashboard item to the latest version supported by the portal." |
405 | 405 | ] |
406 | 406 | }, |
407 | 407 | { |
|
0 commit comments