Skip to content

Redirections

All operations require authentication.

5 operationsv1/domain/zone
Agent setup

List redirectionsProduction

GET
/1.0/domain/zone/{zoneName}/redirection

Returns the identifiers of the zone redirections. Can be filtered by subdomain.

Path parameters

zoneName
required
string

Zone name

Query parameters

subDomain
string

Filter the value of subDomain property

Response

200integer[]successful operation

Example uses zoneName = string

$ curl https://api.eu.ovhcloud.com/1.0/domain/zone/{zoneName}/redirection \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
[ 0]

Get a redirectionProduction

GET
/1.0/domain/zone/{zoneName}/redirection/{id}

Returns a redirection: subdomain, target, type and, for an invisible one, title, description and keywords.

Path parameters

id
required
integer

Id

zoneName
required
string

Zone name

Response

200Redirectionsuccessful operation
description
read-only
string

Description for the invisible redirection

id
read-only
integer

Id of the redirection

keywords
read-only
string

Keywords for the invisible redirection

subDomain
read-only
string

Subdomain to redirect

target
read-only
string

Target of the redirection

title
read-only
string

Title for the invisible redirection

type
read-only
RedirectionTypeEnum

Redirection type:

  • visible -> Redirection by http code 302
  • visiblePermanent -> Redirection by http code 301
  • invisible -> Redirection by html frame
ValuesinvisiblevisiblevisiblePermanent
zone
read-only
string

Redirection zone

Example uses id = 0, zoneName = string

$ curl https://api.eu.ovhcloud.com/1.0/domain/zone/{zoneName}/redirection/{id} \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "description": "string", "id": 0, "keywords": "string", "subDomain": "string", "target": "string", "title": "string", "type": "invisible", "zone": "string"}

Create a redirectionProduction

POST
/1.0/domain/zone/{zoneName}/redirection

Creates a redirection of type visible (HTTP 302), visiblePermanent (HTTP 301) or invisible (HTML frame). The change applies after the zone is refreshed.

Path parameters

zoneName
required
string

Zone name

Request body (required)

description
string

Description for the invisible redirection

keywords
string

Keywords for the invisible redirection

subDomain
string

Subdomain to redirect

target
required
string

Target of the redirection

title
string

Title for the invisible redirection

type
required
RedirectionTypeEnum

Redirection type:

  • visible -> Redirection by http code 302
  • visiblePermanent -> Redirection by http code 301
  • invisible -> Redirection by html frame
ValuesinvisiblevisiblevisiblePermanent

Response

200Redirectionsuccessful operation
description
read-only
string

Description for the invisible redirection

id
read-only
integer

Id of the redirection

keywords
read-only
string

Keywords for the invisible redirection

subDomain
read-only
string

Subdomain to redirect

target
read-only
string

Target of the redirection

title
read-only
string

Title for the invisible redirection

type
read-only
RedirectionTypeEnum

Redirection type:

  • visible -> Redirection by http code 302
  • visiblePermanent -> Redirection by http code 301
  • invisible -> Redirection by html frame
ValuesinvisiblevisiblevisiblePermanent
zone
read-only
string

Redirection zone

Example uses zoneName = string

$ curl https://api.eu.ovhcloud.com/1.0/domain/zone/{zoneName}/redirection \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "description": "string", "id": 0, "keywords": "string", "subDomain": "string", "target": "string", "title": "string", "type": "invisible", "zone": "string"}

Update a redirectionProduction

PUT
/1.0/domain/zone/{zoneName}/redirection/{id}

Updates the target, type, title, description and keywords of a redirection.

Path parameters

id
required
integer

Id

zoneName
required
string

Zone name

Request body (required)

description
string

Description for the invisible redirection

keywords
string

Keywords for the invisible redirection

target
string

Target of the redirection

title
string

Title for the invisible redirection

type
RedirectionTypeEnum

Redirection type:

  • visible -> Redirection by http code 302
  • visiblePermanent -> Redirection by http code 301
  • invisible -> Redirection by html frame
ValuesinvisiblevisiblevisiblePermanent

Response

200—successful operation

Example uses id = 0, zoneName = string

$ curl https://api.eu.ovhcloud.com/1.0/domain/zone/{zoneName}/redirection/{id} \
  -H "authorization: Bearer $OVH_TOKEN"

Delete a redirectionProduction

DELETE
/1.0/domain/zone/{zoneName}/redirection/{id}

Deletes a redirection. The change applies after the zone is refreshed.

Path parameters

id
required
integer

Id

zoneName
required
string

Zone name

Response

200—successful operation

Example uses id = 0, zoneName = string

$ curl https://api.eu.ovhcloud.com/1.0/domain/zone/{zoneName}/redirection/{id} \
  -H "authorization: Bearer $OVH_TOKEN"