Automation api Endpoint
This commit is contained in:
22
app/api/AutomationsApi.php
Normal file
22
app/api/AutomationsApi.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
class AutomationsApi extends ApiController
|
||||
{
|
||||
|
||||
public function default()
|
||||
{
|
||||
//$this->requireAuth();
|
||||
$response = [];
|
||||
$automationData = AutomationManager::getAll();
|
||||
|
||||
foreach ($automationData as $automationKey => $automation) {
|
||||
$response[] = [
|
||||
"automation_id" => $automation['automation_id'],
|
||||
"name" => $automation['name'],
|
||||
"enabled" => $automation['enabled'],
|
||||
];
|
||||
}
|
||||
|
||||
$this->response($response);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user