Add Portal Items To Catalog Dataset (Data Management)

Summary

Adds ArcGIS Online or ArcGIS Enterprise portal service items—such as feature, map, image, scene, and tile services—to an existing catalog dataset.

Usage

  • This tool adds items from the active portal to a catalog dataset. The active portal is assumed from the application. See Access portal items and groups for more information.

  • Items must be manually removed from the dataset's attribute table.

  • After the target catalog dataset is specified, you can apply filters to only add certain items. You can filter items based on their data type, sharing level, organizational status, or spatial extent.

  • To add portal items to a catalog dataset created in ArcGIS Pro 3.1, the dataset must be upgraded with the Upgrade Dataset tool.

  • Items added to the catalog dataset must have an extent.

  • OGC feature services, feature collections, table layers, elevation layers, and video layers are not supported and cannot be input as a portal item type.

Parameters

LabelExplanationData Type
Target Catalog Dataset

The catalog dataset to which portal items will be added.

Catalog Layer
Input portal item types
(Optional)

Specifies the item types that will be added to the catalog dataset from the portal. All supported item types will be added by default.

  • Feature layersFeature layers will be added. This option does not add feature collections.
  • Imagery layersImagery layers will be added.
  • Map image and tile layersMap image and tile layers will be added.
  • Scene layersScene layers will be added.
  • Vector tile layersVector tile layers will be added.
  • Web Feature Service (WFS) layersWeb Feature Service (WFS) layers will be added.
  • Web Map Service (WMS) layersWeb Map Service (WMS) layers will be added.
  • Web Map Tile Service (WMTS) layersWeb Map Tile Service (WMTS) layers will be added.
String
Content
(Optional)

Specifies the collection in the active portal from which items will be added to the catalog dataset.

  • My Content Items from your My Content collection will be added. This is the default.
  • My GroupsItems from groups to which you belong will be added.
  • My OrganizationItems from your ArcGIS organization will be added.
String
Portal folders
(Optional)

The portal folders from which items will be added to the catalog dataset.

String
Portal groups
(Optional)

The portal groups from which items will be added to the catalog dataset.

String
Access level
(Optional)

Specifies the sharing level that portal items must have to be added to the catalog dataset.

  • Public Items that are shared with the public will be added to the catalog dataset. This is the default.
  • OrganizationItems that are shared with the organization, as well as items you own will be added to the catalog dataset. Items that are shared with the organization and one or more groups will also be added.
  • SharedItems shared with one or more groups, item owners, and those who have access to the item through group membership will be added to the catalog dataset.
  • PrivateItems owned by you will be added to the catalog dataset. Only you or administrators who have access to your content can add these items.
String

Derived Output

LabelExplanationData Type
Output Catalog Dataset

The updated catalog dataset.

Catalog Layer

arcpy.management.AddPortalItemsToCatalogDataset(target_catalog_dataset, {input_portal_itemtypes}, {content}, {portal_folders}, {portal_groups}, {access_level})
NameExplanationData Type
target_catalog_dataset

The catalog dataset to which portal items will be added.

Catalog Layer
input_portal_itemtypes
[input_portal_itemtypes,...]
(Optional)

Specifies the item types that will be added to the catalog dataset from the portal. All supported item types will be added by default.

  • FEATURE_SERVICEFeature layers will be added. This option does not add feature collections.
  • IMAGE_SERVICEImagery layers will be added.
  • MAP_SERVICEMap image and tile layers will be added.
  • SCENE_SERVICEScene layers will be added.
  • VECTOR_TILE_SERVICEVector tile layers will be added.
  • WFSWeb Feature Service (WFS) layers will be added.
  • WMSWeb Map Service (WMS) layers will be added.
  • WMTSWeb Map Tile Service (WMTS) layers will be added.
String
content
(Optional)

Specifies the collection in the active portal from which items will be added to the catalog dataset.

  • MY_CONTENT Items from your My Content collection will be added. This is the default.
  • MY_GROUPSItems from groups to which you belong will be added.
  • MY_ORGANIZATIONItems from your ArcGIS organization will be added.
String
portal_folders
[portal_folders,...]
(Optional)

The portal folders from which items will be added to the catalog dataset.

String
portal_groups
[portal_groups,...]
(Optional)

The portal groups from which items will be added to the catalog dataset.

String
access_level
(Optional)

Specifies the sharing level that portal items must have to be added to the catalog dataset.

  • PUBLIC Items that are shared with the public will be added to the catalog dataset. This is the default.
  • ORGItems that are shared with the organization, as well as items you own will be added to the catalog dataset. Items that are shared with the organization and one or more groups will also be added.
  • SHAREDItems shared with one or more groups, item owners, and those who have access to the item through group membership will be added to the catalog dataset.
  • PRIVATEItems owned by you will be added to the catalog dataset. Only you or administrators who have access to your content can add these items.
String

Derived Output

NameExplanationData Type
out_catalog_dataset

The updated catalog dataset.

Catalog Layer

Code sample

AddPortalItemsToCatalogDataset example 1 (stand-alone script)

This example adds image services that are located in the private SampleTestFolder portal folder to the SampleCatalog dataset.

import arcpy

target_catalog_dataset = r"C:/Dataspace/studyarea.gdb/SampleCatalog"
input_portal_itemtypes = "IMAGE_SERVICE"
content = "MY_CONTENT"
portal_groups = None 
portal_folders = "SampleFolder"
access_level = "PRIVATE"
arcpy.management.AddPortalItemsToCatalogDataset(target_catalog_dataset,
                                        input_portal_itemtypes, content, 
                                        portal_folders, portal_groups,
                                        access_level)
AddPortalItemsToCatalogDataset example 2 (stand-alone script)

This example adds scene and WFS services that belong to the SampleGroup group and are shared with the organization to the SampleCatalog dataset.

import arcpy

target_catalog_dataset = r"C:/Dataspace/studyarea.gdb/SampleCatalog"
input_portal_itemtypes = ["SCENE_SERVICE", "WFS"]
content = "MY_GROUPS"
portal_groups = "SampleGroup" 
portal_folders = None
access_level = "ORG"
arcpy.management.AddPortalItemsToCatalogDataset(target_catalog_dataset,
                                        input_portal_itemtypes, content,
                                        portal_folders, portal_groups,
                                        access_level)

Environments

Special cases

Extent

If this environment is set to the Intersection of Inputs or the Union of Inputs option, this environment will be ignored.

Related topics