Cloudflare

Constructs and returns a new Cloudflare API client with the specified authentication.

new Cloudflare(auth: Object)
Parameters
auth (Object) The API authentication for an account
Name Description
auth.email string The account email address
auth.key string The account API token key
Properties
dnsRecords (DNSRecords) : DNS Records instance
ips (IPs) : IPs instance
zones (Zones) : Zones instance
zoneSettings (ZoneSettings) : Zone Settings instance
zoneCustomHostNames (ZoneCustomHostNames) : Zone Custom Host Names instance
user (User) : User instance

DNSRecords

DNSRecords represents the /zones/:zoneID/dns_records API endpoint.

new DNSRecords()

Extends Resource

Instance Members
browse(zone_id)
add(zone_id, record)
read(zone_id, id)
edit(zone_id, id, record)
del(zone_id, id)

EnterpriseZoneWorkersScripts

EnterpriseZoneWorkersScripts represents the accounts/:accountId/workers/scripts API endpoint.

new EnterpriseZoneWorkersScripts()

Extends Resource

Instance Members
read(account_id, name)
del(account_id, name)
edit(account_id, name, script)
browse(account_id, name)

EnterpriseZoneWorkersRoutes

EnterpriseZoneWorkersRoutes represents the zones/:zoneId/workers/routes API endpoint.

new EnterpriseZoneWorkersRoutes()

Extends Resource

Instance Members
read(zone_id, id)
add(zone_id, config)
browse(zone_id)
del(zone_id, id)
edit(zone_id, id, config)

IPs

IPs represents the /ips API endpoint.

new IPs()

Extends Resource

Instance Members
browse()

Zones

Zones represents the /zones API endpoint.

new Zones()

Extends Resource

Instance Members
activationCheck(id)
purgeCache(id, params?)
del(id)
browse()
read(id)
edit(id, zone)
add(zone)

ZoneSettings

ZoneSettings represents the /zones/:zoneID/settings API endpoint.

new ZoneSettings()

Extends Resource

Instance Members
read(id, setting)
browse(id)
editAll(id, settings)
edit(id, setting, value)

ZoneCustomHostNames

ZoneCustomHostNames represents the /zones/:zoneID/custom_hostnames API endpoint.

new ZoneCustomHostNames()

Extends Resource

Instance Members
browse(zone_id)
edit(zone_id, id, config)
add(zone_id, config)
del(zone_id, id)
read(zone_id, id)

ZoneWorkers

ZoneWorkers represents the /zones/:zoneId/workers API endpoint.

new ZoneWorkers()

Extends Resource

Instance Members
validate(zoneId, script)

ZoneWorkersScript

ZoneWorkersScript represents the /zones/:zoneID/workers/script API endpoint.

new ZoneWorkersScript()

Extends Resource

Instance Members
read(zone_id)
read(zone_id, script)
del()

ZoneWorkersRoutes

ZoneWorkersRoutes represents the zones/:zoneId/workers/filters API endpoint.

new ZoneWorkersRoutes()

Extends Resource

Instance Members
read(zone_id, id)
edit(zone_id, id, config)
del(zone_id, id)
add(zone_id, config)
browse(zone_id)

User

User represents the /user API endpoint.

new User()

Extends Resource

Instance Members
read()
edit(user)