/replaceService: Replace Service

URL:
https://[root]/content/users/[userName]/replaceService
Methods:
POST
Version Introduced:
ArcGIS Enterprise 10.6

Example Usage

The following is a sample ArcGIS Online POST request for the replaceService operation:

Use dark colors for code blocksCopy
1
2
3
4
5
6
POST /sharing/rest/content/users/jsmith/replaceService HTTP/1.1
Host: org.arcgis.com
Content-Type: application/x-www-form-urlencoded
Content-Length: []

toReplaceItemId=345313e619df46f387f9ededbe15ac56&replacementItemId=49bf5db6340e4bccaceca5af3b2bec4b&replacedServiceName=&replaceMetadata=false&createNewItem=false&f=pjson

The following is a sample ArcGIS Enterprise POST request for the replaceService operation:

Use dark colors for code blocksCopy
1
2
3
4
5
6
POST /<context>/sharing/rest/content/users/jsmith/replaceService HTTP/1.1
Host: organization.example.com
Content-Type: application/x-www-form-urlencoded
Content-Length: []

toReplaceItemId=345313e619df46f387f9ededbe15ac56&replacementItemId=49bf5db6340e4bccaceca5af3b2bec4b&replacedServiceName=&replaceMetadata=false&createNewItem=false&f=pjson

Description

The replaceService operation replaces vector tile layers, allowing item owners to perform quality control on a staging tile layer. Once quality control has been formed, the production tile layer can be replaced with minimal downtime. This operation has the option to keep a backup of the production tile layer.

Workflow for replaceService:

  1. The staging service is published to the same system as the production service. Both services are active at the same time. The staging service is shared with a smaller set of users. Staging service is QA'd and made ready for production.
  2. The item properties (ex: thumbnail, iteminfo, metadata) of the production item will not be replaced or updated. Please use the portal to update item properties.
  3. When the replaceService operation is used, the service running on the hosting server will be replaced (for example, its cache).
  4. It is the responsibility of the user to ensure that the replacement layer uses similar content and cartography to the replaced layer. This will ensure that dependent layers with modified styles continue to work.
  5. If you want to retain the replaced production service, for example, to keep an archive of the evolution of the service you can do so by omitting a value for "Replaced Service Name". If replaced service name is not provided, the production service being replaced will be archived with a time stamp when replace service was executed on it. You can provide any name for the replaced service as long as it is not pre-existing on your portal content.

Request Parameters

ParameterDetails

toReplaceItemId

The item ID of the service to be replaced.

replacementItemId

The item ID of the replacement service.

replacedServiceName

The name of the replacement service.

replaceMetadata

When set to true, the item info {"thumbnail", "tag", "description", "summary"} of the current service is updated to that of the replacement service. The Credits, Terms of use, and Created from details will not be replaced. This option is set to false by default.

f

The response format. The default format is html.

Values: html | json | pjson

JSON Response Syntax

Use dark colors for code blocksCopy
1
2
3
{
  "success": <true | false>
}

JSON Response Example

Use dark colors for code blocksCopy
1
2
3
{
  "success": true
}

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.