- URL:
- https://<root>/services/<serviceName>.<serviceType>/changeProvider
- Methods:
POST- Version Introduced:
- 10.7
Access requirements
Required privileges
The Sever Administrator API requires privilege-based access. An administrator must be assigned a specific user privilege, or role, to access any given endpoint. Listed below are the user privileges or roles an administrator can be assigned that provides access to this endpoint. If multiple privileges are listed, only one needs to be assigned to gain access.
Note that administrators assigned a custom role must also have the administrative View all content privilege assigned to them to access the API directory as an administrator. Additonally, any custom roles that include a webhook-related privilege must also include the general Publish server-based layers content privilege.
Tokens
This API requires token-based authentication. A token is automatically generated for administrators who sign in to the Server Administrator API directory's HTML interface. Tokens generated in this way are stored for the entirety of the session.
Those accessing the API directory outside of the HTML interface will need to acquire a session token from the generate operation in the Portal Directory API. For security reasons, all POST requests made to the Server Administrator API must include a token in the request body.
Description
The change operation updates an individual service to use either a dedicated or shared instance type.
You can use either shared or dedicated instances for compatible services published to an ArcGIS Server site from ArcGIS Pro. At 10.8, qualifying services published to a newly created site will be automatically set to use shared instances, or the shared instance pool, by default.
When using this operation, services may populate other provider types as values for the provider parameter, such as ArcObjects and SDS. For SDS provider types, this operation does not support changing the provider of these services to either ArcObjects11 or DMaps. Services with SDS as their provider cannot change their instance type. For more information about shared instances and which services qualify to be set as a shared instance, see Configure service instance settings.
At 10.9, the change operation supports the migration of map, image, and geodata services from using the ArcMap service runtime to the newer ArcGIS Pro service runtime by changing the provider parameter from Arc to Arc.
Starting at ArcGIS Enterprise 11.0, the ArcMap service runtime has been removed and only ArcGIS Pro-based services are supported. When upgrading to 11.x, all map, image, and geodata services will migrate to using the ArcGIS Pro service runtime and the Arc provider. After upgrading to 11.x, any remaining geocode or geoprocessing services that were originally published from ArcMap cannot be started and must be republished from ArcGIS Pro. Using change to edit geocode and geoprocessing services is not supported. For more information, see Migrating services to the ArcGIS Pro service runtime.
Request parameters
| Parameter | Details |
|---|---|
| Specifies the service instance as either a shared ( Values: |
| The response format. The default response format is Values: |
Example usage
The following is a sample POST request for the change operation, demonstrating changing a service from Arc (dedicated instance) to D (shared instance):
POST /<context>/admin/services/Maps/TestMap.MapServer/changeProvider HTTP/1.1
Host: organization.example.com
Content-Type: application/x-www-form-urlencoded
Content-Length: []
provider=DMaps&f=jsonJSON Response examples
Success response example
The following response indicates that the change operation was executed successfully:
{"status": "success"}Error response example
The following error response occurs when setting a provider value that is incompatible with the service. For example, if the original provider for TestMap.MapServer was Arc, indicating that the service was published from ArcMap, an attempt to change the provider to D will result in an error. Services published from ArcMap are not compatible with the D provider.
{
"status": "error",
"messages": ["Changing the provider of the service 'TestMap.MapServer' to 'DMaps' is not permitted. "],
"code": 500
}