Download the PHP package ploi/ploi-php-sdk without Composer
On this page you can find all versions of the php package ploi/ploi-php-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package ploi-php-sdk
Ploi PHP SDK :rocket:
The future is now - so stop the hassle, you’re running behind. Quick and easy site deployment with Ploi. Awesome features for awesome developers. Check it out at https://ploi.io
This SDK is meant for PHP applications to be able to communicate with our API. You can find our documentation at https://developers.ploi.io
Installation
Usage
First you need to call a new Ploi instance
Responses
When calling a resource, it will return a Ploi\Http\Response
object containing decoded JSON as well as the original response from the Guzzle client.
You can also only retrieve the JSON, use the getJson()
method to only get the JSON back:
$ploi->user()->get()->getJson()
However, when you want to only get the data, use the getData()
method:
$ploi->user()->get()->getData()
Resources
Resources are what you call to access a feature or function.
You can get all the resources or get a specific one by its ID, for example with servers:
Some actions will require the resource's ID to be set before they can be used:
Servers
You create a new server by:
Or you can create a custom server with a provider not set up in Ploi
After running this request, you will have to add the public key of the Ploi worker to your server.
This is included in the response with a 1-line command within the ssh_command
key.
Once this is done, you can trigger the URL from the response with the start_installation_url
key or by passing in the server ID.
Other methods for servers:
Sites
Available methods for sites:
Databases
Available methods for databases:
Database Backups
Available methods for database backups:
Database Users
Available methods for database users:
Cronjobs
Available methods for cronjobs:
Network Rules
Available methods for network rules:
Queues
Available methods for queues:
Certificates
Available methods for certificates:
NGINX Configuration
Available methods for NGINX configuration:
Load Balancers
Available methods for load balancers
Auth Users
Available methods for auth users:
Deployments
Available methods for deployments
Environments
Available methods for environments
Repositories
Available methods for repositories:
Redirects
Aliases
FastCGI Cache
Tenants
Robot Access
Monitors
Scripts
Available methods for scripts:
Daemons
Available methods for daemons:
Services
System Users
Available methods for system users:
SSH Keys
Available methods for SSH keys:
Insights
User
Available methods for user:
Status Pages
Available methods for status pages:
Status Page Incidents
Available methods for status page incidents:
Webserver Templates
Available methods for webserver templates: