Workers
Environment
Environment endpoint reference.
Get
Get script content from a worker with an environment
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
accountId | string | Yes | Account identifier. | |
serviceName | string | Yes | Name of Worker to bind to | |
environmentName | string | Yes | Environment of the Worker. |
php
$response = $client->workers()->environment()->get('ACCOUNT_ID', 'SERVICE_NAME', 'ENVIRONMENT_NAME');
Update
Put script content from a worker with an environment
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
accountId | string | Yes | Account identifier. | |
serviceName | string | Yes | Name of Worker to bind to | |
environmentName | string | Yes | Environment of the Worker. |
php
$response = $client->workers()->environment()->update('ACCOUNT_ID', 'SERVICE_NAME', 'ENVIRONMENT_NAME');
Get Settings
Get script settings from a worker with an environment
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
accountId | string | Yes | Account identifier. | |
serviceName | string | Yes | Name of Worker to bind to | |
environmentName | string | Yes | Environment of the Worker. |
php
$response = $client->workers()->environment()->getSettings('ACCOUNT_ID', 'SERVICE_NAME', 'ENVIRONMENT_NAME');
Update Settings
Patch script metadata, such as bindings
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
accountId | string | Yes | Account identifier. | |
serviceName | string | Yes | Name of Worker to bind to | |
environmentName | string | Yes | Environment of the Worker. | |
values | array | Yes | Settings values. |
php
$response = $client->workers()->environment()->updateSettings('ACCOUNT_ID', 'SERVICE_NAME', 'ENVIRONMENT_NAME', []);

