IP Addresses

An IPAddress is a record of IP addresses that you can use to automate keeping your firewall's configuration up to date.

Customers who maintain custom firewall configurations may require knowing the public IP addresses of Files.com's edge servers.

List IP Addresses associated with the current site

SDK Method

ipaddress.List()

Return Object

[]*IpAddress

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

import (
    "fmt"
    "errors"

    files_sdk "github.com/Files-com/files-sdk-go/v3"
    ip_address "github.com/Files-com/files-sdk-go/v3/ipaddress"
)

ipAddressIterator, err := ip_address.List(files_sdk.IpAddressListParams{})
if err != nil {
    var respErr files_sdk.ResponseError
    if errors.As(err, &respErr) {
        fmt.Println("Response Error Occurred (" + respErr.Type + "): " + respErr.ErrorMessage)
    } else {
        fmt.Printf("Unexpected Error: %s\n", err.Error())
    }
}

for ipAddressIterator.Next() {
    ipAddress := ipAddressIterator.ipAddress()
}
err = ipAddressIterator.Err()
if err != nil {
    var respErr files_sdk.ResponseError
    if errors.As(err, &respErr) {
        fmt.Println("Response Error Occurred (" + respErr.Type + "): " + respErr.ErrorMessage)
    } else {
        fmt.Printf("Unexpected Error: %s\n", err.Error())
    }
}

The IpAddress Object

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

AttributeDescription
Id
string
Unique label for list; used by Zapier and other integrations.
AssociatedWith
string
The object that this public IP address list is associated with.
GroupId
int64
Group ID
IpAddresses
array(string)
A list of IP addresses.