mangati / portainer-api
Portainer API client
Installs: 1 325
Dependents: 0
Suggesters: 0
Security: 0
Stars: 12
Watchers: 3
Forks: 7
Open Issues: 0
Requires
- mangati/api-client: ^0.3
README
Portainer API client
Install
composer req mangati/portainer-api
Usage
Managing endpoints:
$portainer = new \Mangati\Portainer\Client('http://127.0.0.1:9000'); $portainer->auth('admin', '123456789'); $endpointsApi = $portainer->endpoints(); $endpoints = $endpointsApi->getAll(); print_r($endpoints);
Managing stacks:
$stacksApi = $portainer->stacks($endpoints[0]['Id']); $stacks = $stacksApi->getAll(); print_r($stacks); if (count($stacks)) { $stacksApi->delete($stacks[0]['Id']); }