Harthelm Docs
REST APIDomains

Change a custom domain's settings

Team admins (`team.manage`). Absent fields stay. Turning `use_regex` on or off re-validates the routes (422 at `/routes/<i>/path` when one does not fit the new mode).

Generated from openapi/harthelm.yaml at v1.5.0
PATCH
/teams/{team}/domains/{domain}

Authorization

cookie__Host-harthelm_session<token>

Browser session of the UI (12 h idle, 7 days absolute). State-changing requests also need the header Harthelm-CSRF: 1 and a matching Origin.

Path Parameters

team*integer

Numeric resource id.

Formatint64
Range1 <= value
domain*string

A custom domain's name, e.g. shop.example.com.

Length3 <= length <= 253

Header Parameters

If-Match?string

ETag of the version the change is based on. Declared optional so that the server, not the request binder, answers a missing header with 428.

Request Body

application/json
  1. body
restricted?boolean
use_regex?boolean

Route paths are RE2 expressions instead of prefixes.

max_body_bytes?integer

Largest request body the router passes on (413 above); 0 restores the installation default.

Formatint64
Range0 <= value
timeout_seconds?integer

How long the router waits for a response's headers (504 after); 0 restores the default.

Range0 <= value

Response Body

The domain.

application/json
  1. response
id*string
Formatuuid
team_id*ID

Numeric resource id.

Formatint64
Range1 <= value
name*DomainNameValue

A host name of at least two labels (letters, digits, hyphens; IDNs in their xn-- form), compared in lower case; no wildcard, no IP address, no trailing dot.

Length3 <= length <= 253
url*string

The domain's HTTPS URL, from its name.

restricted*boolean
use_regex*boolean
max_body_bytes*integer

The effective limit (the installation default when none is set).

Formatint64
timeout_seconds*integer

The effective limit.

verification*
tls*
records*array<>

The DNS records to set, in the order the console shows them.

routes*array<>
created_by?ID

Numeric resource id.

Formatint64
Range1 <= value
created_at*string
Formatdate-time
updated_at*string
Formatdate-time
expires_at?string

An unverified domain (never verified): when the claim is released and the domain removed (its creation plus customDomains.claimDays). Absent once verified, and from an older core.

Formatdate-time
curl -X PATCH 'https://console.example.com/api/v1/teams/1/domains/string' \  -H 'Content-Type: application/json' \  -d '{}'
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "team_id": 1,  "name": "string",  "url": "string",  "restricted": true,  "use_regex": true,  "max_body_bytes": 0,  "timeout_seconds": 0,  "verification": {    "status": "unchecked",    "method": "txt",    "checked_at": "2019-08-24T14:15:22Z",    "verified_at": "2019-08-24T14:15:22Z",    "reason": "string",    "txt_missing_since": "2019-08-24T14:15:22Z",    "lapses_at": "2019-08-24T14:15:22Z"  },  "tls": {    "mode": "automated",    "status": "pending",    "reason": "string",    "not_after": "2019-08-24T14:15:22Z",    "covered_by": "string"  },  "records": [    {      "type": "CNAME",      "name": "string",      "value": "string",      "purpose": "verification"    }  ],  "routes": [    {      "path": "string",      "workspace_ids": [        1      ]    }  ],  "created_by": 1,  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z",  "expires_at": "2019-08-24T14:15:22Z"}