- URL:
- https://<root>/exportSite
- Methods:
POST
- Required Capability:
- Access allowed only with the default administrator role
- Version Introduced:
- 10.4
Description
The export
operation exports the portal site configuration to a specified location. The exported file includes the following information:
- Content directory: The content directory contains the data associated with every item in the portal.
- Portal database: A snapshot of the portal database that stores users, groups, items, and other information about the portal.
File store request parameters
Parameter | Details |
---|---|
| A folder path, accessible to the portal, where the exported site configuration will be written. Example
|
| Introduced at ArcGIS Enterprise 11.1. The This parameter validates the folder path specified in the Values: |
| The response format. The default response format is Values: |
AWS S3 request parameters
Parameter | Details |
---|---|
| A path to the location where the exported site configuration will be created. The backup file written to this location will contain a pointer to the Example
|
| The name of the backup bucket. Example Example
|
| The AWS region the backup bucket is in. Example Example
|
| Introduced at ArcGIS Enterprise 11.1. This parameter validates both the folder path and the backup bucket, ensuring that they are accessible before performing the Values: |
| The response format. The default response format is Values: |
Azure Blob request parameters
Parameter | Details |
---|---|
| A folder path, accessible to the portal, where the exported site configuration will be written. Example
|
| The URL for the backup Azure Blob container, which will have the following format:
Example
|
| A string that stores the connection information for the Azure Blob container. Include the Example
|
| Introduced at ArcGIS Enterprise 11.1. This parameter validates both the folder path and the Azure Blob container, ensuring that they are accessible before performing the Values: |
| The response format. The default response format is Values: |
Example usages
Example one: file store
The following is a sample POST request for the export
operation that demonstrates validating the location for a file store:
POST /webadaptor/portaladmin/exportSite HTTP/1.1
Host: machine.domain.com
Content-Type: application/x-www-form-urlencoded
Content-Length: []
location=\\server\share\backup&validate=true&f=json
Example two: AWS S3
The following is a sample POST request for the export
operation that demonstrates parameter configuration for AWS S3:
POST /webadaptor/portaladmin/exportSite HTTP/1.1
Host: machine.domain.com
Content-Type: application/x-www-form-urlencoded
Content-Length: []
location=\\server\share\backup&backupObjectStore="sampleBucket"&backupObjectStoreRegion="us-east-1"&f=json
Example three: Azure Blob
The following is a sample POST request for the export
operation that demonstrates parameter configuration for Azure Blob:
POST /webadaptor/portaladmin/exportSite HTTP/1.1
Host: machine.domain.com
Content-Type: application/x-www-form-urlencoded
Content-Length: []
location=\\server\share\backup&backupObjectStore=https://sampleserver.blob.core.windows.net/mycontainer&backupObjectStoreConnectionStr={"accountName": "myaccountName","accountKey": "myAccountKey","accountEndpoint": "accountEndpoint"}&f=json
JSON Response examples
Examples without validation
Example one: file store
The following is a sample response returned for file stores:
{
"status": "success",
"location": "\\server\share\backup\Oct-06-2022_10-20-55.portalsite"
}
Example two: AWS S3
The following is a sample response for AWS S3:
{
"status": "success",
"location": "\\server\share\backup\Oct-06-2022_10-20-55.portalsite"
}
Example three: Azure Blob
The following is a sample response for Azure Blob:
{
"status": "success",
"location": "\\server\share\backup\Oct-06-2022_10-20-55.portalsite"
}
Example four: success with warnings
Starting at 10.8, if items are missing from the content directory but exist in the portal's internal database, the request will return a success with warning
response that contains a message that outlines the reason for the warning:
{
"status": "success with warning",
"location": "\\server\share\backup\Aug-06-2022_10-20-55.portalsite",
"messages": ["During the export operation, some items could not be exported because they appear to be missing from the content directory. Check the logs and review the section in the Common Problems and Solutions documentation for more information."]
}
Examples with validation
Example one: success response
The sample response below is for a request that had the validate
parameter set to true
. This example demonstrates a success response, meaning that the path was accessible to Portal for ArcGIS:
{
"status": "success"
}
Example two: failure response
The sample response below is for a request that had the validate
parameter set to true
. This example demonstrates a failure, meaning that the path was not accessible to Portal for ArcGIS:
{
"error": {
"code": 500,
"message": "Unable to write to \\server\share\backup. Verify the location is accessible and the service account running Portal for ArcGIS can write to it.",
"details": null
}
}