Skip To Content

Create Service utility

The Create Service utility allows you to publish a service from the command line. A service definition file (.sd) is required.

Parameters

ParameterDetails

-u

The name of an ArcGIS Server user who will execute the utility. The user must have the appropriate level of privileges to execute the action. If your site is configured with web-tier authentication, specify a built-in user, such as the primary site administrator account.

-p

The password of the user who is specified with the -u parameter.

-s

The URL of the site, in one of the following formats:

  • https://gisserver.domain.com:6443
  • https://webadaptorhost.domain.com/webadaptorname
If your site is configured with web-tier authentication, you'll need to specify the local URL to your site.

-f

The path to the service definition file.

-F

The GIS server folder in which to deploy the service. This parameter is optional.

-n

The name for the service, if you want to override the name contained in the service definition. This parameter is optional.

-h

Prints help for the utility.

--ignoressl

An optional parameter to disable SSL certification verification.

Examples

The following example creates a service named Yellowstone at the root level of the server using the file Yellowstone.sd:

<Python installation location>\python.exe "C:\Program Files\ArcGIS\Server\tools\admin\createservice.py" -u admin -p admin -s https://gisserver.domain.com:6080 -f "c:\data\Yellowstone\Yellowstone.sd" -n Yellowstone

The following example creates a service named San Diego in the folder RegionalPlanning:

<Python installation location>\python.exe "C:\Program Files\ArcGIS\Server\tools\admin\createservice.py" -u admin -p admin -s https://gisserver.domain.com:6080 -f "c:\data\SanDiego\SanDiego.sd" -F RegionalPlanning -n SanDiego

In this topic
  1. Parameters
  2. Examples