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 IpAddress from 'files.com/lib/models/IpAddress';
import * as FilesErrors from 'files.com/lib/Errors';

try {
  const ipAddresses = await IpAddress.list();
  for (const ipAddress of ipAddresses) {
    // Operate on ipAddress
  }
} catch (err) {
  if (err instanceof FilesErrors.NotAuthenticatedError) {
    console.error(`Authentication Error Occurred (${err.constructor.name}): ${err.error}`);
  } else if (err instanceof FilesErrors.FilesError) {
    console.error(`Unknown Error Occurred (${err.constructor.name}): ${err.error}`);
  } else {
    throw err;
  }
}

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.
associated_with
string
The object that this public IP address list is associated with.
group_id
int64
Group ID
ip_addresses
array(string)
A list of IP addresses.