Workers
Versions
Versions endpoint reference.
List
List of Worker Versions. The first version in the list is the latest version.
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
accountId | string | Yes | Account identifier. | |
scriptName | string | Yes | Name of the script, used in URLs and route configuration. | |
params | array | No | [] | Array containing the necessary params. |
php
$response = $client->workers()->versions()->list('ACCOUNT_ID', 'SCRIPT_NAME', []);
Upload
Upload a Worker Version without deploying to Cloudflare's network. You can find more about the multipart metadata on Cloudflare docs.
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
accountId | string | Yes | Account identifier. | |
scriptName | string | Yes | Name of the script, used in URLs and route configuration. |
php
$response = $client->workers()->versions()->upload('ACCOUNT_ID', 'SCRIPT_NAME');
Get
Get Version Details.
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
accountId | string | Yes | Account identifier. | |
scriptName | string | Yes | Name of the script, used in URLs and route configuration. | |
versionId | string | Yes | Version identifier. |
php
$response = $client->workers()->versions()->get('ACCOUNT_ID', 'SCRIPT_NAME', 'VERSION_ID');

