Export and import all search configuration

Exporting and importing all search configuration in ZIP format is a convenient technique for performing the following tasks:

You can also use ZIP format to configure individual resources. For information, see Configure individual resources using ZIP format.

For examples of how to specify input and output for endpoints, see Sample Search and Navigation REST API endpoints using cURL.

Export all configuration in ZIP format

Use the following endpoint to export search configuration in ZIP format:

GET /gsadmin/v1/cloud/resourcePath.zip

where:

resourcePath specifies the location of the particular resource to the exported.

.zip indicates that ZIP format is used. The .zip extension is used only with the GET command.

The following are examples of endpoints in ZIP format:

GET /gsadmin/v1/cloud.zip

(Exports the entire search configuration for the cloud application.)

GET /gsadmin/v1/cloud/thesaurus.zip

(Exports the entire thesaurus for the cloud application.)

GET /gsadmin/v1/cloud/searchInterfaces/All.zip

(Exports configuration for the search interface named All.)

When the ZIP file is downloaded through a browser client, it is saved to the default downloads location of the browser, or to a location that you specify. If the ZIP file is downloaded programmatically, your client application must determine how to handle the ZIP file.

Import all configuration in ZIP format

The endpoint to import configuration of a resource using the ZIP format is of the following form:

POST /gsadmin/v1/cloud/resourcePath

For example, the following endpoint imports configuration of the search interface ALL:

POST /gsadmin/v1/cloud/searchInterfaces/All

The ZIP file provided with the POST endpoint is first scanned for viruses and unsupported file types. The JSON content to be imported is then validated for syntactical correctness. If the scanning or validation fails, an error is returned. If the scanning and validation are successful, the current configuration of the resource at resourcePath is fully replaced by configuration in the specified zip file.

Important: The ZIP file content that you import entirely replaces any existing configuration at resourcePath. Thus, if you import only the configuration for a thesaurus into /cloud (rather than into /cloud/thesaurus), all existing search configuration at /cloud will be replaced by the configuration of the thesaurus alone.