arcrest.manageags package¶
Submodules¶
arcrest.manageags.administration module¶
Administration.py allows users to control ArcGIS Server 10.1+ through the Administration REST API
-
class
arcrest.manageags.administration.
AGSAdministration
(url, securityHandler, proxy_url=None, proxy_port=None, initialize=False)[source]¶ Bases:
arcrest._abstract.abstract.BaseAGSServer
Wrapper for the ArcGIS Server REST API
- Inputs:
url - Administration REST URL securityHandler - security handler object for ArcGIS Server proxy_url - optional URL of a proxy proxy_port - optional port of a proxy initialize - default is false. False means the object does not make
any REST calls until the object is actually needed, whereas True means the object’s properties are initialized at creation.
-
acceptLanguage
¶ returns the accepted lanaguage
-
clusters
¶ returns the clusters functions if supported in resources
-
createSite
(username, password, configStoreConnection, directories, cluster=None, logsSettings=None, runAsync=False)[source]¶ This is the first operation that you must invoke when you install ArcGIS Server for the first time. Creating a new site involves:
-Allocating a store to save the site configuration -Configuring the server machine and registering it with the site -Creating a new cluster configuration that includes the server
machine-Configuring server directories -Deploying the services that are marked to auto-deploy
Because of the sheer number of tasks, it usually takes a little while for this operation to complete. Once a site has been created, you can publish GIS services and deploy them to your server machines.
- Inputs:
- username - The name of the administrative account to be used by
- the site. This can be changed at a later stage.
password - The credentials of the administrative account. configStoreConnection - A JSON object representing the
connection to the configuration store. By default, the configuration store will be maintained in the ArcGIS Server installation directory.- directories - A JSON object representing a collection of server
- directories to create. By default, the server directories will be created locally.
- cluster - An optional cluster configuration. By default, the
- site will create a cluster called ‘default’ with the first available port numbers starting from 4004.
logsSettings - Optional log settings. runAsync - A flag to indicate if the operation needs to be run
asynchronously. Values: true | false
-
currentVersion
¶ returns the current version
-
data
¶ returns the reference to the data functions as a class
-
deleteSite
()[source]¶ Deletes the site configuration and releases all server resources. This is an unrecoverable operation. This operation is well suited for development or test servers that need to be cleaned up regularly. It can also be performed prior to uninstall. Use caution with this option because it deletes all services, settings, and other configurations. This operation performs the following tasks:
- Stops all server machines participating in the site. This in turn stops all GIS services hosted on the server machines.
- All services and cluster configurations are deleted.
- All server machines are unregistered from the site.
- All server machines are unregistered from the site.
- The configuration store is deleted.
-
exportSite
(location=None)[source]¶ Exports the site configuration to a location you specify as input to this operation.
- Inputs:
- location - A path to a folder accessible to the server where the
- exported site configuration will be written. If a location is not specified, the server writes the exported site configuration file to directory owned by the server and returns a virtual path (an HTTP URL) to that location from where it can be downloaded.
-
fullVersion
¶ returns the full version of the arcgis server software
-
importSite
(location)[source]¶ This operation imports a site configuration into the currently running site. Importing a site means replacing all site configurations (including GIS services, security configurations, and so on) of the currently running site with those contained in the site configuration file you supply as input. The input site configuration file can be obtained through the exportSite operation. This operation will restore all information included in the backup, as noted in exportSite. When it is complete, this operation returns a report as the response. You should review this report and fix any problems it lists to ensure your site is fully functioning again. The importSite operation lets you restore your site from a backup that you created using the exportSite operation.
- Input:
- location - A file path to an exported configuration or an ID
- referencing the stored configuration on the server.
-
info
¶ A read-only resource that returns meta information about the server
-
joinSite
(adminURL, username, password)[source]¶ The Join Site operation is used to connect a server machine to an existing site. This is considered a ‘push’ mechanism, in which a server machine pushes its configuration to the site. For the operation to be successful, you need to provide an account with administrative privileges to the site. When an attempt is made to join a site, the site validates the administrative credentials, then returns connection information about its configuration store back to the server machine. The server machine then uses the connection information to work with the configuration store. If this is the first server machine in your site, use the Create Site operation instead.
- Inputs:
- adminURL - The site URL of the currently live site. This is
- typically the Administrator Directory URL of one of the server machines of a site.
username - The name of an administrative account for the site. password - The password of the administrative account.
-
kml
¶ returns the kml functions for server
-
logs
¶ returns an object to work with the site logs
-
machines
¶ gets a reference to the machines object
-
mode
¶ returns an object to work with the site mode
-
publicKey
¶ gets the public key
-
resources
¶ returns the resources on the server
-
security
¶ returns an object to work with the site security
-
services
¶ Gets the services object which will provide the ArcGIS Server’s admin information about services and folders.
-
system
¶ returns an object to work with the site system
-
uploads
¶ returns an object to work with the site uploads
-
usagereports
¶ Gets the services object which will provide the ArcGIS Server’s admin information about the usagereports.
arcrest.manageags.parameters module¶
-
class
arcrest.manageags.parameters.
ClusterProtocol
(tcpClusterPort)[source]¶ Bases:
object
The clustering protocol defines a channel which is used by server machines within a cluster to communicate with each other. A server machine will communicate with its peers information about the status of objects running within it for load balancing and fault tolerance. ArcGIS Server supports the TCP clustering protocols where server machines communicate with each other over a TCP channel (port).
- Inputs:
- tcpClusterPort - The port to use when configuring a TCP based protocol. By default, the server will pick up the next value in the assigned ports on all machines.
-
tcpClusterPort
¶ The port to use when configuring a TCP based protocol. By default, the server will pick up the next value in the assigned ports on all machines.
-
value
¶ returns the tcpClusterPort as a dictionary
-
class
arcrest.manageags.parameters.
Extension
(typeName, capabilities, enabled, maxUploadFileSize, allowedUploadFileType, properties)[source]¶ Bases:
object
represents a service extension
-
allowedUploadFileTypes
¶ gets/sets the allowedUploadFileTypes
-
capabilities
¶ gets/sets the capabilities
-
enabled
¶ gets/sets the extension is enabled
-
maxUploadFileSize
¶ sets/gets the maxUploadFileSize
-
properties
¶ gets/sets the extension properties
-
typeName
¶ gets the extension type
-
value
¶ returns the object as a dictionary
-