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 requests using cURL.

Export all configuration in ZIP format

In ZIP format, exported configuration is downloaded in a ZIP file. The ZIP file contains folders and JSON files that correspond to the hierarchy of objects in the requested resource, or a single JSON file if the requested object has no child objects.

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

GET /gsadmin/v1/cloud/resourcePath.zip

where:

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.


Copyright © 1997, 2017 Oracle and/or its affiliates. All rights reserved. Legal Notices