Skip to content

Latest commit

 

History

History
71 lines (49 loc) · 1.22 KB

File metadata and controls

71 lines (49 loc) · 1.22 KB

Host Service API

RNIDS\Host\HostService exposes nameserver host commands.

Methods

check(string|array $request): array

Checks one or many host objects.

Request shape:

array{names?: mixed}|list<mixed>|non-empty-string

Response shape:

list<array{
  name: string,
  available: bool,
  reason: string|null
}>

info(string $name): array

Returns host details, statuses, IP addresses, and timestamps.

Response shape:

array{
  name: string|null,
  roid: string|null,
  statuses: list<string>,
  ipv4: list<string>,
  ipv6: list<string>,
  clientId: string|null,
  createClientId: string|null,
  updateClientId: string|null,
  createDate: \DateTimeImmutable|null,
  updateDate: \DateTimeImmutable|null,
  transferDate: \DateTimeImmutable|null
}

create(string|array $request, ?string $ipv4 = null, ?string $ipv6 = null): array

Creates a host.

Supports full payload or simplified form:

$host->create('ns1.example.rs', '192.0.2.10', null);

Response shape:

array{name: string|null, createDate: \DateTimeImmutable|null}

update(array $request): array{}

Updates addresses/statuses and/or renames host.

delete(string $name): array{}

Deletes a host object.