https://github.com/enguerr/vmware-php
A PHP wrapper for the VMWare API.
https://github.com/enguerr/vmware-php
Last synced: 11 days ago
JSON representation
A PHP wrapper for the VMWare API.
- Host: GitHub
- URL: https://github.com/enguerr/vmware-php
- Owner: enguerr
- Created: 2021-10-26T05:45:17.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2024-03-27T18:12:08.000Z (almost 2 years ago)
- Last Synced: 2025-05-23T13:21:28.920Z (8 months ago)
- Language: PHP
- Size: 25.4 KB
- Stars: 0
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# vmware-php
A PHP wrapper for the VMWare API.
This is a pre-alpha release, so stuf isn't working correctly atm.
## Installation
```
composer require enguerr/vmware-api
```
## Guide
Our VMWare API implementation contains the following features:
- Simple login using application passwords.
- Automatic retry functionionality that retries requests when connection errors or status codes >= 500 occur.
- Direct function calls for much used api endpoints.
- Easy syntax for all other endpoints using `$api->request($method, $uri, $json = [], $query = [])`.
```php
// Create a new API instance, endpoint should end on "/rest/".
$api = new \enguerr\VMWare\[Vcenter|Appliance|Inventory]IApi('https://vcenter.local/api/');
```
```php
// LEGACY LOGIN WITH TOKEN
$api->login('yourusername', 'yourpassword');
```
Now your API should be ready to use:
```php
$vms = $api->getListOfVms();
foreach($vms as $vm) {
var_dump($vm);
}
```
## Documentation
- http://vmware.github.io/vsphere-automation-sdk-rest/7.0/