Usage Snapshots

A UsageSnapshot is a site-wide utilization report of storage, bandwidth, APIs, and user accounts of your Files.com site for the given time period.

List Usage Snapshots

SDK Method

UsageSnapshot.List();

Return Object

FilesList<UsageSnapshot>

Authorization Requirement

Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

Additional Arguments

Example Request

using FilesCom.Models;

try
{
    var usageSnapshotIterator = UsageSnapshot.List();
    foreach (UsageSnapshot usageSnapshot in usageSnapshotIterator.ListAutoPaging()) {
        // Operate on usageSnapshot
    }
}
catch (FilesCom.NotAuthenticatedException e)
{
    Console.WriteLine($"Authentication Error Occurred ({e.GetType().Name}): " + e.Message);
}
catch (FilesCom.SdkException e)
{
    Console.WriteLine($"Unknown Error Occurred ({e.GetType().Name}): " + e.Message);
}

Get the most recent usage snapshot (usage data for billing purposes) for a Site

SDK Method

Site.GetUsage();

Return Object

UsageSnapshot

Authorization Requirement

Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

Example Request

using FilesCom.Models;

try
{
    var usageSnapshot = await Site.GetUsage();
    // Operate on usageSnapshot
}
catch (FilesCom.NotAuthenticatedException e)
{
    Console.WriteLine($"Authentication Error Occurred ({e.GetType().Name}): " + e.Message);
}
catch (FilesCom.SdkException e)
{
    Console.WriteLine($"Unknown Error Occurred ({e.GetType().Name}): " + e.Message);
}

The UsageSnapshot Object

Some of the methods above return a UsageSnapshot object. The attributes of this object are listed below.

AttributeDescription
id
int64
Usage snapshot ID
start_at
date-time
Usage snapshot start date/time
end_at
date-time
Usage snapshot end date/time
high_water_user_count
int64
Highest user count number in time period
transformation_credits_usage
int64
Total Transformation and AI credits used in this usage period. Updated daily. Does not include credits consumed today.
current_storage
int64
Current total Storage Usage GB as of end date (not necessarily high water mark, which is used for billing)
high_water_storage
int64
Highest Storage Usage GB recorded in time period (used for billing)
root_storage
int64
Storage Usage for root folder as of end date (not necessarily high water mark, which is used for billing)
deleted_files_counted_in_minimum
int64
Storage Usage for files that are deleted but uploaded within last 30 days as of end date (not necessarily high water mark, which is used for billing)
deleted_files_storage
int64
Storage Usage for files that are deleted but retained as backups as of end date (not necessarily high water mark, which is used for billing)
total_billable_usage
int64
Storage + Transfer Usage - Total Billable amount
total_billable_transfer_usage
int64
Transfer usage for period - Total Billable amount
bytes_sent
int64
Transfer Usage for period - Outbound GB from Files Native Storage
sync_bytes_received
int64
Transfer Usage for period - Inbound GB to Remote Servers (Sync/Mount)
sync_bytes_sent
int64
Transfer Usage for period - Outbound GB from Remote Servers (Sync/Mount)
usage_by_top_level_dir
array(object)
Storage Usage - map of root folders to their usage as of end date (not necessarily high water mark, which is used for billing)