2024-02-05 12:40:51 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
use Appwrite\Client;
|
|
|
|
|
use Appwrite\Services\Functions;
|
|
|
|
|
|
2024-02-21 11:31:50 +00:00
|
|
|
$client = (new Client())
|
2025-04-22 13:02:33 +00:00
|
|
|
->setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
|
|
|
->setProject('<YOUR_PROJECT_ID>') // Your project ID
|
|
|
|
|
->setKey('<YOUR_API_KEY>'); // Your secret API key
|
2024-02-05 12:40:51 +00:00
|
|
|
|
|
|
|
|
$functions = new Functions($client);
|
|
|
|
|
|
2024-02-21 11:31:50 +00:00
|
|
|
$result = $functions->createBuild(
|
2024-02-24 11:34:42 +00:00
|
|
|
functionId: '<FUNCTION_ID>',
|
|
|
|
|
deploymentId: '<DEPLOYMENT_ID>',
|
2025-04-22 13:02:33 +00:00
|
|
|
buildId: '<BUILD_ID>' // optional
|
2024-02-21 11:31:50 +00:00
|
|
|
);
|