HTTP methods for configuring search features

The following table summarizes the HTTP methods supported for use with JSON format and ZIP format.

Format Operation Method Examples
JSON Export GET

GET/gsadmin/v1/cloud/thesaurus.json or

GET /gsadmin/v1/cloud/thesaurus

JSON  Create POST POST/gsadmin/v1/cloud/thesaurus
JSON  Overwrite PUT

PUT/gsadmin/v1/cloud/thesaurus

PUT /gsadmin/v1/cloud/thesaurus/thesaurus-entry-name

The input to the PUT request can include configuration of the child objects (thesaurus-entry) of thesaurus. The imported configuration of the child object replaces its existing configuration.

JSON  Modify PATCH

PATCH /gsadmin/v1/cloud/thesaurus

PATCH modifies an existing object by modifying the values of existing attributes in the object or adding new attributes to the object.

Note: PATCH cannot modify child objects of the object specified in the URL.

For example, to modify a thesaurus-entry object with PATCH, you must specify the URL:

PATCH /gsadmin/v1/cloud/thesaurus/thesaurus-entry-name.

ZIP Export GET GET/gsadmin/v1/cloud/thesaurus.zip
  ZIP Create POST POST/gsadmin/v1/cloud/thesaurus
  ZIP Overwrite POST POST/gsadmin/v1/cloud/thesaurus
n/a Delete DELETE For information, see Delete resources.

Note the following differences between the HTTP methods that are supported for ZIP format and for JSON format:

  • JSON format supports two methods that are not supported for ZIP format: PUT and PATCH. These methods cannot be used with ZIP format.
  • With ZIP format, the POST method creates configuration, overwriting any existing configuration. With JSON format, POST can create but not overwrite; to overwrite configuration in JSON format, use the PUT method.