URL Redirection

Get

Retrieve URL Redirection Settings.

GET/api/URLRedirectionSettings
Query parameters
Response

Success

Body
siteIdinteger (int32)

The site ID to which the URL redirection settings refer to.

defaultActionRedirectActionType (enum)

Redirect action type options

0 = DoNotRedirect,1 = Redirect
replicateboolean

Whether the 'Replicate Settings' option is enabled or not.

urLsnullable array of URLRedirectEntry (object)

The URL redirect list.

Request
const response = await fetch('/api/URLRedirectionSettings', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "siteId": 0,
  "defaultAction": [
    "0 = DoNotRedirect",
    "1 = Redirect"
  ],
  "replicate": false,
  "urLs": [
    {
      "id": 0,
      "priority": 0,
      "enabled": false,
      "url": "text",
      "action": [
        "0 = DoNotRedirect",
        "1 = Redirect"
      ]
    }
  ]
}

Update

Modify URL Redirection Settings.

PUT/api/URLRedirectionSettings
Query parameters
Body

URL Redirection Settings.

defaultActionRedirectActionType (enum)

Redirect action type options

0 = DoNotRedirect,1 = Redirect
replicatenullable boolean

Whether the 'Replicate Settings' option is enabled or not.

Response

No Content

Request
const response = await fetch('/api/URLRedirectionSettings', {
    method: 'PUT',
    headers: {
      "Content-Type": "application/json; api-version=1.0"
    },
    body: JSON.stringify({}),
});
const data = await response.json();
Response
{
  "type": "text",
  "title": "text",
  "status": 0,
  "detail": "text",
  "instance": "text"
}

© 2024 Parallels International GmbH. All rights reserved.