2017 © Pedro Peláez
 

library lxcpapi

LXC Web panel REST v1 API Client

image

lcherone/lxcpapi

LXC Web panel REST v1 API Client

  • Saturday, January 2, 2016
  • by lcherone
  • Repository
  • 0 Watchers
  • 0 Stars
  • 122 Installations
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 6 Versions
  • 1 % Grown

The README.md

LXC Panel REST API PHP Client

About:, (*1)

This php composer package provides a simple object orientated way to interact with the LXC Web Panel v1 REST API., (*2)

Author:, (*3)

@lcherone, (*4)

Setup:, (*5)

Using composer add the package to your project:, (*6)

composer require lcherone/lxcpapi, (*7)

Initializing the client, (*8)

<?php
require 'vendor/autoload.php';

/**
 * Initialize the API client class
 */
$api = new lcherone\lxcpapi\APIClient([
    'base_uri'   => 'http://lxcpanel.example.com:5000',
    'api_key'    => 'api-key-generated-in-panel'
]);
?>

Making calls:

To interact with the API its as simple as calling a class method or property, endpoints are dynamically loaded when traversed to., (*9)

Containers

Get, (*10)

$containers = $api->containers->get();

Get (container), (*11)

$container = $api->containers->get('container_name');

Create, (*12)

$container = $api->containers->create('my-container', 'sshd');

Update, (*13)

$container = $api->containers->update('my-container', 'start');

Delete, (*14)

$container = $api->containers->delete('my-container');

Clone/Copy, (*15)

$container = $api->containers->copy('my-container');

Tokens

Create, (*16)

$tokens = $api->tokens->create('some-fancy-api-key', 'API Token');

Delete, (*17)

$tokens = $api->tokens->delete('some-fancy-api-key');

The Versions

02/01 2016

dev-master

9999999-dev https://bitbucket.org/lcherone/lxcpapi

LXC Web panel REST v1 API Client

  Sources   Download

MIT

The Requires

 

api lxc lxc web panel

02/01 2016

v0.0.5

0.0.5.0 https://bitbucket.org/lcherone/lxcpapi

LXC Web panel REST v1 API Client

  Sources   Download

MIT

The Requires

 

api lxc lxc web panel

29/12 2015

v0.0.4

0.0.4.0 https://bitbucket.org/lcherone/lxcpapi

LXC Web panel REST v1 API Client

  Sources   Download

MIT

The Requires

 

api lxc lxc web panel

28/12 2015

v0.0.3

0.0.3.0 https://bitbucket.org/lcherone/lxcpapi

LXC Web panel REST v1 API Client

  Sources   Download

MIT

The Requires

 

api lxc lxc web panel

28/12 2015

v0.0.1

0.0.1.0 https://bitbucket.org/lcherone/lxcpapi/admin

LXC Web panel REST v1 API Client

  Sources   Download

MIT

The Requires

 

api lxc lxc web panel

28/12 2015

v0.0.2a

0.0.2.0-alpha https://bitbucket.org/lcherone/lxcpapi/admin

LXC Web panel REST v1 API Client

  Sources   Download

MIT

The Requires

 

api lxc lxc web panel