Download the PHP package softlayer/softlayer-api-php-client without Composer

On this page you can find all versions of the php package softlayer/softlayer-api-php-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package softlayer-api-php-client

A SoftLayer API PHP client.

Build Status

Warning

Use v1.2.0 for older PHP versions (php < 8.0) . v2.0.0 for php 8.0 or higher.

PHP 8.0 removed XMLRPC as a built in extension. As such, it is no longer required as part of the composer file in this project. The XmlRpcClient still exists here if you need it, but we assume most users are using the SoapClient. If there are any issues with this Let us know on github

Overview

The SoftLayer API PHP client classes provide a simple method for connecting to and making calls from the SoftLayer API and provides support for many of the SoftLayer API's features. Method calls and client management are handled by the PHP SOAP and XML-RPC extensions.

Making API calls using the \SoftLayer\SoapClient is done in the following steps:

  1. Instantiate a new \SoftLayer\SoapClient object using the \SoftLayer\SoapClient::getClient() method. Provide the name of the service that you wish to query, an optional id number of the object that you wish to instantiate, your SoftLayer API username, your SoftLayer API key, and an optional API endpoint base URL. The client classes default to connect over the public Internet.
  2. Use \SoftLayer\SoapClient::API_PRIVATE_ENDPOINT to connect to the API over SoftLayer's private network. The system making API calls must be connected to SoftLayer's private network (eg. purchased from SoftLayer or connected via VPN) in order to use the private network API endpoints.
  3. Define and add optional headers to the client, such as object masks and result limits.
  4. Call the API method you wish to call as if it were local to your client object. This class throws exceptions if it's unable to execute a query, so it's best to place API method calls in try / catch statements for proper error handling.

Once your method is executed you may continue using the same client if you need to connect to the same service or define another client object if you wish to work with multiple services at once.

The most up to date version of this library can be found on the SoftLayer github public repositories: https://github.com/softlayer/softlayer-api-php-client . Any issues using this library, please open a Github Issue

System Requirements

The \SoftLayer\SoapClient class requires at least PHP 8.0.0 and the PHP SOAP enxtension installed and enabled (extension=soap in the php.ini file). Since php 8.0 has removed xmlrpc extension you will need to manually install this library to use the \SoftLayer\XmlRpcClient. If you are using an earlier version of php that still includes ext-xml, please use v1.2.0 of this library.

A valid API username and key are required to call the SoftLayer API. A connection to the SoftLayer private network is required to connect to SoftLayer's private network API endpopints. See Authenticating to the SoftLayer API for how to get these API keys.

Installation

Install the SoftLayer API client using Composer.

Usage

These examples use the \SoftLayer\SoapClient class. If you wish to use the XML-RPC API then replace mentions of SoapClient.class.php with XmlrpcClient.class.php and \SoftLayer\SoapClient with \SoftLayer\XmlRpcClient.

Here's a simple usage example that retrieves account information by calling the getObject() method in the SoftLayer_Account service:

For a more complex example we'll retrieve a support ticket with id 123456 along with the ticket's updates, the user it's assigned to, the servers attached to it, and the datacenter those servers are in. We'll retrieve our extra information using a nested object mask. After we have the ticket we'll update it with the text 'Hello!'.

Author

This software is written by the SoftLayer Development Team [[email protected]](mailto:[email protected]).

Copyright

This software is Copyright © 2009 – 2022 SoftLayer Technologies, Inc. See the bundled LICENSE.textile file for more information.


All versions of softlayer-api-php-client with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
ext-soap Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package softlayer/softlayer-api-php-client contains the following files

Loading the files please wait ....