URL:
https://<root>/exportSite
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 generateToken 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.


Learn how to generate a token

Description

The exportSite operation exports the portal site configuration as a .portalsite file 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.

Request parameters

ParameterDetails

location

A folder path, accessible to the portal, where the exported site configuration will be written as a .portalsite file. Starting at ArcGIS Enterprise 12.0, if your deployment is configured to use cloud-based storage, the location parameter can instead be used to define the prefix for where the exported site configuration will be located. If the location parameter is not specified, the server writes the exported site configuration file to a directory owned by the server and returns a virtual path (HTTPS URL) to that directory. The URL returned from that response can be used to download the exported site configuration from the directory.

File pathFile pathCloud-based storage prefix
Use dark colors for code blocksCopy
1
location=//server/share/backup/full/20250517-010949-FULL/server/ssebngeyxa7wpjei/

locationConfig

(Optional)

Introduced at ArcGIS Enterprise 12.0. This parameter defines the location configuration for a file store or cloud-based storage systems. If your deployment 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 your deployment 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
Use dark colors for code blocksCopy
1
locationConfig={"type": "fileStore","provider": "FileSystem"}

backupObjectStore

(Required for deployments with cloud-based storage)

For ArcGIS Enterprise deployments that store their portal content directories in either an Amazon S3 bucket or Azure Blob container. Specifies the name of a backup bucket (AWS) or the URL for the backup container (Azure Blob) for the content directory. These should not be the same bucket or containers that store live portal content.

Access keyAccess keyIAM role
Use dark colors for code blocksCopy
1
backupObjectStore="sampleBucket"

backupObjectStoreRegion

(Required for deployments with cloud-based storage)

Applicable to just AWS S3. This parameter specifies the AWS region the backup bucket is in.

Example

Example
Use dark colors for code blocksCopy
1
backupObjectStoreRegion="us-east-1"

backupObjectStoreConnectionStr

(Required for deployments with cloud-based storage)

Applicable to just Azure Blob. This parameter defines a string that stores the connection information for the backup Azure Blob container. The JSON object must include the accountKey, accountName, and credentialType properties.

Account keyAccount keyService principalManaged identity
Use dark colors for code blocksCopy
1
2
3
4
5
6
backupObjectStoreConnectionStr={
	"accountName": "<accountName>",
	"accountEndpoint": "blob.core.windows.net",
	"accountKey": "<accountKey>",
	"credentialType": "accessKey"
}

validate

(Optional)

Introduced at ArcGIS Enterprise 11.1. The This parameter validates the folder path specified in the location parameter, ensuring that it is accessible before performing the exportSite operation. If set to true, the path will be validated, and the operation will return either a success response or an error message. The default value is false.

Values: true | false

f

(Optional)

The response format. The default response format is html.

Values: json | html | pjson

Example usages

The following are sample POST requests for the exportSite operation, each defining a different storage location for the exported site configuration:

File storeFile storeAWS S3Azure Blob
Use dark colors for code blocksCopy
1
2
3
4
5
6
POST /<context>/portaladmin/exportSite HTTP/1.1
Host: organization.example.com
Content-Type: application/x-www-form-urlencoded
Content-Length: []

location=\\server\share\backup&locationConfig={"type": "fileStore","provider": "FileSystem"}&validate=true&f=json

JSON Response examples

The following demonstrates the differences in success responses that can be returned by this operation.

Folder store success, without validateFolder store success, without validateGeneral success message, with validate
Use dark colors for code blocksCopy
1
2
3
4
{
  "status": "success",
  "location": "\\server\share\backup\Aug-06-2025_10-20-55.portalsite"
}

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