PUT api/Zone/{zone_handle}/Redirection/{handle}?user={user}

Update a redirection on a zone

Request Information

URI Parameters

NameDescriptionTypeAdditional information
zone_handle

Handle of zone

string

Required

handle

Handle of the redirection

string

Required

user

Optional user handle - if empty logged in user will be used

string

None.

Body Parameters

New redirection details

RedirectionBase
NameDescriptionTypeAdditional information
UrlOrigin

Url origin

string

None.

UrlDestination

Url destination

string

None.

Type

Redirection type:
0 - Redirection Meta
1 - Redirection Transparente (IFrame)
2 - Redirection Temporaire (302)
3 - Redirection Permanente (301)
4 - Redirection 302 evolue (307)
5 - Redirection 301 evolue (308)
6 - Redirection 303

integer

Matching regular expression pattern: 0|1|2|3|4|5|6

Active

boolean

None.

Title

string

None.

MetaKeyword

Comma seperated list of meta key words

string

None.

MetaDescription

Meta description

string

None.

Relative

Is relative

boolean

None.

Request Formats

application/json, text/json

Sample:
{
  "UrlOrigin": "sample string 1",
  "UrlDestination": "sample string 2",
  "Type": 3,
  "Active": true,
  "Title": "sample string 5",
  "MetaKeyword": "sample string 6",
  "MetaDescription": "sample string 7",
  "Relative": true
}

application/xml, text/xml

Sample:
<RedirectionBase xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Namebay.Rest.Api.Models.Zone">
  <Active>true</Active>
  <MetaDescription>sample string 7</MetaDescription>
  <MetaKeyword>sample string 6</MetaKeyword>
  <Relative>true</Relative>
  <Title>sample string 5</Title>
  <Type>3</Type>
  <UrlDestination>sample string 2</UrlDestination>
  <UrlOrigin>sample string 1</UrlOrigin>
</RedirectionBase>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

New redirection on success
Collection of errors on failure
Return codes
200 - ok
400 - bad request
401 - unauthorized
404 - not found
500 - internal server error
511 - object has expired
513 - quota exceeded
525 - object already exists
530 - invalid attribute value
712 - permission denied on domain
714 - The primary NS is not Namebay's
735 - must be a sub-domain

Redirection
NameDescriptionTypeAdditional information
Handle

Redirection handle

string

None.

CreatedOn

Created on

date

None.

HitsYesterday

Number of hits yesterday

integer

None.

UrlOrigin

Url origin

string

None.

UrlDestination

Url destination

string

None.

Type

Redirection type:
0 - Redirection Meta
1 - Redirection Transparente (IFrame)
2 - Redirection Temporaire (302)
3 - Redirection Permanente (301)
4 - Redirection 302 evolue (307)
5 - Redirection 301 evolue (308)
6 - Redirection 303

integer

Matching regular expression pattern: 0|1|2|3|4|5|6

Active

boolean

None.

Title

string

None.

MetaKeyword

Comma seperated list of meta key words

string

None.

MetaDescription

Meta description

string

None.

Relative

Is relative

boolean

None.

Response Formats

application/json, text/json

Sample:
{
  "Handle": "sample string 1",
  "CreatedOn": "2025-04-04T00:30:42.9629772+02:00",
  "HitsYesterday": 3,
  "UrlOrigin": "sample string 4",
  "UrlDestination": "sample string 5",
  "Type": 6,
  "Active": true,
  "Title": "sample string 8",
  "MetaKeyword": "sample string 9",
  "MetaDescription": "sample string 10",
  "Relative": true
}

application/xml, text/xml

Sample:
<Redirection xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Namebay.Rest.Api.Models.Zone">
  <Active>true</Active>
  <MetaDescription>sample string 10</MetaDescription>
  <MetaKeyword>sample string 9</MetaKeyword>
  <Relative>true</Relative>
  <Title>sample string 8</Title>
  <Type>6</Type>
  <UrlDestination>sample string 5</UrlDestination>
  <UrlOrigin>sample string 4</UrlOrigin>
  <CreatedOn>2025-04-04T00:30:42.9629772+02:00</CreatedOn>
  <Handle>sample string 1</Handle>
  <HitsYesterday>3</HitsYesterday>
</Redirection>