コンテンツにスキップ

create_dns_monitor

POST
/api/v1/dns-monitors
curl --request POST \
--url https://example.com/api/v1/dns-monitors \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "dns_name": "example", "max_depth": 1, "name": "example", "parent_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "pool": "example", "record_type": "A", "resolver": "example", "resolver_port": 1, "timeout_ms": 1 }'
Media typeapplication/json

The check config is spelled out rather than #[serde(flatten)]ed (as [CreateUrlMonitor] does) because both the node and the check have a name: flattening would bind them to the same JSON key and silently force the display label to equal the resolved name.

object
dns_name
required

The DNS name to resolve.

string
max_depth
integer | null format: int32
name
required

Display name for the node.

string
parent_id
string | null format: uuid
pool
string | null
record_type

Which record type a DNS check resolves to. Stored as an UPPERCASE token (the record_type column).

Cname is a legitimate terminal type: it answers “what is this name an alias for?” without chasing on to an address.

string
Allowed values: A AAAA CNAME
resolver
string | null
resolver_port
integer | null format: int32
timeout_ms
integer | null format: int32

Monitor node created and bound to the built-in DNS profile

Media typeapplication/json

The id of a freshly created resource — the whole body of a 201.

Deliberately one shape for every creator. The json!({"id": …}) literal it replaces was written out per handler, which is how {"id": …} and {"node_id": …} both ended up in this API for the same idea; a client then needs to know which creator it called to read the id back.

object
id
required
string format: uuid
Examplegenerated
{
"id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
}

The name is empty, the DNS check is not usable, or the pool name is not a legal subject token

Media typeapplication/json

The ADR-019 envelope every failure renders as. pub(crate) and schema-bearing so the OpenAPI document can name one error shape for every endpoint (ADR-035) instead of leaving 4xx/5xx bodies undescribed — a client that has to guess the failure shape ends up parsing the success shape and reading undefined.

object
error
required
object
code
required

Stable machine-readable code. Clients branch on this, never on the message.

string
message
required

Operator-facing sentence. Safe to display; never carries an internal error’s own text.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example"
}
}

No valid bearer token

Media typeapplication/json

The ADR-019 envelope every failure renders as. pub(crate) and schema-bearing so the OpenAPI document can name one error shape for every endpoint (ADR-035) instead of leaving 4xx/5xx bodies undescribed — a client that has to guess the failure shape ends up parsing the success shape and reading undefined.

object
error
required
object
code
required

Stable machine-readable code. Clients branch on this, never on the message.

string
message
required

Operator-facing sentence. Safe to display; never carries an internal error’s own text.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example"
}
}

Role lacks ManageConfig

Media typeapplication/json

The ADR-019 envelope every failure renders as. pub(crate) and schema-bearing so the OpenAPI document can name one error shape for every endpoint (ADR-035) instead of leaving 4xx/5xx bodies undescribed — a client that has to guess the failure shape ends up parsing the success shape and reading undefined.

object
error
required
object
code
required

Stable machine-readable code. Clients branch on this, never on the message.

string
message
required

Operator-facing sentence. Safe to display; never carries an internal error’s own text.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example"
}
}

Inventory storage is unavailable (skeleton mode)

Media typeapplication/json

The ADR-019 envelope every failure renders as. pub(crate) and schema-bearing so the OpenAPI document can name one error shape for every endpoint (ADR-035) instead of leaving 4xx/5xx bodies undescribed — a client that has to guess the failure shape ends up parsing the success shape and reading undefined.

object
error
required
object
code
required

Stable machine-readable code. Clients branch on this, never on the message.

string
message
required

Operator-facing sentence. Safe to display; never carries an internal error’s own text.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example"
}
}