ibm-cloud-infrastructure

Can you pull network status information from the Softlayer API?

一曲冷凌霜 提交于 2019-12-12 02:40:41
问题 We are interested in using the API to get the information found on the Network > Status > Local page. Does the API allow for this? Thank you 回答1: Yes it is possible, but there is no a single API call which returns the result. Basically you need to get all the routers in your account. here a code which could help you (it is using the Python Client) """ Get network status local The script displays the same information as the https://control.softlayer.com/network/status/local page. Important

SoftLayer API: Order Security Certificate CSR validation

五迷三道 提交于 2019-12-12 02:40:17
问题 I use the following openssl command to genereate CSR: openssl genrsa -out mytestdomain.key 2048 openssl req -new -sha256 -key mytestdomain.key -out mytestdomain.csr I try to place a Security Certificate order from SoftLayer customer portal using the aboved mytestdomain.csr value under the "Enter Certificate Signing Rquest (CSR) , I got an error msg : "Must match CSR Base64 encoded PEM Format ---BEGIN CERTIFICATE REQUEST--- Base64 Encoded String --End CERTIFICATE REQUEST --- How to use openssl

getInvoices method failing

被刻印的时光 ゝ 提交于 2019-12-12 02:23:09
问题 We have been using the getInvoices to extract costs for a specific time period. Today we tried this command. curl -k -n "https://api.softlayer.com/rest/v3/SoftLayer_Account/286900/getInvoices?objectMask=mask%5Bid,closedDate,createDate,typeCode,invoiceTotalAmount,invoiceTotalOneTimeAmount,invoiceTotalRecurringAmount,invoiceTopLevelItems%5Bid,description,hostName,domainName,totalRecurringAmount,totalOneTimeAmount,parentId,categoryCode,billingItemId,billingItem%5Bid,orderItem%5Bid,order%5Bid

How can I get allowedHostsLimit for each volume using SoftLayer API

这一生的挚爱 提交于 2019-12-12 02:18:25
问题 I'm trying to get allowed host limit for each volume. using the api in http://sldn.softlayer.com/reference/services/SoftLayer_Network_Storage I always get "0" for the allowed host limit value. How can I get the right value? 回答1: I ran the following Restful and it returns the proper values https://api.softlayer.com/rest/v3/SoftLayer_Network_Storage/$StorageID/getAllowedHostsLimit replace StorageId with the id of the object storage you want to get the allowed host limit I just called this

SoftLayer API: Order Virtual Server with specific VLAN

你。 提交于 2019-12-12 02:13:33
问题 I use this code do list the available VLANs on my account require 'softlayer_api' require 'pp' client = SoftLayer::Client.new account_service = client[:Account] object_filter = {'networkVlans': {'primaryRouter': {'datacenter': {'name': 'tor01'}}}} object_mask = 'mask[id,name,primaryRouter[id,datacenter[id,name]]]' vlans = account_service.object_mask(object_mask).getNetworkVlans(object_filter) vlans.each { |vlan| pp plan } I get {"id"=>999999, "name"=>"VLAN1", "primaryRouter"=> {"id"=>777777,

Display username password

落爺英雄遲暮 提交于 2019-12-12 01:57:49
问题 Now that SoftLayer has deprecated updatePassword, I am re designing our approach of username passwords. I am using SoftLayer_Account::getUsers method to retrieve a username profile and checking the password expiration date. If the password has expired I am going to use this new marvelous SoftLayer_User_Customer::initiatePortalPasswordChange method to change it, unless you can direct me to another way to change a user password. If the password has not expired, How can I retrieve the current

How can we capture storage_Id while placing order for storage (either performance or endurance)?

纵然是瞬间 提交于 2019-12-12 01:54:37
问题 I am placing order for a block storage and I need to capture storage Id generated for that storage as soon as we places order. Please help me in capturing the storage id. Thanks in advance. 回答1: After placing an order, the response has a property can help us to find the storageId , this is the ”orderId” . Please try the following Rest request using filters: https://[username]:[apikey]@api.softlayer.com/rest/v3.1/SoftLayer_Account/getNetworkStorage?objectFilter={"networkStorage":{"billingItem"

Subscribe users to notifications via Soft Layer API

巧了我就是萌 提交于 2019-12-12 01:25:58
问题 I have a set of users that I want to subscribe to the same notifications available via the Portal. However, as I'm automating the creation/management of these users, I also want to automate the subscription to these notifications. I've reviewed the API documentation, searched for any examples/tutorials, and I'm still not having any luck figuring out how to accomplish this. Any clues, or examples would be awesome. 回答1: To add the permission, execute the following request: https://[username]:

Detail information for Auto Scale in SL

亡梦爱人 提交于 2019-12-12 01:16:16
问题 I am implementing the detail information for auto scaling using Java API. How can I get a detailed information of member configuration. Please refer to the fields in red box in the attached picture. I could get a detailed information. For example, I could get the operation reference code, which is CENTOS_6_64, but how can I get the long type of description like CentOS 6.x - Minimal Install (64bit). 回答1: try using this object Mask mask[id, name, status[name, keyName], regionalGroup[id, name,

Unable to URL encode { } for object filters in softlayer REST URI

末鹿安然 提交于 2019-12-12 01:13:43
问题 I am calling a Get method through Rest and my URI contains { } for object filters in Softlayer. I have used %7B for { and %7D for }, but I get java.net.URISyntaxException. The URI also contains @ which I have replaced with %40. This is working. I am using http Client to execute my Rest Call. The URI works fine on Postman, both with and without URL Encoding. 回答1: Here two way to skip or handle @: how is '@' handled in the softlayer Rest calls Another way to skip special characters would be,