API

DomainWebredir

A domain's web redirections, by host: list, create, get, update or delete one.

Operations

Every route this entity exposes. Each route links to its own reference on this page.

Method Route SDK operation Returns
POST /domain/domains/{domain}/webredirs create OK
GET /domain/domains/{domain}/webredirs list OK
GET /domain/domains/{domain}/webredirs/{host} load OK
DELETE /domain/domains/{domain}/webredirs/{host} remove OK
PATCH /domain/domains/{domain}/webredirs/{host} update OK

Examples

One example per SDK, generated from the API model. The argument names are the parameters and fields of this entity, and the values are placeholders. The examples are not compiled or executed.

Golang

Construct client as shown in the Golang setup, then call the operations:

domain_webredirs, err := client.DomainWebredir(nil).List(map[string]any{"domain": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(domain_webredirs)
domain_webredir, err := client.DomainWebredir(nil).Load(map[string]any{"domain": "example", "host": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(domain_webredir)
created, err := client.DomainWebredir(nil).Create(map[string]any{"domain": "example", "host": "example", "override": true, "protocol": "example", "type": "example", "url": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(created)
updated, err := client.DomainWebredir(nil).Update(map[string]any{"domain": "example", "host": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(updated)
removed, err := client.DomainWebredir(nil).Remove(map[string]any{"domain": "example", "host": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(removed)

Lua

Construct client as shown in the Lua setup, then call the operations:

local domain_webredirs, err = client:DomainWebredir():list({ domain = "example" })
local domain_webredir, err = client:DomainWebredir():load({ domain = "example", host = "example" })
local created, err = client:DomainWebredir():create({ domain = "example", host = "example", override = true, protocol = "example", type = "example", url = "example" })
local updated, err = client:DomainWebredir():update({ domain = "example", host = "example" })
local removed, err = client:DomainWebredir():remove({ domain = "example", host = "example" })

PHP

Construct client as shown in the PHP setup, then call the operations:

$domain_webredirs = $client->DomainWebredir()->list(["domain" => "example"]);
$domain_webredir = $client->DomainWebredir()->load(["domain" => "example", "host" => "example"]);
$created = $client->DomainWebredir()->create(["domain" => "example", "host" => "example", "override" => true, "protocol" => "example", "type" => "example", "url" => "example"]);
$updated = $client->DomainWebredir()->update(["domain" => "example", "host" => "example"]);
$client->DomainWebredir()->remove(["domain" => "example", "host" => "example"]);

Python

Construct client as shown in the Python setup, then call the operations:

domain_webredirs = client.DomainWebredir().list({"domain": "example"})
domain_webredir = client.DomainWebredir().load({"domain": "example", "host": "example"})
created = client.DomainWebredir().create({ "domain": "example", "host": "example", "override": True, "protocol": "example", "type": "example", "url": "example" })
updated = client.DomainWebredir().update({"domain": "example", "host": "example"})
client.DomainWebredir().remove({"domain": "example", "host": "example"})

Ruby

Construct client as shown in the Ruby setup, then call the operations:

domain_webredirs = client.DomainWebredir.list({ "domain" => "example" })
domain_webredir = client.DomainWebredir.load({ "domain" => "example", "host" => "example" })
created = client.DomainWebredir.create({ "domain" => "example", "host" => "example", "override" => true, "protocol" => "example", "type" => "example", "url" => "example" })
updated = client.DomainWebredir.update({ "domain" => "example", "host" => "example" })
client.DomainWebredir.remove({ "domain" => "example", "host" => "example" })

TypeScript

Construct client as shown in the TypeScript setup, then call the operations:

const domain_webredirs = await client.DomainWebredir().list({ domain: "example" })
const domain_webredir = await client.DomainWebredir().load({ domain: "example", host: "example" })
const created = await client.DomainWebredir().create({ domain: "example", host: "example", override: true, protocol: "example", type: "example", url: "example" })
const updated = await client.DomainWebredir().update({ domain: "example", host: "example" })
await client.DomainWebredir().remove({ domain: "example", host: "example" })

Fields

Field Type Required Description
cert_status string No Cert Status
cert_uuid string No Cert Uuid
created_at string No Created At
host string Yes Host
message string Yes Message
override boolean Yes Override
protocol string No Protocol
type string Yes Type
updated_at string No Updated At
url string Yes Url

create

POST /domain/domains/{domain}/webredirs

Operation ID: postDomainDomainsDomainWebredirs.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
domain path string Yes
page query integer No
per_page query integer No

Request body

application/json

Property Type Required Description
host string Yes
override boolean Yes
protocol enum: http, https, httpsonly Yes
type enum: cloak, http301, http302 Yes
url string Yes

Responses

200: OK
201: Created

application/json

Property Type Required Description
message string Yes
401: Unauthorized

application/json

Property Type Required Description
cause string Yes
code integer Yes
message string Yes
object string Yes
403: Forbidden

application/json

Property Type Required Description
cause string Yes
code integer Yes
message string Yes
object string Yes

list

GET /domain/domains/{domain}/webredirs

Operation ID: getDomainDomainsDomainWebredirs.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
domain path string Yes
page query integer No
per_page query integer No

Responses

200: OK

application/json

Property Type Required Description
[].cert_status string No
[].cert_uuid string No
[].created_at string No
[].host string Yes
[].protocol enum: http, https, httpsonly No
[].type enum: cloak, http301, http302 Yes
[].updated_at string No
[].url string Yes
401: Unauthorized

application/json

Property Type Required Description
cause string Yes
code integer Yes
message string Yes
object string Yes
403: Forbidden

application/json

Property Type Required Description
cause string Yes
code integer Yes
message string Yes
object string Yes

load

GET /domain/domains/{domain}/webredirs/{host}

Operation ID: getDomainDomainsDomainWebredirsHost.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
domain path string Yes
host path string Yes

Responses

200: OK

application/json

Property Type Required Description
cert_status string No
cert_uuid string No
created_at string No
host string Yes
protocol enum: http, https, httpsonly No
type enum: cloak, http301, http302 Yes
updated_at string No
url string Yes
401: Unauthorized

application/json

Property Type Required Description
cause string Yes
code integer Yes
message string Yes
object string Yes
403: Forbidden

application/json

Property Type Required Description
cause string Yes
code integer Yes
message string Yes
object string Yes

remove

DELETE /domain/domains/{domain}/webredirs/{host}

Operation ID: deleteDomainDomainsDomainWebredirsHost.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
domain path string Yes
host path string Yes

Responses

200: OK

application/json

Property Type Required Description
message string Yes
401: Unauthorized

application/json

Property Type Required Description
cause string Yes
code integer Yes
message string Yes
object string Yes
403: Forbidden

application/json

Property Type Required Description
cause string Yes
code integer Yes
message string Yes
object string Yes

update

PATCH /domain/domains/{domain}/webredirs/{host}

Operation ID: patchDomainDomainsDomainWebredirsHost.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
domain path string Yes
host path string Yes

Request body

application/json

Property Type Required Description
override boolean No
protocol enum: http, https, httpsonly No
type enum: cloak, http301, http302 No
url string No

Responses

200: OK

application/json

Property Type Required Description
message string Yes
401: Unauthorized

application/json

Property Type Required Description
cause string Yes
code integer Yes
message string Yes
object string Yes
403: Forbidden

application/json

Property Type Required Description
cause string Yes
code integer Yes
message string Yes
object string Yes