- URL:
- https://<root>/importSite
- Methods:
POST- Version Introduced:
- 10.4
Access requirements
Required privileges
The Portal 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.
Tokens
This API requires token-based authentication. A token is automatically generated for administrators who sign in to the Portal 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 Portal Administrator API must include a token in the request body.
Description
The import operation restores a site from a backup site configuration file that was created using the export operation. When importing the site configuration file into the currently running portal site, all site configurations are replaced with information included in the backup file and the portal content index is updated. For more information about what is included in the backup file, see the Export Site documentation.
This operation is computationally intensive and may run for a long time. Since this operation changes the portal site configuration completely, it is recommended that no portal items are accessed and that no administrative operations or functions are performed on the site while the operation is running.
Request parameters
| Parameter | Details |
|---|---|
| The folder path to an exported configuration. Starting at ArcGIS Enterprise 12.0, if the exported configuration was sent to a cloud-based storage location, the |
(Optional) | Introduced at ArcGIS Enterprise 12.0. This parameter defines the location configuration for a file store or cloud-based storage systems. If ArcGIS Server is configured to use cloud-based storage, the JSON object must contain connection information, such as bucket, container, credential, and cloud region information. If this parameter is not defined, or if ArcGIS Server is not configured with cloud-based storage, the parameter will use the file store configuration. The following is sample input for file store configurations. Example |
| Introduced at ArcGIS Enterprise 11.1. This parameter validates the file path specified in the Values: |
| The response format. The default response format is Values: |
Example usage
The following is a sample POST request for the import operation:
POST /<context>/portaladmin/importSite HTTP/1.1
Host: organization.example.com
Content-Type: application/x-www-form-urlencoded
Content-Length: []
location=\\server\share\backup\Oct-06-2024_10-20-55.portalsite&locationConfig={"type": "fileStore","provider": "FileSystem"}&validate&f=pjsonJSON Response examples
The following demonstrates a success response. For requests that do not validate the file location, a success response is returned when the request is performed successfully. For requests that validate the file location, a success response is returned when the file path specified with the location parameter is accessible to the portal:
{
"status": "success"
}