版本:202201
更新 URL 重定向
PUT/openapi/2022-01/redirects/:id
通过 URL 重定向规则 ID 更新指定 URL 重定向规则的详情。
请求
Path参数
id string必填
URL 重定向规则 ID。
- application/json
- 请求体
- 示例
请求体
from_urlstring必填
Original URL, for example: /collections/hot-selling
redirect_urlstring必填
Redirected URL, for example: /collections/test1567
statusstring必填
The status of the redirect:
- open: available
- close: unavailable
{
"from_url": "string",
"redirect_url": "string",
"status": "string"
}
响应
- 200
- 404
- 422
200
- application/json
无 Schema
404
- application/json
- 数据结构
- 示例
- Result
数据结构
errorsstring[]
{
"errors": [
"Data not found"
]
}
{
"errors": [
"Data not found"
]
}
422
- application/json
- 数据结构
- 示例
- Result
数据结构
errorsstring[]
{
"errors": [
"Target is invalid"
]
}
{
"errors": [
"Target is invalid"
]
}