You can get, create, modify, and replace redirect-entry object configuration using the Search and Navigation REST API. For information about the attributes of the redirect-entry object, see Redirect-entry object attributes.

Export redirect-entry object configuration in ZIP format

Use a GET endpoint of the following form to export configuration of a redirect-entry object in ZIP format:

GET /gsadmin/v1/cloud/redirects/redirect-group-name/redirect-entry-name.ZIP

The ZIP file in which the configuration is downloaded contains a file named _.json that contains the configuration of the redirect-entry object.

Export redirect-entry object configuration in JSON format

Use a GET endpoint of the following form to export configuration of a redirect-entry object in JSON format:

GET /gsadmin/v1/cloud/redirects/redirect-group-name/redirect-entry-name

For example, the following GET endpoint exports the configuration of a redirect-entry object named ID3:

GET /gsadmin/v1/cloud/redirects/Default/ID3

The following JSON content illustrates configuration of a redirect-entry object that can be exported by the endpoint above:

{
  "ecr:type": "redirect-entry",
  "searchTerms": "fujifilm",
  "matchmode": "MATCHEXACT",
  "url": "http://www.acme.com/about-us",
  "searchTermExpansions": {"0": {"fujifilm": ["fujifilm"]}}
}
Create a redirect-entry object

In JSON or ZIP format, use the following POST endpoint to configure a specified redirect-entry object in a specified redirect-group object:

POST /gsadmin/v1/cloud/redirect/redirect-group-name/redirect-entry-name

For example, the following endpoint configures a redirect-entry object named id3 in a redirect-group named Default:

POST /gsadmin/v1/cloud/redirect/Default/id3

The following code illustrates the configuration of a redirect-entry object that can be input to an endpoint in either ZIP or JSON format:

{
  "ecr:type": "redirect-entry",
  "searchTerms": "fujifilm",
  "matchmode": "MATCHEXACT",
  "url": "http://www.acme.com/about-us"
}
Modify a redirect-entry object

In JSON format, you can use the following endpoint to modify the configuration of a specified redirect-entry object in a specified redirect-group object:

PATCH /gsadmin/v1/cloud/redirects/redirect-group-name/redirect-entry-name

Note: The PATCH method cannot be used in ZIP format.

For example, the following endpoint modifies a redirect-entry object named id3 in a redirect-group object named Products:

PATCH /gsadmin/v1/cloud/redirects/Products/id3

The endpoint above can use JSON content such as the following to modify the url attribute of redirect-entry object named id3:

{
  "ecr:type": "redirect-entry",
  "url": "http://www.acme.com/about-us"
}
Redirect-entry object attributes

The following table lists the attributes of redirect-entry objects.

Attribute

Required?

Type

Description

"ecr:type"

yes

String

redirect-entry

Note: One or more redirect-entry objects can be configured as child objects of a single redirect-group object.

See Sample redirects configuration.

searchTerms

yes

String

One or more phrases to be compared with search terms entered by shoppers. When matches occur between a searchTerms value and a search term entered by a shopper, the keyword redirect is triggered.

matchmode

yes

String

The type of match between the specified searchTerms value and the search term that the user enters. Must be one of:

MATCHEXACT – The keyword redirect is triggered only if a shopper’s search terms exactly match the specified searchTerms values, in the same order, with no additional terms.

MATCHPHRASE -- Default. The keyword redirect is triggered if the shopper’s search terms match the specified searchTerms values, in the same order. The shopper’s search terms may include additional words before or after the searchTerms values.

MATCHALL -- The keyword redirect is triggered if a shopper’s search terms exactly match the specified searchTerms values, with no additional terms, but not necessarily in the same order

url

yes

String

The URL to which users are redirected when a search term entered by a shopper matches a searchTerms value.

enableStemming

no

Boolean

Determines whether the system considers the stems of search terms (for example, “box” the stem of “boxes”) when constructing keyword redirects.

searchTermExpansions

no

object

A system-generated attribute. Do not delete or modify.


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