Skip to content

Instantly share code, notes, and snippets.

# So we can talk to the SoftLayer API:
import SoftLayer
# For nice debug output:
from pprint import pprint as pp
# Your SoftLayer API username and key.
#
# Generate an API key at the SoftLayer Customer Portal:
# https://manage.softlayer.com/Administrative/apiKeychain
apiUsername = ''
# So we can talk to the SoftLayer API:
import SoftLayer
# For nice debug output:
from pprint import pprint as pp
# Your SoftLayer API username and key.
#
# Generate an API key at the SoftLayer Customer Portal:
# https://manage.softlayer.com/Administrative/apiKeychain
api_username = ''
curl -d @cci.json https://<user>:<api_key>@api.softlayer.com/rest/v3/SoftLayer_Virtual_Guest/createObject
cci.json:
{
"parameters":[
{
"hostname": "host1",
"domain": "example.com",
"datacenter": { "name": "sjc01" },
<?php
include('softlayer-api-php-client/SoftLayer/SoapClient.class.php');
$apiUser = '';
$key = '';
$accountClient = SoftLayer_SoapClient::getClient('SoftLayer_Account', Null, $apiUser, $key);
$objectMask = "mask[id, hostname, domain, datacenter.longName, billingItem.recurringFee]";
<?php
require_once('SoftLayer/SoapClient.class.php');
/**
* Set your SoftLayer API username and key.
*/
$apiUsername = 'USER HERE';
$apiKey = 'KEY HERE';
{
"parameters":[
"test",
[{"id": 123456}],
"This is a note"
]
}
@underscorephil
underscorephil / netscaler_order.json
Created August 2, 2013 14:28
Order object for a Citrix NetScaler VPX 10.1 1000Mbps Standard with 1 Static Public IP Address
{
"parameters": [
{
"complexType": "SoftLayer_Container_Product_Order",
"location": 224092,
"packageId": 0,
"prices": [
{
"id": 22307
},
{
"parameters":[
"tag1, tag2, tag3",
{"id": 2},
12345
]
}
{
"parameters": [
{
"complexType": "SoftLayer_Container_Product_Order",
"packageId": 0,
"prices": [
{
"id": 16984
}
]
@underscorephil
underscorephil / gist:6168357
Last active December 20, 2015 17:28
2018 -> vlan priceId 1092 -> 32 Static Public IP Addresses priceId
{
"parameters": [
{
"complexType": "SoftLayer_Container_Product_Order_Network_Vlan",
"location": 142775,
"routerId": 52730,
"packageId": 0,
"prices": [
{ "id": 2018 },
{ "id": 1092 }