Workers
Domains
Domains endpoint reference.
List
Lists all Worker Domains for an account.
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
accountId | string | Yes | Account identifier. | |
params | array | No | [] | Array containing the necessary params. |
php
$response = $client->workers()->domains()->list('ACCOUNT_ID', []);
Attach
Attaches a Worker to a zone and hostname.
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
accountId | string | Yes | Account identifier. | |
values | array | No | [] | Values to set on account. |
php
$response = $client->workers()->domains()->attach('ACCOUNT_ID', []);
Detach
Detaches a Worker from a zone and hostname.
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
accountId | string | Yes | Account identifier. | |
domainId | string | Yes | Identifer of the Worker Domain. |
php
$response = $client->workers()->domains()->detach('ACCOUNT_ID', 'DOMAIN_ID');
Get
Gets a Worker domain.
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
accountId | string | Yes | Account identifier. | |
domainId | string | Yes | Identifer of the Worker Domain. |
php
$response = $client->workers()->domains()->get('ACCOUNT_ID', 'DOMAIN_ID');

