Operazioni sui domini
4 operazioni di nome domain.*. Ognuna si esegue in un batch con apply_ops, dry_run_ops, la CLI o l’admin.
| Operation | What it does | Permission | Confirmation |
|---|---|---|---|
| domain.add | Connect a hostname to the site. | site.admin | none |
| domain.primary | Make an active domain the site's primary address, the one its other addresses redirect to; a domain that is not active yet is refused (409). | site.admin | none |
| domain.verify | Check a connected domain again: its DNS record, and the edge provider's hostname and certificate (provisioned at the first check). | site.admin | none |
| domain.delete | Disconnect a domain from the site and release it at the edge provider; the platform address cannot be removed. | site.admin | destructive |
domain.add
Connect a hostname to the site. The platform's base domain or one plain label under it goes live at once; any other hostname waits for its DNS record (ownershipVerification, dnsTarget) and the edge provider's certificate, checked with domain.verify. The first domain that goes live becomes primary while the platform address still is. A refused hostname is domain_refused with its reason (invalid, too_deep, platform_address, provider_unavailable; taken is 409). Site ownership is checked.
Esempio di input
{
"hostname": "www.example.com"
}Input
| Field | Type | Required | Notes |
|---|---|---|---|
| hostname | string | yes | At least 1 character. At most 255 characters. |
Output
| Field | Type | Required | Notes |
|---|---|---|---|
| domain | object | yes | |
| domain.id | string | yes | |
| domain.siteId | string | yes | |
| domain.hostname | string | yes | |
| domain.kind | string | yes | One of "platform", "custom". |
| domain.isPrimary | boolean | yes | |
| domain.redirectToPrimary | boolean | yes | |
| domain.status | string | yes | One of "pending", "active", "error". |
| domain.dnsStatus | string | yes | |
| domain.provider | string | null | yes | |
| domain.providerId | string | null | yes | |
| domain.providerStatus | string | null | yes | |
| domain.sslStatus | string | null | yes | |
| domain.dnsTarget | string | null | yes | |
| domain.ownershipVerification | object | null | yes | |
| domain.sslValidationRecords | array of object | null | yes | |
| domain.lastError | string | null | yes | |
| domain.lastCheckedAt | string | null | yes | |
| domain.verifiedAt | string | null | yes | |
| domain.createdAt | string | yes | |
| domain.updatedAt | string | yes |
Un dry run rifiuta un’operazione esterna, quindi non ha una riga di prova: eseguila da sola in un batch.
domain.primary
Make an active domain the site's primary address, the one its other addresses redirect to; a domain that is not active yet is refused (409). Site ownership is checked.
Esempio di input
{
"domainId": "9c0d1e2f-3a4b-4c5d-9e6f-7a8b9c0d1e2f"
}Input
| Field | Type | Required | Notes |
|---|---|---|---|
| domainId | string (uuid) | yes |
Output
| Field | Type | Required | Notes |
|---|---|---|---|
| domain | object | yes | |
| domain.id | string | yes | |
| domain.siteId | string | yes | |
| domain.hostname | string | yes | |
| domain.kind | string | yes | One of "platform", "custom". |
| domain.isPrimary | boolean | yes | |
| domain.redirectToPrimary | boolean | yes | |
| domain.status | string | yes | One of "pending", "active", "error". |
| domain.dnsStatus | string | yes | |
| domain.provider | string | null | yes | |
| domain.providerId | string | null | yes | |
| domain.providerStatus | string | null | yes | |
| domain.sslStatus | string | null | yes | |
| domain.dnsTarget | string | null | yes | |
| domain.ownershipVerification | object | null | yes | |
| domain.sslValidationRecords | array of object | null | yes | |
| domain.lastError | string | null | yes | |
| domain.lastCheckedAt | string | null | yes | |
| domain.verifiedAt | string | null | yes | |
| domain.createdAt | string | yes | |
| domain.updatedAt | string | yes |
Provala
yarn splash domain.primary '{"domainId":"9c0d1e2f-3a4b-4c5d-9e6f-7a8b9c0d1e2f"}' --dry-rundomain.verify
Check a connected domain again: its DNS record, and the edge provider's hostname and certificate (provisioned at the first check). The domain is active once all three are; the answer gives its status, its DNS and SSL states and the last error. Site ownership is checked.
Esempio di input
{
"domainId": "9c0d1e2f-3a4b-4c5d-9e6f-7a8b9c0d1e2f"
}Input
| Field | Type | Required | Notes |
|---|---|---|---|
| domainId | string (uuid) | yes |
Output
| Field | Type | Required | Notes |
|---|---|---|---|
| domain | object | yes | |
| domain.id | string | yes | |
| domain.siteId | string | yes | |
| domain.hostname | string | yes | |
| domain.kind | string | yes | One of "platform", "custom". |
| domain.isPrimary | boolean | yes | |
| domain.redirectToPrimary | boolean | yes | |
| domain.status | string | yes | One of "pending", "active", "error". |
| domain.dnsStatus | string | yes | |
| domain.provider | string | null | yes | |
| domain.providerId | string | null | yes | |
| domain.providerStatus | string | null | yes | |
| domain.sslStatus | string | null | yes | |
| domain.dnsTarget | string | null | yes | |
| domain.ownershipVerification | object | null | yes | |
| domain.sslValidationRecords | array of object | null | yes | |
| domain.lastError | string | null | yes | |
| domain.lastCheckedAt | string | null | yes | |
| domain.verifiedAt | string | null | yes | |
| domain.createdAt | string | yes | |
| domain.updatedAt | string | yes |
Un dry run rifiuta un’operazione esterna, quindi non ha una riga di prova: eseguila da sola in un batch.
domain.delete
Disconnect a domain from the site and release it at the edge provider; the platform address cannot be removed. When it was the primary, the platform address takes over. Site ownership is checked.
Esempio di input
{
"domainId": "9c0d1e2f-3a4b-4c5d-9e6f-7a8b9c0d1e2f"
}Input
| Field | Type | Required | Notes |
|---|---|---|---|
| domainId | string (uuid) | yes |
Output
| Field | Type | Required | Notes |
|---|---|---|---|
| success | true | yes |
Un dry run rifiuta un’operazione esterna, quindi non ha una riga di prova: eseguila da sola in un batch.
Generato dal registro delle operazioni e dal catalogo degli strumenti MCP (sorgente 3f644130aa6a2d27).
Qualcosa non va in questa pagina? Scrivi a docs@librettocms.com.