Remote Bandwidth Snapshots

A RemoteBandwidthSnapshot is a remote bandwidth report for the given date.

List Remote Bandwidth Snapshots

SDK Method

remote_bandwidth_snapshot.List()

Return Values

Returns a *remote_bandwidth_snapshot.Iter and an error. Range over All() to receive files_sdk.RemoteBandwidthSnapshot values and errors. Check each loop error before using its resource. Next() and Err() remain supported.

Authorization Requirement

Requires a Site-Wide API key, or a User API key or session from a Site Administrator.

Additional Arguments

Example Request

import (
    "fmt"
    "errors"

    files_sdk "github.com/Files-com/files-sdk-go/v3"
    remote_bandwidth_snapshot "github.com/Files-com/files-sdk-go/v3/remotebandwidthsnapshot"
)

remoteBandwidthSnapshotIterator, err := remote_bandwidth_snapshot.List(files_sdk.RemoteBandwidthSnapshotListParams{})
if err != nil {
    var respErr files_sdk.ResponseError
    if errors.As(err, &respErr) {
        fmt.Printf("API error (%s): %s\n", respErr.Type, respErr.ErrorMessage)
    } else {
        fmt.Printf("Request failed: %v\n", err)
    }
    return
}

for remoteBandwidthSnapshot, err := range remoteBandwidthSnapshotIterator.All() {
    if err != nil {
        var respErr files_sdk.ResponseError
        if errors.As(err, &respErr) {
            fmt.Printf("API error (%s): %s\n", respErr.Type, respErr.ErrorMessage)
        } else {
            fmt.Printf("Request failed: %v\n", err)
        }
        return
    }
    fmt.Println(remoteBandwidthSnapshot)
}

The RemoteBandwidthSnapshot Object

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

AttributeDescription
Id
int64
Site bandwidth ID
SyncBytesReceived
int64
Site sync bandwidth report bytes received
SyncBytesSent
int64
Site sync bandwidth report bytes sent
LoggedAt
date-time
Time the site bandwidth report was logged
RemoteServerId
int64
ID of related Remote Server