Deployments
Deployments track the version(s) of your Worker that are actively serving traffic. A deployment can consist of one or two versions of a Worker.
Cloudflare API docsList
List of Worker Deployments. The first deployment in the list is the latest deployment actively serving traffic.
php
$response = $client->workers()->deployments()->get('account_id', 'script_name');
Create
Deployments configure how Worker Versions are deployed to traffic. A deployment can consist of one or two versions of a Worker.
php
$values = [
'strategy' => 'percentage',
'versions' => [
[
'percentage' => '100',
'version_id' => 'bcf48806-b317-4351-9ee7-36e7d557d4de'
]
]
];
$response = $client->workers()->deployments()->create('account_id', 'script_name', $values);