Rating API Reference

The hosting.rating API is used to get credits amount rating.

Methods

hosting.rating.list(apikey[, opts=nil])

List credits consumption by resource

Parameters:
Returns:

list of struct – list of consumption

Parameters

HostingRatingOptions

parameter of hosting.rating.list()

Name Default Type Mandatory
date_end   string no
ending period
date_start   string no
start period
offset   string no
local time offset, if omit, use GMT time.
resolution   string no
aggregate rating on time series
resource   struct or array of struct no
filter on specific resources, all resources by default
HostingResource

used by HostingRatingOptions

Name Default Type Mandatory
id   int yes
id of the resource, retrieved from the each specific api
type   string yes
type of the resource
HostingResourceType

used by HostingResource

Name Description
vm A Virtual Private Server
disk Storage device (system or data)
iface Network interface
ip IP address, v4 or v6
rproxy Reverse Proxy
RatingResolution

used by HostingRatingOptions

Name Description
hourly resolution by hour
daily resolution by day
weekly resolution by week
monthly resolution by month

Returns

HostingRatingListReturn

returned by hosting.rating.list()

Name Type
bw_out string
amount of credits consumed by network bandwidth consumption
cpu string
amount of credits consumed by CPU
disk_data string
amount of credits consumed by storage
disk_snapshot string
amount of credits consumed by disk snapshots
disk_snapshot_auto string
amount of credits consumed by automatic snapshots
instance string
amount of credits consumed by spawned VM
ip string
amount of credits consumed by IP Addresses
ram string
amount of credits consumed by RAM
rproxy string
amount of credits consumed by reverse proxy instance
rproxy_server string
amount of credits consumed by reverse proxy servers
rproxy_ssl string
amount of credits consumed by reverse proxy ssl option
timestamp string
A timeslot of 1 hour