Zum Hauptinhalt springen
PATCH
/
cms
/
v3
/
url-redirects
/
{urlRedirectId}
リダイレクトを更新
curl --request PATCH \
  --url https://api.hubapi.com/cms/v3/url-redirects/{urlRedirectId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "isTrailingSlashOptional": true,
  "redirectStyle": 123,
  "isMatchQueryString": true,
  "created": "2023-11-07T05:31:56Z",
  "isMatchFullUrl": true,
  "destination": "<string>",
  "isOnlyAfterNotFound": true,
  "isPattern": true,
  "precedence": 123,
  "routePrefix": "<string>",
  "isProtocolAgnostic": true,
  "id": "<string>",
  "updated": "2023-11-07T05:31:56Z"
}'
{
  "isTrailingSlashOptional": true,
  "redirectStyle": 123,
  "isMatchQueryString": true,
  "created": "2023-11-07T05:31:56Z",
  "isMatchFullUrl": true,
  "destination": "<string>",
  "isOnlyAfterNotFound": true,
  "isPattern": true,
  "precedence": 123,
  "routePrefix": "<string>",
  "isProtocolAgnostic": true,
  "id": "<string>",
  "updated": "2023-11-07T05:31:56Z"
}
次のいずれかの製品またはそれ以上が必要です。
Marketing HubMarketing Hub -Professional
Sales HubSales Hub -無料ツール
Service HubService Hub -無料ツール
Content HubContent Hub -Starter
この API には、次のいずれかのスコープが必要です。
content

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Path Parameters

urlRedirectId
string
required

Body

application/json
isTrailingSlashOptional
boolean
required

トレイリングスラッシュが無視されるかどうか。

redirectStyle
integer
required

作成するリダイレクトのタイプ。オプションには以下が含まれます:301(永久)、302(一時的)、305(プロキシー)。詳細については、[こちら](https://knowledge.hubspot.com/cos-general/how-to-redirect-a-hubspot-page)を参照してください。

isMatchQueryString
boolean
required

「routePrefix」がクエリー文字列を含めてURLパス全体で一致する必要があるかどうか。

isMatchFullUrl
boolean
required

「routePrefix」がドメインを含めてURL全体で一致する必要があるかどうか。

destination
string
required

ターゲットURLが「routePrefix」に一致する場合にリダイレクトされる転送先URL。

isOnlyAfterNotFound
boolean
required

URLの公開中のページが見つからない場合のみURLリダイレクトマッピングを適用する必要があるかどうか。Falseの場合、URLリダイレクトマッピングは既存のどのページよりも優先されます。

isPattern
boolean
required

パターンに基づいて「routePrefix」が一致する必要があるかどうか。

precedence
integer
required

URLリダイレクトに優先順位を付けるために使用されます。特定のURLが複数のリダイレクトに一致する場合、優先順位の「低い」URLが使用されます。

routePrefix
string
required

リダイレクトを行うために照合するターゲット受信URL、パス、またはパターン。

isProtocolAgnostic
boolean
required

「routePrefix」がHTTPプロトコルとHTTPSプロトコルの両方に一致する必要があるかどうか。

id
string
required

このURLリダイレクトの固有ID。

created
string<date-time>
updated
string<date-time>

Response

successful operation

isTrailingSlashOptional
boolean
required

トレイリングスラッシュが無視されるかどうか。

redirectStyle
integer
required

作成するリダイレクトのタイプ。オプションには以下が含まれます:301(永久)、302(一時的)、305(プロキシー)。詳細については、[こちら](https://knowledge.hubspot.com/cos-general/how-to-redirect-a-hubspot-page)を参照してください。

isMatchQueryString
boolean
required

「routePrefix」がクエリー文字列を含めてURLパス全体で一致する必要があるかどうか。

isMatchFullUrl
boolean
required

「routePrefix」がドメインを含めてURL全体で一致する必要があるかどうか。

destination
string
required

ターゲットURLが「routePrefix」に一致する場合にリダイレクトされる転送先URL。

isOnlyAfterNotFound
boolean
required

URLの公開中のページが見つからない場合のみURLリダイレクトマッピングを適用する必要があるかどうか。Falseの場合、URLリダイレクトマッピングは既存のどのページよりも優先されます。

isPattern
boolean
required

パターンに基づいて「routePrefix」が一致する必要があるかどうか。

precedence
integer
required

URLリダイレクトに優先順位を付けるために使用されます。特定のURLが複数のリダイレクトに一致する場合、優先順位の「低い」URLが使用されます。

routePrefix
string
required

リダイレクトを行うために照合するターゲット受信URL、パス、またはパターン。

isProtocolAgnostic
boolean
required

「routePrefix」がHTTPプロトコルとHTTPSプロトコルの両方に一致する必要があるかどうか。

id
string
required

このURLリダイレクトの固有ID。

created
string<date-time>
updated
string<date-time>
I