akramfares / rundeck-sdk-php
PHP SDK for Rundeck web API
Installs: 1 642
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 2
Forks: 3
Open Issues: 1
Requires
- php: ~5.5|~7.0
Requires (Dev)
- guzzlehttp/guzzle: ^6.2
- phpunit/phpunit: ~4.0||~5.0||~6.0
- squizlabs/php_codesniffer: ^2.3
This package is not auto-updated.
Last update: 2024-04-13 23:56:53 UTC
README
PHP client for Rundeck web API.
Install
Via Composer
$ composer require akramfares/rundeck-sdk-php
Usage
$client = new Rundeck\Rundeck(ENDPOINT, AUTH_TOKEN, API_VERSION); // Get all projects $projects = $client->project()->findAll(); foreach($projects["project"] as $project) { echo $project["name"]. "\n"; } // Get jobs of project $jobs = $client->project("Project")->get("jobs/export"); foreach($jobs["job"] as $job) { echo $job["name"]. "\n"; } // Get job info $job = $client->job("c4ec2b60-ac83-4ee2-9266-67ce795c9603")->find(); echo $job["job"]["name"] . ": " . $job["job"]["id"]; // Get job executions $executions = $client->job("c4ec2b60-ac83-4ee2-9266-67ce795c9603")->get('executions'); foreach ($executions["execution"] as $execution) { echo $execution["job"]["name"] . " started at " . $execution["date-started"] ."\n"; } // Get execution info $execution = $client->execution("4939")->find(); echo $execution["job"]["name"] . " started at " . $execution["date-started"];
Change log
Please see CHANGELOG for more information on what has changed recently.
Testing
$ composer test
Contributing
Please see CONTRIBUTING and CONDUCT for details.
Security
If you discover any security related issues, please email akramfares |at| gmail |.| com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.