shellrent / veeam-vspc-api-client
PHP Client for Veeam Service Provider Console API
Installs: 480
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 4
Forks: 2
Open Issues: 1
pkg:composer/shellrent/veeam-vspc-api-client
Requires
- php: ^8.1
- ext-json: *
- guzzlehttp/guzzle: ^7.5
- dev-master
- 2.1.0
- 2.0.10
- 2.0.9
- 2.0.8
- 2.0.7
- 2.0.6
- 2.0.5
- 2.0.4
- 2.0.3
- 2.0.2
- 2.0.1
- 2.0.0
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0.0
- dev-codex/integrate-and-modify-missing-api-calls
- dev-codex/create-agents.md-files-for-ai-guidance
- dev-codex/new-task
- dev-api_vb365
- dev-align-methods
- dev-new-api
- dev-veeam365
- dev-edit_create_company
- dev-fix_jsonserializable
This package is auto-updated.
Last update: 2025-10-08 18:38:36 UTC
README
A PHP SDK for integrating with the Veeam Service Provider Console (VSPC) REST API. The library wraps the official OpenAPI specification provided with VSPC v8.1 and offers repositories, request builders, and payload helpers to quickly interact with the console from PHP applications and automation scripts.
Features
- Guzzle-based HTTP client preconfigured for the VSPC REST endpoints.
- Repository classes mirroring the API tags (Authentication, Companies, Backup Servers, and more).
- Fluent payload builders to compose request bodies for complex operations.
- Helpers for filters, pagination, and query parameters.
- Returns PSR-7 responses or decoded JSON payloads for convenience.
Requirements
- PHP ^8.1 with the JSON extension enabled.
- Composer for dependency management.
- Access to a VSPC environment (on-premises or hosted) with API credentials.
Installation
Install the package via Composer:
composer require shellrent/veeam-vspc-api-client
Getting Started
Create an instance of the SDK by providing the base endpoint of your VSPC installation. The client accepts an optional bearer token and additional Guzzle client options.
use Shellrent\VeeamVspcApiClient\VeeamSPCClient; $client = new VeeamSPCClient( endpoint: 'https://vspc.example.com', token: null, options: [ // Any Guzzle option (timeouts, proxies, etc.) ] );
Authenticate and Fetch a Token
Use the AuthenticationRepository
with the OAuthPayload
helper to request an access token.
use Shellrent\VeeamVspcApiClient\Payloads\OAuthPayload; use Shellrent\VeeamVspcApiClient\Repositories\AuthenticationRepository; $authRepository = new AuthenticationRepository(); $request = $authRepository->postOAuthAuthentication(new OAuthPayload('username', 'password')); $tokenResponse = $client->jsonResponse($request); $token = $tokenResponse->access_token ?? null;
Subsequent requests can be executed by instantiating the client with the retrieved token or by updating the constructor argument.
Calling Other Endpoints
Each repository maps to an API tag and provides helpers to build the corresponding request.
use Shellrent\VeeamVspcApiClient\Repositories\CompanyRepository; $companyRepository = new CompanyRepository(); $request = $companyRepository->getCompanies(); $response = $client->jsonResponse($request);
Repositories accept optional filters and query parameters when executed through VeeamSPCClient::send()
or VeeamSPCClient::jsonResponse()
. You can build complex filters using Filter
and FilterCollection
helpers located under Shellrent\VeeamVspcApiClient\Support
.
OpenAPI Specification
The official VSPC OpenAPI definition used to generate the SDK is stored in openapi/3.5.1/vspc-api.json
. Refer to it for a complete list of available operations, parameters, and payload schemas.
Contributing
Contributions are welcome! If you plan to submit a pull request:
- Fork the repository and create a feature branch.
- Follow the existing coding standards (tabs for indentation, camelCase properties).
- Update or add documentation when introducing new repositories or payload builders.
- Ensure your code builds and, when possible, provide usage examples in the PR description.
License
This project is released under the MIT License.