Is it possible to create a new service definition file from an existing ArcGIS servic

1994
1
Jump to solution
01-20-2014 08:36 AM
GeorgeHaskett
Occasional Contributor III
Is it possible to create a new service definition file from an existing ArcGIS service?

I have a python script that updates data on a daily basis.  I have figured out how to restart/overwrite my existing service so that it will represent the change in the data.  However doing so uses the default settings for the new service and overwrites the settings I had established.

If possible, I would like to create a new service definition file from an existing service so that I do not have to go back manually and change the following parameters and capabilities:

Max # of Records Returned by Server
Lock Database
Max # of instances per machine

Any advice would be great.  Thanks
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
GeorgeHaskett
Occasional Contributor III
In the end, while I was not able to create a new service definintion (SD) file from a pre-existing service, I was pointed in the correct direction on GIS Stack Exchange.  Here is a link to the question I posted over there and the reply.

I was able to use a combination of the following solutions to resolve my issues using the ArcGIS REST Administrator API and arcpy.

[INDENT]You have several options:

Use Python or any scripting language of your choice to modify properties of an existing service. This is done by using ArcGIS REST Administrator API. Here is the sample for modifying properties of an existing service. I use it almost daily and it is very easy to write a script altering properties as needed. This is much more efficient imo than creating a service again from .sd.

Publish a service with the required properties directly set by using ArcGIS REST Administrator API and ArcPy. In this case, you will be able to specify the advanced settings in advance. Again, refer to the samples from 2. above to get started.[/INDENT]

View solution in original post

0 Kudos
1 Reply
GeorgeHaskett
Occasional Contributor III
In the end, while I was not able to create a new service definintion (SD) file from a pre-existing service, I was pointed in the correct direction on GIS Stack Exchange.  Here is a link to the question I posted over there and the reply.

I was able to use a combination of the following solutions to resolve my issues using the ArcGIS REST Administrator API and arcpy.

[INDENT]You have several options:

Use Python or any scripting language of your choice to modify properties of an existing service. This is done by using ArcGIS REST Administrator API. Here is the sample for modifying properties of an existing service. I use it almost daily and it is very easy to write a script altering properties as needed. This is much more efficient imo than creating a service again from .sd.

Publish a service with the required properties directly set by using ArcGIS REST Administrator API and ArcPy. In this case, you will be able to specify the advanced settings in advance. Again, refer to the samples from 2. above to get started.[/INDENT]
0 Kudos