updateRedirect
put
/ccadmin/v1/redirects/{id}
Updates the redirection rule.
Request
Supported Media Types
- application/json
Path Parameters
-
id: string
The redirection rule id.
Root Schema : createRedirect_request
Type:
Show Source
object
-
originUrl:
string
Origin URL of the redirect.
-
siteId(optional):
string
ID of the site the redirect belongs to.
-
targetUrl:
string
Destination URL of the redirect.
-
type:
integer
Redirect type
Example:
{
"originUrl":"/origin_url_4",
"siteId":"siteUS",
"type":301,
"targetUrl":"/target_url_4"
}
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Root Schema : createRedirect_response
Type:
Show Source
object
-
id(optional):
string
ID.
-
originUrl(optional):
string
Origin URL of the redirect.
-
siteId(optional):
string
ID of the site the redirect belongs to.
-
targetUrl(optional):
string
Destination URL of the redirect.
-
type(optional):
integer
Redirect type
Example Response (application/json)
{
"originUrl":"/origin_url_1",
"siteId":null,
"id":"300001",
"type":301,
"targetUrl":"/target_url_1"
}
Default Response
The error response.
The following are the internal error codes thrown by this API when the request processing fails in Oracle Commerce Cloud:
|Error Code|Description|
|------------------|------------------|
|183000|Unexpected error returned processing redirection rules.|
|183001|Unsupported redirect type.|
|183002|Incorrect origin URL.|
|183003|Incorrect target URL.|
|183004|Site {0} does not exist.|
|183005|Redirect loop detected.|
|183006|Number of redirect jumps exceeded.|
|183009|Error parsing input request.|
|183014|Rule with id {0} does not exist.|
|183011|Origin and target URLs are the same.|
|183013|Maximum number of redirection rules exceeded.|
|
Root Schema : errorModel
Type:
Show Source
object
-
devMessage(optional):
string
An optional non-localized message containing technical information for developers
-
errorCode(optional):
string
The numerical code identifying the error
-
errors(optional):
array errors
An optional list of errors if multiple errors were encountered
-
message(optional):
string
The localized message describing the error
-
moreInfo(optional):
string
An optional non-localized message with more information
-
o:errorPath(optional):
string
An optional machine readable description of where the error occurred
-
status(optional):
string
The HTTP status code
-
type(optional):
string
The URI to the HTTP state code definition
Nested Schema : errors
Type:
array
An optional list of errors if multiple errors were encountered
Show Source
Nested Schema : items
Type:
Show Source
object
-
devMessage(optional):
string
An optional non-localized message containing technical information for developers
-
errorCode(optional):
string
The numerical code identifying the error
-
message(optional):
string
The localized message describing the error
-
moreInfo(optional):
string
An optional non-localized message with more information
-
o:errorPath(optional):
string
An optional machine readable description of where the error occurred
-
status(optional):
string
The HTTP status code