Overview
Error Handling

Methods

API Documentation (API Version bleed)

Monitoring/Bandwidth/

DESCRIPTION

This section of the api provides methods for querying in the bandwidth activity of a server.

graph

URL:

https://api.liquidweb.com/bleed/Monitoring/Bandwidth/graph

Description:

Get a bandwidth usage graph for a server.

If type "json" is specified, return a JSON blob with timestamps and byte amounts that could be used to generate a visual graph. The output here is designed to mirror the output that would be seen from the /asset/measurements/lookup endpoint, and additional input options are provided to mirror the functionality of that endpoint as well, however it is, for obvious reasons, less performant than just requesting the data in a raw format.

if type "json_raw" is specified, return a JSON blob with the raw data of timestamps and byte amounts that could be used to generate a visual graph.

Otherwise, an image is returned as a base64 encoded blob. You should be able to use the 'content_type' returned in the Content-type header, then just base64-decode the 'content' and print it out to generate the image.

Examples:

	Perl:

	my $graph = $api->request('monitoring/bandwidth/graph', { uniq_id => 'ABC123' });

	print	"Content-type: $graph->{content_type}\n\n";
	print MIME::Base64::decode_base64($graph->{content});

Parameters:

ParameterTypeNotes
endA valid unix epoch value (the number of seconds since Jan 1, 1970).
frequencyOne of the following:
 
One of: 'daily', 'monthly', 'weekly', 'yearly'

A single word, consisting of only letters and digits.

Anything other than 'daily', 'weekly', 'monthly', or 'yearly' will default to 'monthly'

heightA positive integer value (i.e. 1 and up).* Optional
  • Defaults to: 150
small

A boolean value (0 or 1).

This option does not actually do anything. It remains present for legacy purposes

startA valid unix epoch value (the number of seconds since Jan 1, 1970).
typeThe value: 'graph'* Optional
  • Defaults to: graph
uniq_idA six-character identifier, containing only capital letters and digits.* Required
widthA positive integer value (i.e. 1 and up).* Optional
  • Defaults to: 450

Returns:

FieldType
contentA base64 string, consisting of letters, digits, +, /, possibly terminated by zero to two "=" characters
content_typeA MIME type, such as application/octet-stream, image/png, or text/plain

Possible Errors:

Refer to the Error Handling documentation for the list of exception types

stats

URL:

https://api.liquidweb.com/bleed/Monitoring/Bandwidth/stats

Description:

Get bandwidth usage stats for a server.

Parameters:

ParameterTypeNotes
uniq_idA six-character identifier, containing only capital letters and digits.* Required

Returns:

FieldType
actualAn associative array containing the fields:
 
bothAn associative array containing the fields:
 
BA floating-point value.
GBA floating-point value.
KBA floating-point value.
MBA floating-point value.
inAn associative array containing the fields:
 
BA floating-point value.
GBA floating-point value.
KBA floating-point value.
MBA floating-point value.
outAn associative array containing the fields:
 
BA floating-point value.
GBA floating-point value.
KBA floating-point value.
MBA floating-point value.
averagesAn associative array containing the fields:
 
dayAn associative array containing the fields:
 
bothAn associative array containing the fields:
 
BA floating-point value.
GBA floating-point value.
KBA floating-point value.
MBA floating-point value.
inAn associative array containing the fields:
 
BA floating-point value.
GBA floating-point value.
KBA floating-point value.
MBA floating-point value.
outAn associative array containing the fields:
 
BA floating-point value.
GBA floating-point value.
KBA floating-point value.
MBA floating-point value.
hourAn associative array containing the fields:
 
bothAn associative array containing the fields:
 
BA floating-point value.
GBA floating-point value.
KBA floating-point value.
MBA floating-point value.
inAn associative array containing the fields:
 
BA floating-point value.
GBA floating-point value.
KBA floating-point value.
MBA floating-point value.
outAn associative array containing the fields:
 
BA floating-point value.
GBA floating-point value.
KBA floating-point value.
MBA floating-point value.
minuteAn associative array containing the fields:
 
bothAn associative array containing the fields:
 
BA floating-point value.
GBA floating-point value.
KBA floating-point value.
MBA floating-point value.
inAn associative array containing the fields:
 
BA floating-point value.
GBA floating-point value.
KBA floating-point value.
MBA floating-point value.
outAn associative array containing the fields:
 
BA floating-point value.
GBA floating-point value.
KBA floating-point value.
MBA floating-point value.
monthAn associative array containing the fields:
 
bothAn associative array containing the fields:
 
BA floating-point value.
GBA floating-point value.
KBA floating-point value.
MBA floating-point value.
inAn associative array containing the fields:
 
BA floating-point value.
GBA floating-point value.
KBA floating-point value.
MBA floating-point value.
outAn associative array containing the fields:
 
BA floating-point value.
GBA floating-point value.
KBA floating-point value.
MBA floating-point value.
secondAn associative array containing the fields:
 
bothAn associative array containing the fields:
 
BA floating-point value.
GBA floating-point value.
KBA floating-point value.
MBA floating-point value.
inAn associative array containing the fields:
 
BA floating-point value.
GBA floating-point value.
KBA floating-point value.
MBA floating-point value.
outAn associative array containing the fields:
 
BA floating-point value.
GBA floating-point value.
KBA floating-point value.
MBA floating-point value.
weekAn associative array containing the fields:
 
bothAn associative array containing the fields:
 
BA floating-point value.
GBA floating-point value.
KBA floating-point value.
MBA floating-point value.
inAn associative array containing the fields:
 
BA floating-point value.
GBA floating-point value.
KBA floating-point value.
MBA floating-point value.
outAn associative array containing the fields:
 
BA floating-point value.
GBA floating-point value.
KBA floating-point value.
MBA floating-point value.
yearAn associative array containing the fields:
 
bothAn associative array containing the fields:
 
BA floating-point value.
GBA floating-point value.
KBA floating-point value.
MBA floating-point value.
inAn associative array containing the fields:
 
BA floating-point value.
GBA floating-point value.
KBA floating-point value.
MBA floating-point value.
outAn associative array containing the fields:
 
BA floating-point value.
GBA floating-point value.
KBA floating-point value.
MBA floating-point value.
costAn associative array containing the fields:
 
currentA monetary value, such as -$.05, 0.05, or -5.00
projectedA monetary value, such as -$.05, 0.05, or -5.00
domainA fully-qualified domain name (i.e. liquidweb.com, www.liquidweb.com, etc)
pricingAn associative array containing the fields:
 
per_gb_overA monetary value, such as -$.05, 0.05, or -5.00
priceA monetary value, such as -$.05, 0.05, or -5.00
quotaA non-negative integer value (i.e. 0 and up).
projectedAn associative array containing the fields:
 
bothAn associative array containing the fields:
 
BA floating-point value.
GBA floating-point value.
KBA floating-point value.
MBA floating-point value.
inAn associative array containing the fields:
 
BA floating-point value.
GBA floating-point value.
KBA floating-point value.
MBA floating-point value.
outAn associative array containing the fields:
 
BA floating-point value.
GBA floating-point value.
KBA floating-point value.
MBA floating-point value.

Possible Errors:

Refer to the Error Handling documentation for the list of exception types