Workers
Deployments
Deployments endpoint reference.
List
List of Worker Deployments. The first deployment in the list is the latest deployment actively serving traffic.
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
accountId | string | Yes | Account identifier. | |
scriptMame | string | Yes | Name of the script, used in URLs and route configuration. |
php
$response = $client->workers()->deployments()->list('ACCOUNT_ID', 'SCRIPT_MAME');
Create
Deployments configure how Worker Versions are deployed to traffic. A deployment can consist of one or two versions of a Worker.
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
accountId | string | Yes | Account identifier. | |
scriptMame | string | Yes | Name of the script, used in URLs and route configuration. | |
values | mixed | Yes | Dployment config. | |
force | bool | No | false | If set to true, the deployment will be created even if normally blocked by something such rolling back to an older version when a secret has changed. |
php
$response = $client->workers()->deployments()->create('ACCOUNT_ID', 'SCRIPT_MAME', $values, true);

