PUT redirect
API情報
| HTTPメソッド | API名 | 目的 |
|---|---|---|
| PUT | redirect_setting | HTTPリダイレクト設定情報変更 |
- HTTPリダイレクト機能の設定情報を変更します。
個別パラメータ
URL
- なし
HTTPリクエストボディ
| フィールド | タイプ | 意味 |
|---|---|---|
| Redirect | String | 設定: 有効又は無効 省略した場合はonになります offに設定する場合、他の項目を省略可能です 値: on, off |
| RedirectMode | String | リダイレクト先の指定方法 (default: パスはそのままでhttpsにリダイレクト、url: 指定したURLにリダイレクト) 値: default, url |
| RedirectUrl | String | リダイレクト先となるURL RedirectModeがurlの場合のみ設定できます 最大256 文字 |
| RedirectStatus | String | リダイレクト時のステータスコード 省略した場合は301になります 値: 301, 302 |
レスポンス
| フィールド | タイプ | 意味 |
|---|---|---|
| Result.Redirect | String | 設定: 有効又は無効 値: on, off |
| Result.RedirectMode | String | リダイレクト先の指定方法 (default: パスはそのままでhttpsにリダイレクト、url: 指定したURLにリダイレクト) 値: default, url |
| Result.RedirectUrl | String | リダイレクト先となるURL Result.RedirectModeがurlの場合のみ設定されています |
| Result.RedirectStatus | String | リダイレクト時のステータスコード 値: 301, 302 |
エラーコード
- なし
制限
- HTTPS配信機能を利用している場合のみ設定できます
サンプル
リクエスト
PUT /r/(APIVersion)/(ServiceCode)/http/redirect_setting.json HTTP1.1
Host: cac.api.iij.jp
Content-Type:application/json
Date: Thu, 03 Feb 2021 12:34:56 GMT
x-iijapi-Expire: (Expire)
x-iijapi-SignatureMethod: (SignatureMethod)
x-iijapi-SignatureVersion: (SignatureVersion)
Authorization: IIJAPI (AccessKeyId):(Signature)
{
"Redirect": "on",
"RedirectMode": "default"
}
レスポンスボディ
{ |
"Result": { |
"RequestId": "xxxxxxxx-xxxxxxxx-xxxxxxxx-xxxxxxxx-xxxxxxxx", |
"ServiceCode": "cac########", |
"Redirect": "on", |
"RedirectMode": "default", |
"RedirectStatus": "301", |
"RedirectUrl": "" |
} |
} |