SoftLayer REST API get Bandwidth Data By Date

泄露秘密 提交于 2019-12-23 04:40:24

问题


I have a question regarding the use of the getBandwidthDataByDate request using the SoftLayer REST API.

In the documentation it lists 3 parameters for this request, but it's a GET request. Does anyone know how to make this request and/or have an example?

https://api.softlayer.com/rest/v3/SoftLayer_Virtual_Guest/getBandwidthDataByDate/'device_id'.json

I'm not sure where to add the parameters here.(startDateTime, endDateTime, networkType)

And what does the dateTime object look like?

Thanks


回答1:


This is a POST request, so you need to pass the parameters in "Payload" (I'm using Advanced REST client for Chrome).

Try the following REST request:

https://$user:$apiKey@api.softlayer.com/rest/v3/SoftLayer_Virtual_Guest/$device_id/getBandwidthDataByDate

Method: Post (Copy the below code in "Payload")

{  
   "parameters":[  
      "2016-03-10T00:00:00",
      "2016-03-15T00:00:00",
      "public"
   ]
}

Note: Replace $user, $apiKey and $device_id with your own information

References:

SoftLayer_Virtual_Guest::getBandwidthDataByDate



来源:https://stackoverflow.com/questions/36014415/softlayer-rest-api-get-bandwidth-data-by-date

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!