View gist:2998774
<?php
require_once('SoftLayer/SoapClient.class.php');
/**
* Set your SoftLayer API username and key.
*/
$apiUsername = 'USER HERE';
$apiKey = 'KEY HERE';
View gist:2998759
<?php
require_once('SoftLayer/SoapClient.class.php');
function updateDns() {
$apiUsername = 'USER HERE';
$apiKey = 'KEY HERE';
$domainId = 'DOMAIN ID HERE';
$dnsClient = SoftLayer_SoapClient::getClient('SoftLayer_Dns_Domain', $domainId, $apiUsername, $apiKey);
$recordClient = SoftLayer_SoapClient::getClient('SoftLayer_Dns_Domain_ResourceRecord', null , $apiUsername, $apiKey);
View gist:2789898
<?php
require_once('SoftLayer/SoapClient.class.php');
/**
* Set your SoftLayer API username and key.
*/
$apiUsername = '';
$apiKey = '';
View gist:2560998
#!/usr/bin perl
use warnings;
use strict;
use SoftLayer::API::SOAP;
# Set SLAPI User and Key
my $api_username = '';
my $api_key = '';
# ID of LoadBalancer to poll
View gist:2158553
import SoftLayer.API
import ipaddr
def splitIpCidrNotation(arg):
ipv4 = ipaddr.IPv4Network(arg)
return str(ipv4.ip), str(ipv4.netmask)
def getClients(user, key):
View gist:1953408
# So we can talk to the SoftLayer API:
import SoftLayer.API
import argparse
# Your SoftLayer API username and key.
#
# Generate an API key at the SoftLayer Customer Portal:
# https://manage.softlayer.com/Administrative/apiKeychain
apiUsername = ''
apiKey = ''
View gist:1780685
# Create a network monitor
# So we can talk to the SoftLayer API:
import SoftLayer.API
# For nice debug output:
import pprint
pp = pprint.PrettyPrinter(indent=4)
# Your SoftLayer API username and key.
View gist:1006343
<?php
require_once dirname(__FILE__) . '/SoftLayer/SoapClient.class.php';
/**
* Your SoftLayer API username.
*
* @var string
*/
$apiUsername = 'API_USERNAME';
View monitoringGraph.php
<?php
/**
* Retrieve graphs for specific metrics for a single server.
*
* This example shows how to use the SoftLayer API to retrieve graphs for the
* specific Advanced Monitoring metrics for a single hardware or virtual guest
* server instance.
*
* We will call the SoftLayer API to retrieve the monitoring agents,
* configuration template, and configuration values for a server instance.
View gist:815278
<?php
/**
* Add/update a reverse DNS record by providing an IP and FQDN.
*
* This assumes the SoftLayer API PHP client
* <http://github.com/softlayer/softlayer-api-php-client> is installed in the
* directory '/SoftLayer' in this script's path and that you wish to use the
* SOAP client instead of our XML-RPC client.
*
* @see http://sldn.softlayer.com/wiki/index.php/SoftLayer_Network_Subnet