JSON format is a convenient technique for retrieving the configuration of individual resources and saving the configuration on the system. The feature is useful for configuring individual resources.

Note: Currently, only the following resources can be retrieved and saved in JSON format:

Retrieve configuration in JSON format

A request to retrieve configuration using the JSON format is of the following form:

GET /gsadmin/v1/cloud/resourcePath.json

where:

Note: The retrieved configuration does not include the configuration of any child-resources of the resource at resourcePath.

For example, the following GET request obtains the configuration of the search interface All:

GET http://host:port/gsadmin/v1/cloud/searchInterfaces/All.json
Import configuration in JSON format

To import configuration in JSON format, you must specify application/JSON in a Content-Type HTTP header, and provide the JSON configuration in the body of the request.

JSON format supports three different methods for importing content:

Note: Oracle recommends that you back up a resource before you overwrite it using POST (ZIP format), PUT, or PATCH.

For example, the following POST request imports configuration for searchIndexConfig, overwriting any existing configuration of that resource:

POST http://host:port/gsadmin/v1/cloud/searchIndexConfig/All
Content-Type: application/json
:content = {
  "ecr:type": "search-index-config",
  "defaultLocale": "en",
  "locales": [
    "en-GB",
    "fr-CA",
    "de",
    "es"
    ]
  }

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