DomainHost
A domain's glue records, by host name: 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}/hosts |
create |
OK |
GET |
/domain/domains/{domain}/hosts |
list |
OK |
GET |
/domain/domains/{domain}/hosts/{name} |
load |
OK |
DELETE |
/domain/domains/{domain}/hosts/{name} |
remove |
Accepted |
PUT |
/domain/domains/{domain}/hosts/{name} |
update |
Accepted |
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_hosts, err := client.DomainHost(nil).List(map[string]any{"domain": "example"}, nil)
if err != nil {
panic(err)
}
fmt.Println(domain_hosts)
domain_host, err := client.DomainHost(nil).Load(map[string]any{"domain": "example", "name": "example"}, nil)
if err != nil {
panic(err)
}
fmt.Println(domain_host)
created, err := client.DomainHost(nil).Create(map[string]any{"domain": "example", "ips": []any{}, "name": "example"}, nil)
if err != nil {
panic(err)
}
fmt.Println(created)
updated, err := client.DomainHost(nil).Update(map[string]any{"domain": "example", "name": "example"}, nil)
if err != nil {
panic(err)
}
fmt.Println(updated)
removed, err := client.DomainHost(nil).Remove(map[string]any{"domain": "example", "name": "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_hosts, err = client:DomainHost():list({ domain = "example" })
local domain_host, err = client:DomainHost():load({ domain = "example", name = "example" })
local created, err = client:DomainHost():create({ domain = "example", ips = {}, name = "example" })
local updated, err = client:DomainHost():update({ domain = "example", name = "example" })
local removed, err = client:DomainHost():remove({ domain = "example", name = "example" })
PHP
Construct client as shown in the PHP setup, then call the operations:
$domain_hosts = $client->DomainHost()->list(["domain" => "example"]);
$domain_host = $client->DomainHost()->load(["domain" => "example", "name" => "example"]);
$created = $client->DomainHost()->create(["domain" => "example", "ips" => [], "name" => "example"]);
$updated = $client->DomainHost()->update(["domain" => "example", "name" => "example"]);
$client->DomainHost()->remove(["domain" => "example", "name" => "example"]);
Python
Construct client as shown in the Python setup, then call the operations:
domain_hosts = client.DomainHost().list({"domain": "example"})
domain_host = client.DomainHost().load({"domain": "example", "name": "example"})
created = client.DomainHost().create({ "domain": "example", "ips": [], "name": "example" })
updated = client.DomainHost().update({"domain": "example", "name": "example"})
client.DomainHost().remove({"domain": "example", "name": "example"})
Ruby
Construct client as shown in the Ruby setup, then call the operations:
domain_hosts = client.DomainHost.list({ "domain" => "example" })
domain_host = client.DomainHost.load({ "domain" => "example", "name" => "example" })
created = client.DomainHost.create({ "domain" => "example", "ips" => [], "name" => "example" })
updated = client.DomainHost.update({ "domain" => "example", "name" => "example" })
client.DomainHost.remove({ "domain" => "example", "name" => "example" })
TypeScript
Construct client as shown in the TypeScript setup, then call the operations:
const domain_hosts = await client.DomainHost().list({ domain: "example" })
const domain_host = await client.DomainHost().load({ domain: "example", name: "example" })
const created = await client.DomainHost().create({ domain: "example", ips: [], name: "example" })
const updated = await client.DomainHost().update({ domain: "example", name: "example" })
await client.DomainHost().remove({ domain: "example", name: "example" })
Fields
| Field | Type | Required | Description |
|---|---|---|---|
fqdn |
string |
Yes | Fqdn |
fqdn_unicode |
string |
Yes | Fqdn Unicode |
href |
string |
Yes | Href |
ips |
array |
Yes | Ips |
message |
string |
Yes | Message |
name |
string |
Yes | Name |
create
POST /domain/domains/{domain}/hosts
Operation ID: postDomainDomainsDomainHosts.
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 |
|---|---|---|---|
ips |
array of string |
Yes | |
name |
string |
Yes |
Responses
200: OK
202: Accepted
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}/hosts
Operation ID: getDomainDomainsDomainHosts.
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 |
|---|---|---|---|
[].fqdn |
string |
Yes | |
[].fqdn_unicode |
string |
Yes | |
[].href |
string |
Yes | |
[].ips |
array of string |
Yes | |
[].name |
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}/hosts/{name}
Operation ID: getDomainDomainsDomainHostsName.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
domain |
path |
string |
Yes | |
name |
path |
string |
Yes |
Responses
200: OK
application/json
| Property | Type | Required | Description |
|---|---|---|---|
fqdn |
string |
Yes | |
fqdn_unicode |
string |
Yes | |
href |
string |
Yes | |
ips |
array of string |
Yes | |
name |
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}/hosts/{name}
Operation ID: deleteDomainDomainsDomainHostsName.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
domain |
path |
string |
Yes | |
name |
path |
string |
Yes |
Responses
202: Accepted
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
PUT /domain/domains/{domain}/hosts/{name}
Operation ID: putDomainDomainsDomainHostsName.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
domain |
path |
string |
Yes | |
name |
path |
string |
Yes |
Request body
application/json
| Property | Type | Required | Description |
|---|---|---|---|
ips |
array of string |
Yes |
Responses
202: Accepted
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 |