38 lines
1.1 KiB
PHP
Executable File
38 lines
1.1 KiB
PHP
Executable File
<?php
|
|
header('Content-Type: application/json');
|
|
header('Access-Control-Allow-Origin: *');
|
|
|
|
$action = $_GET['action'] ?? ($_POST['action'] ?? 'status');
|
|
$response = ['status' => 'success', 'data' => []];
|
|
|
|
try {
|
|
switch($action) {
|
|
case 'workflows':
|
|
$response['data'] = [
|
|
[
|
|
'id' => 'WF-001',
|
|
'name' => 'Full Automation Pipeline',
|
|
'status' => 'active',
|
|
'steps' => ['scraping', 'persona', 'email', 'cvc', 'cloud', 'warmup', 'send'],
|
|
'progress' => 65
|
|
]
|
|
];
|
|
break;
|
|
|
|
case 'execute':
|
|
$workflow = $_POST['workflow'] ?? 'default';
|
|
$response['execution_id'] = 'EXEC-' . rand(1000, 9999);
|
|
$response['message'] = "Workflow $workflow started";
|
|
break;
|
|
|
|
default:
|
|
$response['message'] = 'Orchestrator Central API v1.0';
|
|
}
|
|
} catch(Exception $e) {
|
|
$response['status'] = 'error';
|
|
$response['message'] = $e->getMessage();
|
|
}
|
|
|
|
echo json_encode($response);
|
|
?>
|