Skip to content

LTD-Beget/openapi-vps-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BegetOpenAPIVps

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)

Installation & Usage

Requirements

PHP 7.4 and later. Should also work with PHP 8.0.

Composer

To install the bindings via Composer, add the following to composer.json:

{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/LTD-Beget/openapi-vps-php.git"
    }
  ],
  "require": {
    "LTD-Beget/openapi-vps-php": "*@dev"
  }
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

<?php
require_once('/path/to/BegetOpenAPIVps/vendor/autoload.php');

Getting Started

Please follow the installation procedure and then run the following:

<?php
require_once(__DIR__ . '/vendor/autoload.php');



// Configure Bearer (JWT) authorization: bearerAuth
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new OpenAPI\Client\Api\BackupServiceApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);

try {
    $result = $apiInstance->backupServiceGetAvailableCopies();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling BackupServiceApi->backupServiceGetAvailableCopies: ', $e->getMessage(), PHP_EOL;
}

API Endpoints

All URIs are relative to https://api.beget.com

Class Method HTTP request Description
BackupServiceApi backupServiceGetAvailableCopies GET /v1/vps/backup
BackupServiceApi backupServiceGetBackupFileList GET /v1/vps/{id}/backup/{copy_id}
BackupServiceApi backupServiceGetOrders GET /v1/vps/backup/orders
BackupServiceApi backupServiceRestoreFile POST /v1/vps/{id}/backup/{copy_id}/file
BackupServiceApi backupServiceRestoreServer POST /v1/vps/{id}/backup/{copy_id}/server
ConfiguratorServiceApi configuratorServiceGetCalculation GET /v1/vps/configurator/calculation
ConfiguratorServiceApi configuratorServiceGetConfiguratorInfo GET /v1/vps/configurator/info
ManageServiceApi manageServiceAttachIpAddress POST /v1/vps/{id}/network/{ip_address}
ManageServiceApi manageServiceAttachSshKey POST /v1/vps/{id}/sshKey/{ssh_key_id}
ManageServiceApi manageServiceAttachToPrivateNetwork POST /v1/vps/{id}/private-network/{network_id}
ManageServiceApi manageServiceChangeConfiguration PUT /v1/vps/server/{id}/configuration
ManageServiceApi manageServiceChangeSshAccess PUT /v1/vps/{id}/ssh/access
ManageServiceApi manageServiceCheckSoftwareRequirements POST /v1/vps/software/requirements
ManageServiceApi manageServiceCreateVps POST /v1/vps/server
ManageServiceApi manageServiceDetachFromPrivateNetwork DELETE /v1/vps/{id}/private-network/{network_id}
ManageServiceApi manageServiceDetachIpAddress DELETE /v1/vps/network/detach/{ip_address}
ManageServiceApi manageServiceDetachSshKey DELETE /v1/vps/{id}/sshKey/{ssh_key_id}
ManageServiceApi manageServiceDisablePostInstallAlert DELETE /v1/vps/{id}/software/post-install-alert
ManageServiceApi manageServiceGetAvailableConfiguration GET /v1/vps/configuration
ManageServiceApi manageServiceGetFileManagerSettings POST /v1/vps/{id}/fm
ManageServiceApi manageServiceGetHistory GET /v1/vps/{id}/history
ManageServiceApi manageServiceGetInfo GET /v1/vps/server/{id}
ManageServiceApi manageServiceGetInstalledSoftware GET /v1/vps/{id}/software
ManageServiceApi manageServiceGetList GET /v1/vps/server/list
ManageServiceApi manageServiceGetRegionList GET /v1/vps/region
ManageServiceApi manageServiceGetStatuses GET /v1/vps/server/statuses
ManageServiceApi manageServiceRebootVps POST /v1/vps/server/{id}/reboot
ManageServiceApi manageServiceReinstall POST /v1/vps/server/{id}/reinstall
ManageServiceApi manageServiceRemoveVps POST /v1/vps/server/{id}/remove
ManageServiceApi manageServiceReserveVpsSubdomain GET /v1/vps/subdomain/reserve
ManageServiceApi manageServiceResetPassword PUT /v1/vps/{id}/password
ManageServiceApi manageServiceResetVps POST /v1/vps/server/{id}/reset
ManageServiceApi manageServiceStartRescue POST /v1/vps/server/{id}/rescue
ManageServiceApi manageServiceStartVps POST /v1/vps/server/{id}/start
ManageServiceApi manageServiceStopRescue DELETE /v1/vps/server/{id}/rescue
ManageServiceApi manageServiceStopVps POST /v1/vps/server/{id}/stop
ManageServiceApi manageServiceUnarchive DELETE /v1/vps/archive/{id}
ManageServiceApi manageServiceUpdateInfo PUT /v1/vps/server/{id}/info
MarketplaceServiceApi marketplaceServiceGetSoftwareInfo GET /v1/vps/marketplace/software/{name}/{version}
MarketplaceServiceApi marketplaceServiceGetSoftwareList GET /v1/vps/marketplace/software/list
NetworkServiceApi networkServiceCreatePrivateNetwork POST /v1/vps/private-network
NetworkServiceApi networkServiceGetNetworkInfo GET /v1/vps/network
NetworkServiceApi networkServiceOrderIpAddress POST /v1/vps/network
NetworkServiceApi networkServiceRemoveIpAddress DELETE /v1/vps/network/{ip_address}
NetworkServiceApi networkServiceSuggestPrivateAddress POST /v1/vps/private-network/{network_id}/suggested-address
SnapshotServiceApi snapshotServiceCreate POST /v1/vps/snapshot
SnapshotServiceApi snapshotServiceCreateCalculator POST /v1/vps/snapshot/calculator
SnapshotServiceApi snapshotServiceEdit PUT /v1/vps/snapshot/{id}
SnapshotServiceApi snapshotServiceGetAll GET /v1/vps/snapshot
SnapshotServiceApi snapshotServiceGetAllRestores GET /v1/vps/snapshot/restore
SnapshotServiceApi snapshotServiceRemove DELETE /v1/vps/snapshot/{id}
SnapshotServiceApi snapshotServiceRestore POST /v1/vps/snapshot/{id}/restore
SoftwareLicenseServiceApi softwareLicenseServiceChangeLicensePlan PATCH /v1/vps/software/license/{vps_id}
SoftwareLicenseServiceApi softwareLicenseServiceGetLicenseInfo GET /v1/vps/software/license
SshKeyServiceApi sshKeyServiceAdd POST /v1/vps/sshKey
SshKeyServiceApi sshKeyServiceGetAll GET /v1/vps/sshKey
SshKeyServiceApi sshKeyServiceRemove DELETE /v1/vps/sshKey/{id}
StatisticServiceApi statisticServiceGetCpu GET /v1/vps/statistic/cpu/{id}
StatisticServiceApi statisticServiceGetCpuDetails GET /v1/vps/statistic/cpu-details/{id}
StatisticServiceApi statisticServiceGetDisk GET /v1/vps/statistic/disk/{id}
StatisticServiceApi statisticServiceGetDiskUsage GET /v1/vps/statistic/disk-usage/{id}
StatisticServiceApi statisticServiceGetLoadAverage GET /v1/vps/statistic/load-average/{id}
StatisticServiceApi statisticServiceGetMemory GET /v1/vps/statistic/memory/{id}
StatisticServiceApi statisticServiceGetNetwork GET /v1/vps/statistic/network/{id}
StatisticServiceApi statisticServiceGetProcessList GET /v1/vps/statistic/processes/{id}

Models

Authorization

bearerAuth

  • Type: Bearer authentication (JWT)

Tests

To run the tests, use:

composer install
vendor/bin/phpunit

Author

About this package

This PHP package is automatically generated by the OpenAPI Generator project:

  • API version: v1.6.0
    • Package version: v1.6.0
  • Build package: org.openapitools.codegen.languages.PhpClientCodegen

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published