API

Template

A configuration template: 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 /template/templates create Created
GET /template/templates list OK
GET /template/templates/{id} load OK
DELETE /template/templates/{id} remove No Content
PATCH /template/templates/{id} update No Content

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:

templates, err := client.Template(nil).List(nil, nil)
if err != nil {
    panic(err)
}
fmt.Println(templates)
template, err := client.Template(nil).Load(map[string]any{"id": "example_id"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(template)
created, err := client.Template(nil).Create(map[string]any{"name": "example", "payload": map[string]any{}}, nil)
if err != nil {
    panic(err)
}
fmt.Println(created)
updated, err := client.Template(nil).Update(map[string]any{"id": "example_id", "description": "example", "name": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(updated)
removed, err := client.Template(nil).Remove(map[string]any{"id": "example_id"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(removed)

Lua

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

local templates, err = client:Template():list()
local template, err = client:Template():load({ id = "example_id" })
local created, err = client:Template():create({ name = "example", payload = {} })
local updated, err = client:Template():update({ id = "example_id", description = "example", name = "example" })
local removed, err = client:Template():remove({ id = "example_id" })

PHP

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

$templates = $client->Template()->list();
$template = $client->Template()->load(["id" => "example_id"]);
$created = $client->Template()->create(["name" => "example", "payload" => []]);
$updated = $client->Template()->update(["id" => "example_id", "description" => "example", "name" => "example"]);
$client->Template()->remove(["id" => "example_id"]);

Python

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

templates = client.Template().list()
template = client.Template().load({"id": "example_id"})
created = client.Template().create({ "name": "example", "payload": {} })
updated = client.Template().update({"id": "example_id", "description": "example", "name": "example"})
client.Template().remove({"id": "example_id"})

Ruby

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

templates = client.Template.list()
template = client.Template.load({ "id" => "example_id" })
created = client.Template.create({ "name" => "example", "payload" => {} })
updated = client.Template.update({ "id" => "example_id", "description" => "example", "name" => "example" })
client.Template.remove({ "id" => "example_id" })

TypeScript

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

const templates = await client.Template().list()
const template = await client.Template().load({ id: "example_id" })
const created = await client.Template().create({ name: "example", payload: {} })
const updated = await client.Template().update({ id: "example_id", description: "example", name: "example" })
await client.Template().remove({ id: "example_id" })

Fields

Field Type Required Description
description string Yes Description
editable boolean Yes Editable
href string Yes Href
id string Yes Id
name string Yes Name
namespaces array Yes Namespaces
orgname string Yes Orgname
payload object Yes Payload
sharing_space object Yes Sharing Space
variables array Yes Variables

create

POST /template/templates

Operation ID: postTemplateTemplates.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
sharing_id query string No

Request body

application/json

Property Type Required Description
description string No
name string Yes
payload object Yes
payload.dns:records object No
payload.dns:records.default boolean No
payload.dns:records.records array of object No
payload.dns:records.records[].name string Yes
payload.dns:records.records[].ttl integer No
payload.dns:records.records[].type enum: A, AAAA, ALIAS, CAA, CDS, CNAME, ... Yes
payload.dns:records.records[].values array of string Yes
payload.domain:mailboxes object No
payload.domain:mailboxes.values array of object Yes
payload.domain:mailboxes.values[].login string Yes
payload.domain:nameservers object No
payload.domain:nameservers.addresses array of string Yes
payload.domain:nameservers.service enum: custom, livedns Yes
payload.domain:webredirs object No
payload.domain:webredirs.values array of object Yes
payload.domain:webredirs.values[].host string No
payload.domain:webredirs.values[].override boolean No
payload.domain:webredirs.values[].protocol enum: http, https, httpsonly No
payload.domain:webredirs.values[].type enum: cloak, http301, http302 Yes
payload.domain:webredirs.values[].url string Yes

Responses

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 /template/templates

Operation ID: getTemplateTemplates.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
page query integer No
per_page query integer No

Responses

200: OK

application/json

Property Type Required Description
[].description string Yes
[].editable boolean Yes
[].href string Yes
[].id string Yes
[].name string Yes
[].namespaces array of string Yes
[].orgname string Yes
[].sharing_space object No
[].sharing_space.id string Yes
[].sharing_space.name string Yes
[].sharing_space.reseller boolean No
[].sharing_space.sharing_space object No
[].sharing_space.sharing_space.id string Yes
[].sharing_space.sharing_space.name string Yes
[].sharing_space.type string No
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 /template/templates/{id}

Operation ID: getTemplateTemplatesId.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
id path string Yes

Responses

200: OK

application/json

Property Type Required Description
description string Yes
editable boolean Yes
href string Yes
id string Yes
name string Yes
namespaces array of string Yes
orgname string Yes
payload object Yes
payload.dns:records object No
payload.dns:records.default boolean No
payload.dns:records.records array of object No
payload.dns:records.records[].name string Yes
payload.dns:records.records[].ttl integer No
payload.dns:records.records[].type enum: A, AAAA, ALIAS, CAA, CDS, CNAME, ... Yes
payload.dns:records.records[].values array of string Yes
payload.domain:mailboxes object No
payload.domain:mailboxes.values array of object Yes
payload.domain:mailboxes.values[].login string Yes
payload.domain:nameservers object No
payload.domain:nameservers.addresses array of string Yes
payload.domain:nameservers.service enum: custom, livedns Yes
payload.domain:webredirs object No
payload.domain:webredirs.values array of object Yes
payload.domain:webredirs.values[].host string No
payload.domain:webredirs.values[].override boolean No
payload.domain:webredirs.values[].protocol enum: http, https, httpsonly No
payload.domain:webredirs.values[].type enum: cloak, http301, http302 Yes
payload.domain:webredirs.values[].url string Yes
sharing_space object No
sharing_space.id string Yes
sharing_space.name string Yes
sharing_space.reseller boolean No
sharing_space.sharing_space object No
sharing_space.sharing_space.id string Yes
sharing_space.sharing_space.name string Yes
sharing_space.type string No
variables array of 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 /template/templates/{id}

Operation ID: deleteTemplateTemplatesId.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
id path string Yes

Responses

204: No Content
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 /template/templates/{id}

Operation ID: patchTemplateTemplatesId.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
id path string Yes

Request body

application/json

Property Type Required Description
description string No
name string No
payload object No
payload.dns:records object No
payload.dns:records.default boolean No
payload.dns:records.records array of object No
payload.dns:records.records[].name string Yes
payload.dns:records.records[].ttl integer No
payload.dns:records.records[].type enum: A, AAAA, ALIAS, CAA, CDS, CNAME, ... Yes
payload.dns:records.records[].values array of string Yes
payload.domain:mailboxes object No
payload.domain:mailboxes.values array of object Yes
payload.domain:mailboxes.values[].login string Yes
payload.domain:nameservers object No
payload.domain:nameservers.addresses array of string Yes
payload.domain:nameservers.service enum: custom, livedns Yes
payload.domain:webredirs object No
payload.domain:webredirs.values array of object Yes
payload.domain:webredirs.values[].host string No
payload.domain:webredirs.values[].override boolean No
payload.domain:webredirs.values[].protocol enum: http, https, httpsonly No
payload.domain:webredirs.values[].type enum: cloak, http301, http302 Yes
payload.domain:webredirs.values[].url string Yes

Responses

204: No Content
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