How to copy os image cross IDC with softlayer API?
<p>I have a VM in IDC A, and I have captured this VM as my custom image_A. Now I want to copy image_A to IDC B. Does the softlayer API support this operation?</p>

<h2>To copy image across datacenters:</h2>

<p>You can use: </p>

<ul>
<li><a href="http://sldn.softlayer.com/reference/services/SoftLayer_Virtual_Guest_Block_Device_Template_Group/addLocations" rel="nofollow">SoftLayer_Virtual_Guest_Block_Device_Template_Group::addLocations</a></li>
</ul>

<p>Here an example using REST:</p>

<pre><code>https://$user:$apiKey@api.softlayer.com/rest/v3.1/SoftLayer_Virtual_Guest_Block_Device_Template_Group/$templateGroupId/addLocations

Method: Post

{  
   "parameters":[  
      [  
         {  
            "id":1441195
         }
      ]
   ]
}
</code></pre>

<p>Replace: <strong>$user</strong>, <strong>$apiKey</strong>, <strong>$templateGroupId</strong> (image) with your own information. <strong>1441195</strong> refers to <strong>Dallas 10</strong> datacenter's identifier (You need to replace this with the datacenter's id, in which you wish to copy your image).</p>

<hr>

<h2>To view your own block device template groups (images):</h2>

<pre><code>https://$user:$apiKey@api.softlayer.com/rest/v3.1/SoftLayer_Account/getPrivateBlockDeviceTemplateGroups

Method: Get
</code></pre>

<p><strong>Method:</strong> <a href="http://sldn.softlayer.com/reference/services/SoftLayer_Account/getPrivateBlockDeviceTemplateGroups" rel="nofollow">SoftLayer_Account::getPrivateBlockDeviceTemplateGroups</a></p>

<hr>

<h2>To retrieve information from datacenters:</h2>

<pre><code>https://$user:$apiKey@api.softlayer.com/rest/v3.1/SoftLayer_Location/getDatacenters

Method: Get
</code></pre>

<p><strong>Method:</strong> <a href="http://sldn.softlayer.com/reference/services/SoftLayer_Location/getDatacenters" rel="nofollow">SoftLayer_Location::getDatacenters</a></p>

<hr>

<blockquote>
  <p><strong>Updated</strong></p>
</blockquote>

<h2>To retrieve locations containing a copy of an image</h2>

<p>Try this:</p>

<pre><code>https://$user:$apiKey@api.softlayer.com/rest/v3.1/SoftLayer_Virtual_Guest_Block_Device_Template_Group/$templateGroupId/getDatacenters

Method: Get
</code></pre>

<p><strong>Method:</strong> <a href="http://sldn.softlayer.com/reference/services/SoftLayer_Virtual_Guest_Block_Device_Template_Group/getDatacenters" rel="nofollow">SoftLayer_Virtual_Guest_Block_Device_Template_Group::getDatacenters</a></p>

python api softlayer