AGOLServicesDirectory
- class arcgis.gis.agoserver.AGOLServicesDirectory(url: str, gis: GIS)
Bases:
objectProvides access to the hosted services for specific servers of the ArcGIS Online Organization. Objects of this class are not meant to be initialized directly, but instead a list of directories is returned when accessing the
hosting_serversproperty on a GIS object initialized with ArcGIS Online credentials:# Usage Example: Get ArcGIS Online organization Service Directories >>> from arcgis.gis import GIS >>> gis = GIS(profile="your_online_profile") >>> gis.hosting_servers [< AGOLServicesDirectory @ https://servicesX.arcgis.com/<org_id>/arcgis/rest/services >, < AGOLServicesDirectory @ https://tiles.arcgis.com/tiles/<org_id>/arcgis/rest/services >]
Parameter
Description
url
Required String. The url string to the ArcGIS Online Server
gis
Required
GISobject initialized from ArcGIS Online credentials.- property properties: InsensitiveDict
Returns the server’s version property and a list of services in the organization on that server.
Note
Return times for this property will vary based on number of services hosted by the organization.
- Returns:
A dictionary-like InsensitiveDict object containing the version and a list of services hosted on the particular server.
- property services: list
Returns a list of layer objects hosted on the ArcGIS Online server.
# Usage Example: Accessing services through the properties of a Tile Server >>> from arcgis.gis import GIS >>> gis = GIS(profile="your_online_admin_profile") >>> gis.hosting_servers [< AGOLServicesDirectory @ https://services7.arcgis.com/<org_id>/arcgis/rest/services >, < AGOLServicesDirectory @ https://tiles.arcgis.com/tiles/<org_id>/arcgis/rest/services >] >>> tile_sd = gis.hosting_servers[1] >>> tiles_sd.services [<PointCloudLayer url:"https://tiles.arcgis.com/tiles/org_id/arcgis/rest/services/scene_service1/SceneServer">, <VectorTileLayer url:"https://tiles.arcgis.com/tiles/org_id/arcgis/rest/services/vector_service1/VectorTileServer">, ... <MapImageLayer url:"https://tiles.arcgis.com/tiles/org_id/arcgis/rest/services/map_service1/MapServer">]
AGOLServersManager
- class arcgis.gis.agoserver.AGOLServersManager(gis: GIS)
Bases:
objectThis class allows users to work with hosted tile and feature services on ArcGIS Online. This class is not meant to be initialized directly, but accessed using the
serversproperty on anAGOLAdminManagerobject:# Usage Example: Initialize the ArcGIS Online Servers manager >>> from arcgis.gis import GIS >>> gis = GIS(profile="your_online_admin_profile") >>> online_admin = gis.admin >>> online_admin < AGOLAdminManager @ https://example.online.com/sharing/rest/ > >>> online_servers = online_admin.servers >>> online_servers <arcgis.gis.agoserver._admin.AGOLServersManager object at <mem_addr>>
Parameter
Description
gis
Required GIS. The connection to ArcGIS Online.
- property feature_server: List[AGOLServerManager]
Returns a list of
AGOLServerManagerobjects for the hosted feature services in the organization.
- list() List[AGOLServerManager]
Returns a list of all server managers for the organization.
- Returns:
List[
AGOLServerManager]
- property properties: InsensitiveDict
Returns the properties of the hosted tile and feature servers for the organization.
# Usage Example: Online Servers Manager properties >>> from arcgis.gis import GIS >>> gis = GIS(profile="your_online_admin_profile") >>> online_servers_mgr = gis.admin.servers >>> online_servers_mgr.properties {'tile': ['https://tiles.arcgis.com/tiles/<org_id>/arcgis/rest/admin/services'], 'feature': ['https://services7.arcgis.com/<org_id>/ArcGIS/admin/services']}
- Returns:
An dictionary-like object (InsensitiveDict) providing the admin URL endpoints for the online organization’s hosted feature and tile services.
- property tile_server: List[AGOLServerManager]
Returns a list of
AGOLServerManagerobjects for the hosted tile services in the organization.
AGOLServerManager
- class arcgis.gis.agoserver.AGOLServerManager(url: str, gis: GIS)
Bases:
objectRepresents a Single ArcGIS Online server for an organization. This class is not meant to be initialized directly, but instances of this class are returned by these attributes of the
AGOLServersManager:the
list()methodthe
feature_serverpropertythe
tile_serverproperty
Parameter
Description
url
Required String. The url string to the ArcGIS Online Server
gis
Required GIS. The connection to ArcGIS Online.
# Usage Example: Accessing an AGOLServerManager object >>> from arcgis.gis import GIS >>> gis = GIS(profile="your_online_admin_manager") >>> online_servers_mgr = gis.admin.servers >>> hosted_feature_svc_mgr = online_servers_mgr.feature_server[0] >>> hosted_feature_svc_mgr < AGOLServerManager @ https://services7.arcgis.com/<org_id>/ArcGIS/admin/services >
- get(name: str) VectorTileLayerManager | ImageryLayerCacheManager | SceneLayerManager | FeatureLayerCollectionManager | MapImageLayerManager
Returns a single service manager.
Parameter
Description
name
Required String. The name of the service.
- property properties: InsensitiveDict
Returns a dictionary with a servers key that contains information, such as the type, name, and status of the services on the server.
Note
This call is cached for 25 seconds.
# Usage Example: >>> from arcgis.gis import GIS >>> gis = GIS(profile="your_online_admin_profile") >>> online_servers_mgr = gis.admin.servers >>> feature_server_mgr = online_servers_mgr.feature_server[0] >>> service_info = feature_server_mgr.properties["services"][0] >>> service_info { 'adminServiceInfo': { 'name': 'service_name', 'type': 'FeatureServer', 'status': 'Started', 'maxRecordCount': 1000 }, 'serviceDescription': '' }
- Returns:
Dict