PHPackages                             masoudniki/vcenter - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. masoudniki/vcenter

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

masoudniki/vcenter
==================

simple sdk for manage and working with vspahre automation api

3.3(3y ago)53592MITPHPPHP ^7.4|^8.0

Since Aug 27Pushed 3y ago1 watchersCompare

[ Source](https://github.com/masoudniki/vsphere)[ Packagist](https://packagist.org/packages/masoudniki/vcenter)[ Docs](https://github.com/masoudniki)[ RSS](/packages/masoudniki-vcenter/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (4)Versions (12)Used By (0)

VMware vSphere SDK
==================

[](#vmware-vsphere-sdk)

[![Actions Status](https://github.com/masoudniki/vSphere/workflows/CI/badge.svg)](https://github.com/masoudniki/vSphere/actions)[![Latest Stable Version](https://camo.githubusercontent.com/c347ac4ac1511d483ab19e63a098d769a01048b11061b631c43b2a28f51bbd79/687474703a2f2f706f7365722e707567782e6f72672f6d61736f75646e696b692f7663656e7465722f76)](https://packagist.org/packages/masoudniki/vcenter)[![License](https://camo.githubusercontent.com/9fffc816ed9ffd8b0c673a86964d605307516cc70c9b307035ea243f15db01b8/687474703a2f2f706f7365722e707567782e6f72672f6d61736f75646e696b692f7663656e7465722f6c6963656e7365)](https://packagist.org/packages/masoudniki/vcenter)
[![codecov](https://camo.githubusercontent.com/d64aae6f567f5b94a191380645e6a6f1df481eda65f6678d95d2f34007a37664/68747470733a2f2f636f6465636f762e696f2f67682f6d61736f75646e696b692f765370686572652f6272616e63682f6d61737465722f67726170682f62616467652e7376673f746f6b656e3d7a6c79314d4647467555)](https://codecov.io/gh/masoudniki/vSphere)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/2cddd5f8d8f48ea4beda9916386289f571121edb106b232ac2c1f66a211da5e8/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6d61736f75646e696b692f765370686572652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/masoudniki/vSphere/?branch=master)[![Build Status](https://camo.githubusercontent.com/6d7d99a9f3a9736c8034122cfccae62cb4cd522f527b6a5873a0a1024b09e7d6/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6d61736f75646e696b692f765370686572652f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/masoudniki/vSphere/build-status/master)[![Code Intelligence Status](https://camo.githubusercontent.com/51567a43ef51d06b48437e1e92c54a3db162744745a93b05062643497ee5cf99/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6d61736f75646e696b692f765370686572652f6261646765732f636f64652d696e74656c6c6967656e63652e7376673f623d6d6173746572)](https://scrutinizer-ci.com/code-intelligence)

SDK for working with vSphere automation API. You can use it to manage ESXI and vCenter powered machines.

Supported Versions
==================

[](#supported-versions)

**vCenterApplianceVersion****status****description**`7.0`supported`6.7`supportedsome of api like **ConsoleTicket** is not working [more information](https://developer.vmware.com/docs/vsphere-automation/latest/vcenter/)6.5supportedInstallation
============

[](#installation)

It's super easy to use, just run the below command:

```
composer require masoudniki/vcenter
```

How to use it
=============

[](#how-to-use-it)

just pass argument to the `VmwareApiClient` and create an instace:

```
    require "vendor/autoload.php";
    $vmware=new \FNDEV\vShpare\VmwareApiClient(
        "127.0.0.1",
        [
            "username"=>"admin",
            "password"=>"admin"
        ],
         "443",
    );
```

Parameters
==========

[](#parameters)

Host
----

[](#host)

only the domain name without any protocol and slash charcher or ip address is acceptable

Credentials
-----------

[](#credentials)

**You have two options for authentication:**

### With username and password

[](#with-username-and-password)

you can pass username and password in array for getting session id

```
[
    'username'=>'local@admin',
    'password'=>'123456789'
]

```

### Or with Vmware-Api-Session-Id

[](#or-with-vmware-api-session-id)

increasing session timeout in vCenter and pass directly the session id

```
[
    'Vmware-Api-Session-Id'=>$sessionId
]

```

> For the initiation &amp; first time use you can pass username and password and then get the session with **getSessionId()** method on VmwareApiClient

```
    require "vendor/autoload.php";
    $vmware=new \FNDEV\vShpare\VmwareApiClient(
        "127.0.0.1",
        "443",
        [
            "username"=>"admin",
            "password"=>"admin"
        ],
    );
    $vmware->getSessionId();
```

Port
----

[](#port)

the port of vCenterAppliance application default value is: **443**

SSL
---

[](#ssl)

if you are using self signed certificate **pass the path of certificate** or set **true** otherwise if you dont want to check certificate set **false**

Protocol
--------

[](#protocol)

if you are running vCenterAppliance on HTTP protocol set **http** or if you are running it on HTTPS set **https**

BaseUrl
-------

[](#baseurl)

The main path of REST API default value is: **"/rest/vcenter"**

AuthUrl
-------

[](#authurl)

The authetication URL for creating **Vmware-Api-Session-Id** default value is:"/rest/com/vmware/cis/session"

Client
------

[](#client)

You can create your **guzzle http client** and set its configuartion then pass it to **VmwaareApiClient**

License
-------

[](#license)

###### Made with ❤️ in `IRAN`

[](#made-with-️-in-iran)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

---

### 🙋 Contributing

[](#raising_hand-contributing)

If you find an issue or have a better way to do something, feel free to open an issue, or a pull request. If you use VmwareApiClient in your open source project, create a pull request to provide its URL as a sample application in the README.md file.

### ❗ Security

[](#exclamation-security)

If you discover any security-related issues, please email `masoud.niki79@gmail.com` instead of using the issue tracker.

TODO
====

[](#todo)

- Add other APIs to the SDK
- Writing more tests
- Creating request class for methods that send options **like createVm**
- Refactoring bad practice

###  Health Score

32

—

LowBetter than 71% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 98.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~82 days

Recently: every ~123 days

Total

11

Last Release

1257d ago

Major Versions

1.2 → 2.02021-07-26

2.2 → 3.02022-11-20

PHP version history (3 changes)v1.0.1PHP ^7.2.5

2.0PHP ^7.4

2.1PHP ^7.4|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/01e0dd323707981ece308ba2d40aa8a3627907ff03dbfad55f4eb3e4ee8a2bfd?d=identicon)[masoudniki](/maintainers/masoudniki)

---

Top Contributors

[![masoudniki](https://avatars.githubusercontent.com/u/25957697?v=4)](https://github.com/masoudniki "masoudniki (59 commits)")[![alisri](https://avatars.githubusercontent.com/u/26031506?v=4)](https://github.com/alisri "alisri (1 commits)")

---

Tags

VMwarevsphareautomation apieseximanage vcenter

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/masoudniki-vcenter/health.svg)

```
[![Health](https://phpackages.com/badges/masoudniki-vcenter/health.svg)](https://phpackages.com/packages/masoudniki-vcenter)
```

###  Alternatives

[shlinkio/shlink

A self-hosted and PHP-based URL shortener application with CLI and REST interfaces

4.8k4.3k](/packages/shlinkio-shlink)[ralphjsmit/laravel-helpers

A package containing handy helpers for your Laravel-application.

13704.6k2](/packages/ralphjsmit-laravel-helpers)[dhlparcel/magento2-plugin

DHL Parcel plugin for Magento 2

11180.5k2](/packages/dhlparcel-magento2-plugin)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
